Brian,
If you are going against SQL server, then you should be using single
quotes, not double.
You probably shouldn't be doing this at all though. You should use
parameterized queries, as they will allow you to just specify the text, and
it will take care of formatting. This also protects you against SQL
injection attacks, which could have a very detrimental affect on your DB.
Take a look at the Parameters property on the SqlCommand, OleDbCommand,
OdbcCommand, OracleCommand classes (depending on which one you use), as this
is what you will use to create your parameterized query.
Hope this helps.
--
- Nicholas Paldino [.NET/C# MVP]
-
mv*@spam.guard.caspershouse.com
"Brian Conway" <Br**********@qwest.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
I am trying to get my select statement that is in a string variable to
work with alias column names I need a double quote " to go around some of the
aliases, however, they need to have a double quote around them to get the
sql to work correctly, how can you escape them out so that I can get them
to work within the string?
eri.actual_miles_qty AS "Last Odometer"
I dont want to use underscores.