Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi There
I have to create following if statement in Load Script
If(a=1,b=2,c=3,Y,N) as Data;
in above statement , a , b and c are coming from 3 different QVD's.
How to achieve this?
Thanks,
Hi,
can you explain in simple statement.
if(a=1 AND b=2 AND c=3,'Y','N') as Data
or
if(a=1 OR b=2 OR c=3,'Y','N') as Data
Regards
Where do you want your If statement - in a new load statement? Which file, database or QVD does this If draw it's data from? You give us too little information to be able to give you sound advice.
Hi,
can you explain in simple statement.
if(a=1 AND b=2 AND c=3,'Y','N') as Data
or
if(a=1 OR b=2 OR c=3,'Y','N') as Data
Regards
Data:
load * ,If(a=1 and b=2 and c=3,'Y','N') as If_Statement;
Load * inline [
a,b,c
1,2,3
4,5,6
7,8,9
];
Hope this will help you.
Hi,
Try like this
QVTableName:
LOAD
*,
If(a=1 AND b=2 AND c=3,Y,N) as Data
FROM DataSource;
Hope this helps you.
Regards,
jagan.
hi ashish,
Table1:
Load ID,a
From a.qvd;
concatenate
Load ID,b
From b.qvd;
concatenate
Load ID,c
From c.qvd;
Table:
noconcatenate
Load *,
If(a=1 and b=2 and c=3,Y,N) as Data // or try If(a=1 or b=2 or c=3,Y,N)
Resident Table1;
Thanks Neetha , your solution worked for me.
Hi Ashish,
If you got the answer close this thread by giving correct answer, it helps others in finding answers easily.
Regards,
Jagan.