Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

easy one - reserved characters

Status
Not open for further replies.

sladd

IS-IT--Management
Mar 7, 2001
44
US
I am writing a module to construct a dynamic sql statement. Inside of this string, I need to include " marks.

example:
dim sqlstr as string
dim t1 as string

t1="table1"

sqlstr = "select " & t1 & ".* where " & t1 & ".location="austin""

I of course get an error becuase the quotes I need to put around the word austin are taken as a control character. How can I build my statement to include these quotes?
 
Try:

sqlstr = "Select " & t1 & ".location, * From " & t1 & " Where " & t1 & ".location = '" & "austin" & "'"

Good Luck
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top