Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Here is part of my syntax that I intend to load. I would like to include "NUMBER" for only numbers that equate to '01', '02', '03', etc. For all of my data it goes up to number 99 and I don't want that. My "IN" statement is incorrect. It is pinked out. What is the correct syntax? Or do I have to make a new statement for each and every number? Thank you
COUNTRY,
STATE,
CITY
WHERE YEAR='2019’or YEAR='2020' or YEAR= '2021'
AND VIOLATION='Y'
AND AREACODE=‘234' AND NUMBER IN ('01','02','03','04','05','06','07','08','09','10’,’PP');
Hi, I am looking up 'match' now and the examples are confusing. I am trying this. What did I do wrong? It's still in pink.
COUNTRY,
STATE,
CITY
WHERE YEAR='2019’or YEAR='2020' or YEAR= '2021'
AND VIOLATION='Y'
AND AREACODE=‘234' AND WHERE match (NUMBER, '01','02','03','04','05','06','07','08','09','10','PP');
two things i noticed:
some of your single quotes are back quotes and
you have an extra WHERE clause. remove the 2nd where:
i normally use match(...) > 0, but i suppose not having the >0 will also work, but test it out
look at the examples in the doc, you should follow it:
@Breezy Use the script something as shown below:
Load
COUNTRY,
STATE,
CITY
WHERE Match(YEAR,'2019','2020','2021')
AND VIOLATION='Y'
AND AREACODE=‘234' AND Match(Number,'01','02','03','04','05','06','07','08','09','10','PP');
I guess this is what @edwin is trying to explain it you. Please let me know if this worked.