How to build a SQL Stament with special chars in column names?

This is a discussion on How to build a SQL Stament with special chars in column names? within the ODBC forums in Framework and Interface Programming category; Hello NG, I'm using a Ado connection to a text file. If a make "SELECT * FROM myfile.csv" I got the whole file. Now some columns have special chars like "Geburtstag 01.01.1900-31.01.1910". If I write: "SELECT Geburtstag 01.01.1900-31.01.1910 FROM myfile.csv" I got an error. The masking with brackets do also not work: "SELECT [Geburtstag 01.01.1900-31.01.1910] FROM myfile.csv". I got the error that it is not allowed to enclose a name. Any idea how to build this SQL statement? Peter...

Go Back   Application Development Forum > Framework and Interface Programming > ODBC

Object Mix

Register FAQ Calendar Search Today's Posts Mark Forums Read
  #1  
Old 02-23-2006, 11:23 AM
peterfarge@hotmail.com
Guest
 
Default How to build a SQL Stament with special chars in column names?

Hello NG,

I'm using a Ado connection to a text file. If a make "SELECT * FROM
myfile.csv" I got the whole file. Now some columns have special chars
like "Geburtstag 01.01.1900-31.01.1910". If I write:
"SELECT Geburtstag 01.01.1900-31.01.1910 FROM myfile.csv" I got an
error. The masking with brackets do also not work: "SELECT [Geburtstag
01.01.1900-31.01.1910] FROM myfile.csv". I got the error that it is not
allowed to enclose a name.

Any idea how to build this SQL statement?


Peter

Reply With Quote
Reply


Thread Tools
Display Modes


All times are GMT -5. The time now is 11:53 PM.


Powered by vBulletin® Version 3.7.2
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0
vB Ad Management by =RedTyger=

In an effort to better serve ads to our visitors, cookies are used on objectmix.com. For more information, check out our Privacy Policy.