I need to select from an ODBC progress database, but all the column names have dashes instead of under scores in them.
Can anybody point me to the correct syntax for the select statement and technique.
sorry, but I couldn't find it with search
how to select a column with a dash in its name
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 612
- Joined: Thu May 03, 2007 4:59 am
- Location: Melbourne
Try double quotes around column names / Table Names
Joshy George
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
<a href="http://www.linkedin.com/in/joshygeorge1" ><img src="http://www.linkedin.com/img/webpromo/bt ... _80x15.gif" width="80" height="15" border="0"></a>
that helps the select statement, but one still needs to define the output type. For example select a."cmp-id" as cmp_id from tbl_a a is a valid SQL statement, but in the outputs column section it still expects cmp-id, which can not be entered.
I created a server job to do the same, and although it complains, it does seem to do it.
Is there a way of defining the out put column correctly?
I created a server job to do the same, and although it complains, it does seem to do it.
Is there a way of defining the out put column correctly?
Ray Lade
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
In a server ODBC stage, put the double-quoted column names in the Derivation column in the Columns grid. It's these that form the SELECT clause in the generated SELECT statement.
In a parallel ODBC Enterprise stage you're probably easiest to go with user-defined SQL, with double-quoted column names. They only need to coincide with the columns in the Columns grid. Use aliases to the column names in the Columns grid if you want it to be self-documented.
In a parallel ODBC Enterprise stage you're probably easiest to go with user-defined SQL, with double-quoted column names. They only need to coincide with the columns in the Columns grid. Use aliases to the column names in the Columns grid if you want it to be self-documented.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.