0

I seem to be having an issue with the query below. It's returning 0 results in Marketing Cloud where locally I'm getting the correct number which is 19. I also tried using an EXISTS clause and am getting the same problem. What am I missing here?

SELECT * FROM [Abandoned Cart Import from FTP]

WHERE 

'UPS' IN (ShippingMethod_ref1, ShippingMethod_ref2, ShippingMethod_ref3, ShippingMethod_ref4, ShippingMethod_ref5, ShippingMethod_ref6, ShippingMethod_ref7, ShippingMethod_ref8)

AND 'INH' NOT IN (ShippingMethod_ref1, ShippingMethod_ref2, ShippingMethod_ref3, ShippingMethod_ref4, ShippingMethod_ref5, ShippingMethod_ref6, ShippingMethod_ref7, ShippingMethod_ref8)

AND 'UP2' NOT IN  (ShippingMethod_ref1, ShippingMethod_ref2, ShippingMethod_ref3, ShippingMethod_ref4, ShippingMethod_ref5, ShippingMethod_ref6, ShippingMethod_ref7, ShippingMethod_ref8)

1 Answer 1

0

You need to include the values you are comparing in single or double quotes. like

UPS IN ('ShippingMethod_ref1')

Also remove your single quotes around Column Names

'UPS' should be UPS without quotes.

Let me know if that helped.

2
  • It's right the way it is, since it's checking for the value 'UPS' across multiple columns. The test expression in this case is the literal value 'UPS' and the columns are located in the expression. Oct 17, 2016 at 15:49
  • more on the subject here: stackoverflow.com/questions/13916400/… Oct 17, 2016 at 15:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .