Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi friends,
I have the following SQL query:
select
case when (select id from table1 where id=number) is null then 'Not Exists'
else 'Exists'
END case,
number,name from table2;
I have created 2 QVD files with table1.qvd and table2.qvd.
I knew only this:
Load number,
name
FROM
(qvd);
Any help is greatly appreciated.
HI,
Try this
Table1:
LOAD
id
FROM Table1.QVD;
LEFT JOIN (Table1)
LOAD
Number as id,
Name
FROM Table2.qvd;
Data:
LOAD
id,
Name,
If(IsNull(Name), 'Not Exists', 'Exists') AS Status
RESIDENT Table1;
DROP TABLE Table1;
Hope this helps you.
Regards,
Jagan.
Try this
Table1:
Load id as number
FROM
(qvd);
Table2:
Load if( exists(number),'Exists','NotExists') as XXXX,
name
FROM
(qvd);
HI,
Try this
Table1:
LOAD
id
FROM Table1.QVD;
LEFT JOIN (Table1)
LOAD
Number as id,
Name
FROM Table2.qvd;
Data:
LOAD
id,
Name,
If(IsNull(Name), 'Not Exists', 'Exists') AS Status
RESIDENT Table1;
DROP TABLE Table1;
Hope this helps you.
Regards,
Jagan.
thank you phaneendra
thanks jagan mohan. It worked.