Page 1 of 1

Reading Column names with spaces in between

Posted: Wed Oct 21, 2009 7:47 am
by in_finity307
Hi,

I am trying to read data from a table which has column names defined as [Original Cost] on a source system. I am using an ODBC Connector Stage to write a select query like 'Select A."Original Cost" as Original_Cost from A". But I am getting an error for incorrect syntax.

How can we write a SQL Select query in datastage to read this column?

Posted: Wed Oct 21, 2009 7:56 am
by in_finity307
the source database is Microsoft Access.

Posted: Wed Oct 21, 2009 8:00 am
by chulett

Name containg #

Posted: Fri Jan 22, 2010 8:15 am
by in_finity307
I have another problem now. The Column name is 'Customer #'.
I am reading it as

SELECT [Customer #] as Customer from XXX

in the ODBC Connector stage. But on running the job, the job aborts giving the error thet 'Execute failed don the Select statement'.

Any workaround for this>?

Posted: Fri Jan 22, 2010 9:01 am
by chulett
There's one mentioned in the linked thread. You may also have a way to handle 'special characters' like # in column names, check the connector docs. DS_ENABLE_RESERVED_CHAR_CONVERT works for Oracle.