Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have created a table in my data model called AllData. I would like to create a new table (called PreviousData) in the same data model that loads all the fields from AllData, but only for a specific date (which is a field in AllData). I can't seem to get the syntax right. Can somebody help me with this?
I'd assume it looks something like what I have below but I'm not sure where to put the where clause.
PreviousData:
Load *,
Resident AllData;
where PROD_DT = '07/31/2014';
It goes after the resident load like you have it:
PreviousData:
NoConcatenate Load *
Resident AllData
where PROD_DT = '07/31/2014';
This will create synthetic keys since the fields you are loading in are the same as the AllData table (notice the noconcatenate keyword to prevent the tables from joining). You'll after to worry about how it will link (or won't link) to your data. Maybe as simple as just changing the field names in PreviousData to something different or using qualify.
Hope this helps!
It goes after the resident load like you have it:
PreviousData:
NoConcatenate Load *
Resident AllData
where PROD_DT = '07/31/2014';
This will create synthetic keys since the fields you are loading in are the same as the AllData table (notice the noconcatenate keyword to prevent the tables from joining). You'll after to worry about how it will link (or won't link) to your data. Maybe as simple as just changing the field names in PreviousData to something different or using qualify.
Hope this helps!
Hi Try Below
Noconcatenate
Qualify *;
PreviousData:
Load *
Resident AllData
where PROD_DT = '07/31/2014';
UnQualify *;
It will not create syenthetic key.
Regards
ASHFAQ
sounds like good answer kurpat! i think you desrve the points on this
your friend - KILGORE WATTS