Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
chris_johnson
Creator III
Creator III

Loading from a resident table

Hi,

I'm seeing some weird things happening and would like to find out if it's me doing something wrong!

I'm loading some data into a table and then using this to create another table with just the most recent records in:

ResourcePriceTemp:
LOAD
Code as "Resource No.",
"Task Code",
"Effective Date",
"Unit Price",
"Brand Code";
SQL SELECT
Code,
"Task Code",
"Effective Date",
"Unit Price",
"Brand Code"
FROM NAVLive.dbo."Resource Price";

ResourcePrices:
load
"Resource No.",
"Task Code",
"Brand Code" as "Resource Brand Code",
"Unit Price",
max("Effective Date") as "Effective Date"
resident ResourcePriceTemp
group by "Resource No.", "Task Code", "Brand Code", "Unit Price";

drop table ResourcePriceTemp;

It will create the ResourcePriceTemp table (which it will then drop, I've tried uncommenting the drop table line and it does create this table). It doesn't seem to create the ResourcePrices table though and I've no idea why. Does anyone have any idea?

Regards,

Chris

1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hello Chris,

Your syntax seems fine to me. Try using NOCONCATENATE before the LOAD in ResourcePrices, just in case it's being concatenated to ResourcePriceTemp, then dropped.

Hope this helps.

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hello Chris,

Your syntax seems fine to me. Try using NOCONCATENATE before the LOAD in ResourcePrices, just in case it's being concatenated to ResourcePriceTemp, then dropped.

Hope this helps.

chris_johnson
Creator III
Creator III
Author

Yes, looks like it may be doing that. May have somehow fixed it just by renaming a few fields but I'm sure you're suggestion would have worked also.

Chris