What is difference macros and prompts?
Answers were Sorted based on User's Feedback
Answer / nmlabsonline.net
Macros is nothing but a conditions Total in project level
but prompt is dynamic condition (in Repositary level) this
is implimenting report level in particular filter
condition.......
| Is This Answer Correct ? | 0 Yes | 0 No |
Answer / janardhanreddy
Macro: It is a collection of SQL queries preferably DML statments and it is stored as an object in DD(Data Dictionary). Unlike VIEWS (we will deal about Views in another post), a macro can have multiple sequels. It is known that a macro can handle many DML and it is restricted to only one DDL.
Reason: DDL statements like Create,Alter,Drop,Rename generally locks the DD for their processing, since macros transaction is an internal process it is highly dependent on DD. Therefore DDL can be last statement in a macro. - This is what provided as theoretical explanation .
Example:
CM AS // CM doesnt work with Queryman better try with BTEQ
or
CREATE MACRO MyMacroName AS
(
insert into (eno,name,ereqno) emp values (101,'Rajesh',43243259);
select * from emp;
//DDL stmt here (doesnt work with queryman)
)
Issue: There is an issue with macro that, DDL couldnt be even as last statement in a macro(with Queryman). I used Teradata 12 and I am getting Warning as Data Dictionary must be solitary. I will update after working with BTEQ.
Parameterized Macro:
//paramNum is passed as Parameter to Select statement.
//passed parameter shd be accessed using =:paramname
CREATE MACRO macro_name (paramNum integer) AS
{
DMLs here....
select ename,esal from emp where eno = :paramName ;
};
REPLACE Macro:
If you require more DMLs to be added to an existing macro, you can use
REPLACE MACRO AS
{[insert];
[update];
[delete];
[select];);
To Execute Macro:
EXEC []
eg: exec myfirsmacro_name;
exec myfirsmacro_name (invalue=1,invalue='abc');
To Drop:
DROP MACRO macro-name;
| Is This Answer Correct ? | 0 Yes | 0 No |
What are the associated ports in look up T/R.
write a sql query following source? subject mark maths 30 science 20 social 80 requird output maths science social 30 20 80
What are the options in the target session of update strategy transsformatioin?
WHAT IS UPDATE OVERRIDE . DIFFERENCE BETWEEN SQL OVERRIDE AND UPDATE OVERRIDE ?
Please let me know how to make Data masking in informatica..
Without source how to insert record to target?
what is surrogatekey ? In ur project in which situation u has used ? explain with example ?
Scenario:- Below is the requirement. Source:- NAME ID Requirement RAVI 1 (no need to repeat as it ID is 1) KUMAR 3 (repeat 3 times as it ID is 3) John 4 (repeat 4 times as it ID is 4) Required Out Put:- Name ID RAVI 1 KUMAR 3 KUMAR 3 KUMAR 3 John 4 John 4 John 4 John 4 Scenario 2:- Source Data ID NAME 1,2 NETEZZA,ORACLE 3,4,5 SQL Server, DB2, Teradata Required Output:- ID NAME 1 NETEZZA 1 ORACLE 3 SQL Server 3 DB2 3 Teradata
How to use pmcmd utility command?
What is the difference between SOURCE and TARGET BASED COMMITS?
How to display session logs based upon particular dates. If I want to display session logs for 1 week from a particular date how can I do it without using unix.
What is router transformation