Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
jheasley
Luminary Alumni
Luminary Alumni

WHERE clause on QVD load

Good Morning,

Need some help on a load script.  I have 3 tables (items, batches, Searches).  Items is a fact table, and the other two are hybrid fact/dim tables, all in QVD form. I have a where clause on Items, pulling only the last 28 days.  How do I write a where clause on Batches and Notes that looks at the key and date from Items?

tables.jpgscript.png



1 Solution

Accepted Solutions
stabben23
Partner - Master
Partner - Master

Hi,

like this:

where Exists( ITEMNUM) in Your ONBASENOTES table

where Exists( BATCHNUM) in Your ONBASEBATCHES table

View solution in original post

4 Replies
stabben23
Partner - Master
Partner - Master

Hi,

like this:

where Exists( ITEMNUM) in Your ONBASENOTES table

where Exists( BATCHNUM) in Your ONBASEBATCHES table

jheasley
Luminary Alumni
Luminary Alumni
Author

I am not only looking for existence of the value, but where the date >= Today()-28. Where would I define that part of the query?

Joe Easley

office: 704-808-7449

mobile: 803-322-0520

email: joeeasley@odysseylogistics.com<mailto:joeeasley@odysseylogistics.com>

stabben23
Partner - Master
Partner - Master

LOAD *

from lib://blablabla\OnBase_BATCHDATA.......aso.qvd

where Exists( BATCHNUM);

LOAD *

from lib://blablabla\OnBase_NOTES.......aso.qvd

where Exists( ITEMNUM);

stabben23
Partner - Master
Partner - Master

Or you can use:

LEFT KEEP (ONBASEITEM) LOAD