Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
lauramayer
Posting Yak Master
152 Posts |
Posted - 2005-09-01 : 10:34:05
|
Morning,Is there a way to add a prefix to a search criteria? I have this query where I have to prepend 'V-' to the search criteria. This is the query:SELECT distinct TrailerIDfrom Yardcheck.dbo.vwTrailerHistory where TrailerID = 'V + '-' + 525678' It doesn't work of course but I can't seem to make it add the V- value.Thanks as always for any helpLaura |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-09-01 : 10:36:13
|
| If TrailerId column is varchar datatype, then try thisSELECT distinct TrailerIDfrom Yardcheck.dbo.vwTrailerHistory where TrailerID = 'V-' + '525678'MadhivananFailing to plan is Planning to fail |
 |
|
|
lauramayer
Posting Yak Master
152 Posts |
Posted - 2005-09-01 : 10:37:31
|
Bloody brilliant Thanks so muchLaura |
 |
|
|
|
|
|