-----------------------------------------------------------
New Message on BDOTNET
-----------------------------------------------------------
From: GreatScorpion75
Message 3 in Discussion
Hi,
this
can be done as follows:
begin
declare @EventSessionID table
(
ROW_ID int
identity(1,1),
iEventSessionID
int
)
Insert into @EventSessionID
Select
iEventSessionID from emtEventSessionAttendee
where iEventSessionID =
@iEventSessionID
declare
@iMin int,
@iMax
int
set @iMin =
1
select @iMax
= MAX(ROW_ID) from @EventSessionID
while @iMin <=
@iMax
begin
if
exist (select @iRuleID=iRuleID from Rules where [EMAIL PROTECTED])
begin
.....................
....................
end
set @iMin = @iMin +
1
end
end
This
can also be done considering only iEventSessionID column but with the above
same logic in your case...
Regards
Naveen
-----Original Message-----
From: BalajiKrishnan
[mailto:[EMAIL PROTECTED]
Sent: 18 January 2005
10:28
To: BDOTNET
Subject: [Potential Spam] Loop thru temp
table + sql help
New Message on BDOTNET
Loop thru
temp table + sql help
Reply
Reply to Sender Recommend
Message 1 in
Discussion
From: BalajiKrishnan
In a trigger I have the following code,
declare @EventSessionID table (iEventSessionID
int)
Insert into
@EventSessionID
Select iEventSessionID from
emtEventSessionAttendee
where iEventSessionID =
@iEventSessionID
I need to Loop through this temp table to check the
following
if exist
(
select @iRuleID=iRuleID from Rules where
Sessionid=LoppID
)
proceed
How can I do this without using cursors.
Thanks
Balaji
View other groups in this
category.
-----------------------------------------------------------
To stop getting this e-mail, or change how often it arrives, go to your E-mail
Settings.
http://groups.msn.com/bdotnet/_emailsettings.msnw
Need help? If you've forgotten your password, please go to Passport Member
Services.
http://groups.msn.com/_passportredir.msnw?ppmprop=help
For other questions or feedback, go to our Contact Us page.
http://groups.msn.com/contact
If you do not want to receive future e-mail from this MSN group, or if you
received this message by mistake, please click the "Remove" link below. On the
pre-addressed e-mail message that opens, simply click "Send". Your e-mail
address will be deleted from this group's mailing list.
mailto:[EMAIL PROTECTED]