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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
matthewp
Creator III
Creator III

If/CASE statement in load with fields from two tables

I have a load statement below:

[code]

TABA:

LOAD [Number] AS [ID Number],

          [Type] AS [AType]

FROM

(qvd);

LEFT JOIN(TABA)

TABB:

LOAD [Number] AS [ID Number],

          [Type] AS [BType]

FROM

(qvd);

[\code]

Now this works fine, however i want to put in the load script

CASE WHEN [AType] IS NULL THEN [BType] ELSE NULL

However i can get it to work.

I have tried :

TABA:

LOAD [Number] AS [ID Number],

          [Type] AS [AType]

FROM

(qvd);

LEFT JOIN(TABA)

TABB:

LOAD [Number] AS [ID Number],

          [Type] AS [BType],

          if(IsNull(TABA.Type),TABB.Type,Null) AS [NewType]

FROM

(qvd);

Also Tried:

TABA:

LOAD [Number] AS [ID Number],

          [Type] AS [AType]

FROM

(qvd);

LEFT JOIN(TABA)

TABB:

LOAD [Number] AS [ID Number],

          [Type] AS [BType],

          if(IsNull(AType),BType,Null) AS [NewType]

FROM

(qvd);

1 Reply
matthewp
Creator III
Creator III
Author

bump