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 |
wided
Posting Yak Master
218 Posts |
Posted - 2015-05-04 : 07:35:12
|
I need an application that can read data:mytablecol1 col2c001 401000c002 402000C003 411000C004 412000C005 421000C006 422000c007 423000I have 2 input variables, such as 40 and 42 or 40 and 41 or 41 and 42how to write the query, if I give 40 and 42(between and starts, 2 at a time) |
|
jleitao
Posting Yak Master
100 Posts |
Posted - 2015-05-04 : 07:45:47
|
not sure if is that you really need. PLEASE, POST YOUR EXPECTED OUTPUT.however try this:SELECT * from mytablewhere left(col2,2) between 40 and 42------------------------PS - Sorry my bad english |
|
|
wided
Posting Yak Master
218 Posts |
Posted - 2015-05-04 : 07:58:14
|
the input variables can be for example 40 and 421 |
|
|
Kristen
Test
22859 Posts |
Posted - 2015-05-04 : 14:27:36
|
PLEASE, POST YOUR EXPECTED OUTPUT |
|
|
|
|
|