Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I am trying to add an IF statement in my where clause on load editor but does not seem to be working. Can someone please help?
The IF statement is being used on two different columns to filter for 'GB'. So as long as one column contains 'GB' then return it.
TABLE:
ID | Origin | Destination |
---|---|---|
1 | SYD | GB |
2 | SIN | AU |
3 | GB | US |
4 | GB | GB |
5 | AU | SYD |
So from the table above it would exclude ID's 2 and 5.
Hope this makes sense.
Thanks
LOAD * Inline [
ID, Origin, Destination
1, SYD, GB
2, SIN, AU
3, GB, US
4, GB, GB
5, AU, SYD]
WHERE (Origin = 'GB' OR Destination = 'GB');
LOAD
ID,
Origin,
Destination
FROM 'SomeSource'
WHERE Origin = 'GB' OR Destination = 'GB';
You could use: ... where Origin = 'GB' or Destination = 'GB';
- Marcus
LOAD
ID,
Origin,
Destination
FROM 'SomeSource'
WHERE NOT MATCH(ID,2,5);