I have been asked to create 4 wildcard selects one of which must have a leading character.
I take it all a wildcard select is, is something like this:
SELECT * FROM example WHERE age LIKE '2%' ;
The one thing I'm not sure about is the leading character thing?
Anybody got any example of a basic select wildcard query with leading character in it?
cheers
Wildcards with leading characters help?
Moderator: General Moderators
Re: Wildcards with leading characters help?
You've already got it, right there, unless they're asking for something different--oh, assuming that the field is Text. If `age` is a numeric field (and you should ordinarily never store someone's AGE in a table, it will be meaningless next year! always store the date of birth, or at least year of birth), you would need to use a numeric function, such as WHERE age BETWEEN 20 and 29.recci wrote:I have been asked to create 4 wildcard selects one of which must have a leading character.
I take it all a wildcard select is, is something like this:
SELECT * FROM example WHERE age LIKE '2%' ;
The one thing I'm not sure about is the leading character thing?
Anybody got any example of a basic select wildcard query with leading character in it?
cheers