Aug 30, 2006 #1 gotmilk2 Programmer Joined Jan 24, 2006 Messages 10 Location US Whenever I use the 'LIKE' operator no data is return. Am i using it properly? example: Select * from sometable where somefield like 'B%'
Whenever I use the 'LIKE' operator no data is return. Am i using it properly? example: Select * from sometable where somefield like 'B%'
Aug 30, 2006 #2 jebry Programmer Joined Aug 6, 2001 Messages 3,006 Location US Hi! It depends what you are trying to do. If you want to return all records that the field starts with the letter b then you do this: Like "B*" the * means that there can be any number of characters after the b the % means that there is only one character after the b. hth Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
Hi! It depends what you are trying to do. If you want to return all records that the field starts with the letter b then you do this: Like "B*" the * means that there can be any number of characters after the b the % means that there is only one character after the b. hth Jeff Bridgham Purdue University Graduate School Data Analyst
Aug 30, 2006 #3 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR the % means that there is only one character I disagree. The % is the STANDARD wild character whereas * is the JetSQL/VBA one. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
the % means that there is only one character I disagree. The % is the STANDARD wild character whereas * is the JetSQL/VBA one. Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Aug 30, 2006 #4 jebry Programmer Joined Aug 6, 2001 Messages 3,006 Location US The % is the STANDARD wild character whereas * is the JetSQL/VBA one That is of course correct but he specifically asked about Access SQL so I answered it that way. I hope that this did not confuse the asker. Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
The % is the STANDARD wild character whereas * is the JetSQL/VBA one That is of course correct but he specifically asked about Access SQL so I answered it that way. I hope that this did not confuse the asker. Jeff Bridgham Purdue University Graduate School Data Analyst
Aug 30, 2006 #5 PHV MIS Joined Nov 8, 2002 Messages 53,708 Location FR So the JetSQL "unique character" is ? (not %) Upvote 0 Downvote
Aug 30, 2006 #6 jebry Programmer Joined Aug 6, 2001 Messages 3,006 Location US Sorry That is correct, I was getting my wildcards confused. The ? is the single character wildcard not %. Good call PHV Jeff Bridgham Purdue University Graduate School Data Analyst Upvote 0 Downvote
Sorry That is correct, I was getting my wildcards confused. The ? is the single character wildcard not %. Good call PHV Jeff Bridgham Purdue University Graduate School Data Analyst