| Author |
Topic |
|
AskSQLTeam
Ask SQLTeam Question
0 Posts |
Posted - 2006-12-04 : 08:16:39
|
| Derek writes "I'm totally new to SQL and need some help.I need to write a query that will return rows where a specific field begins with a selected string.Example:My table is called rf_logI want to see all rows where the PACKSLIP begins with 'ORD000888'I tried:Select *from rf-log where PACKSLIP like 'ORD000888'This returns only rows where the packslip is = ORD000888I need to see all rows where the packslip begins with ORD000888.So packslip ORD000888-0, ORD000888-1 and ORD000888-2 should also be returned.Many thanks." |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-04 : 08:20:10
|
| [code]Select *from rf-log where PACKSLIP like 'ORD000888%'[/code]Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-04 : 08:20:15
|
| select * from rf_log where packslip LIKE 'ORD000888%'Peter LarssonHelsingborg, SwedenEcho On: |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-04 : 09:19:45
|
| It's called "the Harsh Effect"...Peter LarssonHelsingborg, Sweden |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-04 : 09:43:12
|
No..It's "The Peso Effect Rediscovered!"   Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-12-04 : 10:31:58
|
quote: Originally posted by harsh_athalye No..It's "The Peso Effect Rediscovered!"   Harsh AthalyeIndia."Nothing is Impossible"
Faster than Peso MadhivananFailing to plan is Planning to fail |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-04 : 10:36:57
|
quote: Faster than Peso
Rarely!Poster Average Posts----------------------------------Peter 20.50me 7.81 Way behind !Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-04 : 10:39:55
|
[code]Peso 08:20:15Harsh 08:20:10[/code]Seems like a five second lead to me Peter LarssonHelsingborg, Sweden |
 |
|
|
harsh_athalye
Master Smack Fu Yak Hacker
5581 Posts |
Posted - 2006-12-04 : 11:16:21
|
I was lucky this time! Harsh AthalyeIndia."Nothing is Impossible" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2006-12-04 : 11:20:46
|
| Sure. Just pure luck?Peter LarssonHelsingborg, Sweden |
 |
|
|
|