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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does ' mean.

Status
Not open for further replies.

merlin72

Programmer
Apr 18, 2000
50
US
Trying to figure what ' mean/do. Like in this code.

strSQL = "UPDATE Employees"
strSQL = strSQL & " SET OrderLastYear=" & Order
strSQL = strSQL & " WHERE LastName =' " & LastName & " 'and FirstName = ' " & ! FirstName & " ' "

Thanks In Advance.


 
The ' in the code is just the string delimiter in SQL.

The SQL query would look like:
UPDATE Employees
SET OrderLastYear=1
WHERE LastName ='Wind' and FirstName = 'Ghone'

if LastName was = Wind and FirstName was Ghone and Order was 1...a tricky thing in the piece of code you supplied is the duplication of names...LastName within double quotes is not a variable whereas it is when out of them...confusing eh...

So in summary the ' are the same as " " in a sentence but used in SQL...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top