07-22-2014 06:00 AM
Maybe post an example of what you have, what you want. Guessing from what you have said:
into :LIST_OF_DATES separated by '","' /* Note single quote, then double */
create table WANT as
where DATE in ("&LIST_OF_DATES.");
07-23-2014 04:45 AM
The issue lies within the where clause - the formats don't match
": Expression using IN has components that are of different data types."
The original dates are in datetime formats.
I manage to solve it by manipulating the formats - creating date2 from the original date in the table:
SET datelist (Keep=DateORIG);
SELECT DATE2 INTO :LIST_OF_DATES separated by ',' FROM Datelist;
CREATE TABLE CX AS SELECT * FROM MAINTABLE
WHERE datepart(DateORIG) IN (&List_OF_DATES.);
Thanks for your suggestion though - it got me halfway there.
Need further help from the community? Please ask a new question.