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 |
|
GaneshRamanan
Starting Member
40 Posts |
Posted - 2011-01-10 : 00:53:36
|
| insert into ##TmpScheduleDetail Exec [OPM].[Appointmentextend] @DoctorID,@AppointmentDate,@FromTime,@ToTime where @fromtime not between starttime and startimecan i restrict it before inputing into the table if starttime returns multiple value |
|
|
MIK_2008
Master Smack Fu Yak Hacker
1054 Posts |
Posted - 2011-01-10 : 02:07:46
|
| what is the starttime? is it what you are pointing to @FromTime? If so, please note that a variable can only hold one value at a time. and can never be assigned with multiple values. Any how you can bound the execution of the required statements via If... e.g.IF (@FromTime is not null and @Fromtime >...)Begin insert into ... Exec .... ....End |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-01-10 : 11:00:46
|
| i assume you know the consequences of using ## tables especially when code is executed parallely------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|