In T-SQL, you can use square brackets to get around the fact that some DB Developer used a reserved keyword as a column name, or put a space in a column name as such:
Select [Date] as OrderDate From Orders
or
Select [Order Date] as OrderDate From Orders
I've been unable to find the equivalent for DB2.
We have a file that was set up long ago with fields that contains what I suspect are illegal characters FOR sql. The file works fine when accessing from RPG, but is throwing an error when accessing via SQL.
I've been unable to find documentation on this after much time spent on Google, Bing, and http://publib.boulder.ibm.com/infocenter/iseries/v5r4/topic/rzahg/rzahgicca2.htm
Try using double quotes around the name.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With