Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi guys,
I have one QVD file which got unique IDs....
ID
1
2
3
4
5
6
7
now i got one source table in my database with following unique Ids.
ID
4
5
6
7
I need to update my QVD file by performing a subtraction kind of operation...
so that my QVD file should have
ID
1
2
3
it is like QVD - Source.
Is it possible?
Saurabh
Hi,
It is possible using EXISTS() clause in the WHERE load statement:
Source:
LOAD ID;
SQL SELECT ID FROM TABLE; //whatever the source it is
QVD: // load only interesting records
LOAD ID
FROM File.qvd (qvd)
WHERE NOT EXISTS(ID);
DROP TABLE Source;
Miguel
Hi Ramya,
you can do this in your script like this:
ID_Long:
LOAD * INLINE [
ID
1
2
3
4
5
6
7
];
NoConcatenate
ID_Short:
LOAD ID
Resident ID_Long Where ID < 4;
DROP Table ID_Long;
STORE ID_Short into ID_Short.qvd;
Hope this helps
Burkhard
Hi,
It is possible using EXISTS() clause in the WHERE load statement:
Source:
LOAD ID;
SQL SELECT ID FROM TABLE; //whatever the source it is
QVD: // load only interesting records
LOAD ID
FROM File.qvd (qvd)
WHERE NOT EXISTS(ID);
DROP TABLE Source;
Miguel
It seems to be a right answer...
I will try and will let you know...
You should use this
table1:
LOAD * INLINE [
ID
4
5
6
7
];
table2:
LOAD * INLINE [
ID1
1
2
3
4
5
6
7
];
NewTab1:
Load ID,
1 as J
Resident table1;
NewTab2:
Load ID1,
1 as K
Resident table2 where not Exists(ID,ID1);
drop table table1,table2,NewTab1;