Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi:
Full disclosure I'm not a QV developer, just playing one on TV.
Trying to load several fields from and Oracle DB and in the process create a new Month and Year field based upon a timestamp field that is coming in.
DETL:
SQL SELECT
ID,
CREATE_DATE,
MONTH (CREATE_DATE) as CREATEMONTH;
And get:
ErrorSource: OraOLEDB, ErrorMsg: ORA-00904: "MONTH": invalid identifier
Can I do this or am I just doing somethign stupid?
Thanks in advance,
Jim
In principle you should be able to do this, but it is better if you use a preceding load:
Load
ID,
CREATE_DATE,
MONTH (CREATE_DATE) as CREATEMONTH;
SQL SELECT * FROM ...
HIC
In principle you should be able to do this, but it is better if you use a preceding load:
Load
ID,
CREATE_DATE,
MONTH (CREATE_DATE) as CREATEMONTH;
SQL SELECT * FROM ...
HIC
This worked perfectly. Thanks for the quick reply.
Hi,
You can use To_Char function too
To_Char(Date_Field,'MM') = 01
To_Char(Date_Field,'MON') = JAN
To_Char(Date_Field,'YY') = 03
To_Char(Date_Field,'YYYY') = 2003
Also you can go with preceding load as suggested by Henric Cronström.
Sorry, Gysbert, accidentally deleted your post but it did work as well. All great options.