Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
How to user this SQL query in qlikview script :
Select Level00,
Level02,
(
SELECT TOP 1 Level2
FROM demo m
WHERE m.ProductCode = tb.ProductCode
AND (
m.StoreCode = sm.StoreCode
OR m.StoreCode IS NULL
)
AND m.CreatedDate <= tb.CreatedOn
ELSE 1 END)
ORDER BY m.CreatedDate DESC
) AS 'Level2'
FROM dbo.User(NOLOCK) umr
INNER JOIN tempDemo tb ON tb.ModuleID = srm.ModuleID
Please reply..
Rahul
Hi,
Create ODBC (OLE DB) connection to your database.
And use below script:
Table:
LOAD *
;
SQL
Select Level00,
Level02,
(
SELECT TOP 1 Level2
FROM demo m
WHERE m.ProductCode = tb.ProductCode
AND (
m.StoreCode = sm.StoreCode
OR m.StoreCode IS NULL
)
AND m.CreatedDate <= tb.CreatedOn
ELSE 1 END)
ORDER BY m.CreatedDate DESC
) AS 'Level2'
FROM dbo.User(NOLOCK) umr
INNER JOIN tempDemo tb ON tb.ModuleID = srm.ModuleID;
Hope this helps.
Regards,
Andrei Kaliahin
thanks for reply but i am working on qvd so i have to create logic .
I can't fetch this from DB.
Hm...
So each table from DB converted into QVD ?
Am I right?
Andrei
yes...