Need help printing " double quotes

J

James

I've got the following code... I need the number to be in "double
quotes", not 'single quotes'

so it will look like this when it prints:

UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName=
"021615039");


any ideas? here's the code:

Option Compare Database

Public Sub buildSQL()
Open "C:\UpdateUSAAID\1.txt" For Input As #1
Open "C:\UpdateUSAAID\excludeListSQL.txt" For Output As #2

Do While Not EOF(1)

Line Input #1, excludeMember

Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
excludeMember & "');"


Loop
Close #1
Close #2
End Sub



Thanks!
 
J

James

I figured it out, thanks though.... code looks like this in case you
care.
Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '""" &
excludeMember & "'"");"
 
K

Kerry

Use the Chr function:
Print #2, "UPDATE TableName SET ColumnName =
'x'+Right(ColumnName,Len(ColumnName)-1) WHERE (ColumnName = '" &
Chr(34) &
excludeMember & chr(34) & "');"
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top