Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Team,
I am trying to load from Excel in QV Script. I only want records that have a SHPD_DT that is NOT blank. That is, I want only those items that have shipped. How do I do this? With a Where statement? What is the proper syntax?
ABC as [ABC No Dashes],
SHPD_QTY,
Date(SHPD_DT, 'M/D/YY') as [Ship Date],
YEAR(Date(SHPD_DT,'M/D/YY')) as [Ship Yr],
MONTH(Date(SHPD_DT,'M/D/YY')) as [Ship Mo],
1001 as Site,
COUNTRY_CD,
TAC1_CITY,
TAC1_LINE1,
TAC1_LINE2,
TAC1_STATE,
TAC1_STREET_ADDR,
TAC1_ZIP5 as [Zip Code]
FROM
(
Remove(Col, Pos(Top, 68)),
Remove(Col, Pos(Top, 3)),
Remove(Col, Pos(Top, 2))
));
This is probably easy. I just cannot find the syntax anywhere.
Thanks for your help.
You would do it at the end before the semicolon like this:
ABC as [ABC No Dashes],
SHPD_QTY,
Date(SHPD_DT, 'M/D/YY') as [Ship Date],
YEAR(Date(SHPD_DT,'M/D/YY')) as [Ship Yr],
MONTH(Date(SHPD_DT,'M/D/YY')) as [Ship Mo],
1001 as Site,
COUNTRY_CD,
TAC1_CITY,
TAC1_LINE1,
TAC1_LINE2,
TAC1_STATE,
TAC1_STREET_ADDR,
TAC1_ZIP5 as [Zip Code]
FROM
(
Remove(Col, Pos(Top, 68)),
Remove(Col, Pos(Top, 3)),
Remove(Col, Pos(Top, 2))
))
WHERE Len(SHPD_DT) > 0;
You would do it at the end before the semicolon like this:
ABC as [ABC No Dashes],
SHPD_QTY,
Date(SHPD_DT, 'M/D/YY') as [Ship Date],
YEAR(Date(SHPD_DT,'M/D/YY')) as [Ship Yr],
MONTH(Date(SHPD_DT,'M/D/YY')) as [Ship Mo],
1001 as Site,
COUNTRY_CD,
TAC1_CITY,
TAC1_LINE1,
TAC1_LINE2,
TAC1_STATE,
TAC1_STREET_ADDR,
TAC1_ZIP5 as [Zip Code]
FROM
(
Remove(Col, Pos(Top, 68)),
Remove(Col, Pos(Top, 3)),
Remove(Col, Pos(Top, 2))
))
WHERE Len(SHPD_DT) > 0;
Try if(NOT isnull(SHPD_DT) or if(SHPD_DT <> '')
This worked, thanks!