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 |
reda
Starting Member
2 Posts |
Posted - 2007-10-19 : 10:19:05
|
hello i have this query in sp select * from voipswitch.dbo.viewgwclientsfinal where ( voipswitch.dbo.viewgwclientsfinal.login between (select sales.dbo.range.rangestart from sales.dbo.range where sales.dbo.range.rangestart in (select sales.dbo.range.rangestart from sales.dbo.range where serviceid=@serviceid)) and (select sales.dbo.range.rangeend from sales.dbo.range where sales.dbo.range.rangeend in (select sales.dbo.range.rangeend from sales.dbo.range where serviceid=@serviceid)) ) the error comes when i have more than one record in range table does there is any way to do this query in this way instead of using cursor ??thanks in advance |
|
Zoroaster
Aged Yak Warrior
702 Posts |
Posted - 2007-10-19 : 10:27:44
|
What type of value is rangestart? Are you looking for values from the earliest rangestart to the latest rangeend? What is the requirement? Future guru in the making. |
 |
|
reda
Starting Member
2 Posts |
Posted - 2007-10-21 : 05:42:23
|
the type of value in rangestart is char i have service (one ) and range (many ) so there is mange ranges for the one service i have to get the all the records that have ranges belows to this service thanks in advance |
 |
|
|
|
|