View Single Post
  #4   Report Post  
Posted to microsoft.public.excel.programming
Rob van Gelder[_4_] Rob van Gelder[_4_] is offline
external usenet poster
 
Posts: 1,236
Default SQL "INSERT INTO" puts Single Quote in Front of Text Value

sorry. I thought you were trying to preserve it. My mistake.

I'm not certain how a single quote is being introduced.
Could I see your update SQL?

--
Rob van Gelder - http://www.vangelder.co.nz/excel


wrote in message
...
Rob, thanks. ADO isn't an option in this case.

But, I'm puzzled by your second suggestion. I'm trying to
eliminate the leading single quote from the result, not
preserve it.

Admittedly, I'm new to SQL/Excel, so I may have
misunderstood the hint.

David

-----Original Message-----
Use ADO Parameters.
Or if that's not an option, then try single-quote twice

(eg. "''IBM")


--
Rob van Gelder - http://www.vangelder.co.nz/excel


"David Weilmuenster"

wrote in message
...
I am using MS Excel 2002 to manage financial data.

To add new data to a named range in a spreadsheet, I

have
written a query that uses the SQL "INSERT INTO"

capability.

Works well, except for two problems. For this Post, the
problem I'm trying to solve is that the update query
inserts a single quote at the front of each text field.
E.g., the field "Symbol" could have the value of "IBM"

(my
double quotes for purposes of explanation). But, the
update query produces "'IBM".

Any suggestions on how I can get the query to drop the
spurious single quote?

Thanks,
David



.