SQL issue with spaces in source name

  • Thread starter Thread starter Waxaholic
  • Start date Start date
W

Waxaholic

I am using the following statement and have run into a problem when
trying to bring in a column with a space in it. I have tried using the
recommended "[" and "" double quotes but it still complains. Here is
the code.

"SELECT TIP " & _
",POS_NBR " & _
",POS TITLE " & _
"FROM " & GetFileName(FileName) & ".csv",
strConn)
 
Sorry. I accidentally posted without finishing. Anyhow, the code fails
on POS TITLE. I cannot change the source data so am stuck dealing with
this. Does anyone know of a creative way around this?

Thanks
 
Try this
"SELECT TIP " & _
",POS_NBR " & _
",[POS TITLE] " & _
"FROM " & GetFileName(FileName) & ".csv",
strConn)
 
The brackets do not work. Double Quotes do not work either.



Try this
"SELECT TIP " & _
",POS_NBR " & _
",[POS TITLE] " & _
"FROM " & GetFileName(FileName) & ".csv",
strConn)

Waxaholic said:
Sorry. I accidentally posted without finishing. Anyhow, the code fails
on POS TITLE. I cannot change the source data so am stuck dealing with
this. Does anyone know of a creative way around this?
 
I think you have an underline between POS and TITLE.

The brackets do not work. Double Quotes do not work either.



Try this
"SELECT TIP " & _
",POS_NBR " & _
",[POS TITLE] " & _
"FROM " & GetFileName(FileName) & ".csv",
strConn)

Sorry. I accidentally posted without finishing. Anyhow, the code fails
on POS TITLE. I cannot change the source data so am stuck dealing with
this. Does anyone know of a creative way around this?
 
Back
Top