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

Announcements
Independent validation for trusted, AI-ready data integration. See why IDC named Qlik a Leader: Read the Excerpt!
cancel
Showing results for 
Search instead for 
Did you mean: 
ClareChinonye
Contributor III
Contributor III

Joining and filtering with the where clause

Hi, 

I am very new to qlik sense, and i am currently struggling with Joining my tables and filtering with the where clause.

This is what my script looks like,  and i keep getting an error can someone please help me out? thanks

LIB CONNECT TO 'MY_LIVE SFDC';

LOAD HistoryID,
AssetID,
StatusID,
SubStatusID,
ReasonID,
WorksOrder,
ProductionRate,
StartTime,
EndTime,
Username,
Comment;

[AssetStatusHistory]:
SELECT HistoryID,
AssetID,
StatusID,
SubStatusID,
ReasonID,
WorksOrder,
ProductionRate,
StartTime,
EndTime,
Username,
Comment
FROM SFDataCapture.dbo.AssetStatusHistory;

LOAD EventID,
Username,
WorksOrder,
StartTime,
EndTime,
HasHandover;

Left Join (AssetStatusHistory)

[ServiceEvent]:
SELECT EventID,
Username,
WorksOrder,
StartTime,
EndTime,
HasHandover
FROM SFDataCapture.dbo.ServiceEvent
WHERE SFDataCapture.dbo.ServiceEvent.StartTime >= SFDataCapture.dbo.AssetStatusHistory.StartTime
AND SFDataCapture.dbo.ServiceEvent.StartTime <= SFDataCapture.dbo.AssetStatusHistory.EndTime OR now();

Labels (1)
1 Reply
steeefan
Luminary
Luminary

It's probably the OR now() part of your script. Please provide the exact error you are getting instead of just writing " getting an error".