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!

LIKE and WILDCARD problems

Status
Not open for further replies.

slames

Technical User
Nov 5, 2002
211
GB
HI I'm using Access 2000 front end on SQL Server backend. I am trying to get a query to execute in VBA code using the LIKE keyword but am having problems with the syntax. Can anyone help? this is my query:

DoCmd.RunSQL "update tblJob set jbCurrentlyBilling = 1 from dbo.tblBook INNER JOIN " & _
" dbo.tblJob ON dbo.tblBook.bkISBN = dbo.tblJob.jbISBN where tblJob.jbBillTag = 1 and tblBook.bkClient = '" & clientToBill & "' and jbISBN like & '" & poToBill & "*" & "'"

Where poToBill is the first five characters of the ISBN number

Any help appreciated,

Thanks

Steph

 
Steph,

Is jbISBN a TEXT value or NUMERIC?

You can use wildcard on TEXT but use arithmetic operators for NUMBERS

Skip,

[red]Be advised:[/red] [glasses]
Alcohol and Calculus do not mix!
If you drink, don't derive! [tongue]
 
jbISBN is nvarchar(20) datatype, so I should be able to use a wildcard?
 
Try using the ANSI standard % instead of *

Ben

----------------------------------------------
Ben O'Hara "Where are all the stupid people from...
...And how'd they get so dumb?"
rockband.gif
NoFX-The Decline
----------------------------------------------
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top