Re: Cursor for loops
From: Agoston Bejo (gusz1_at_freemail.hu)
Date: 10/12/04
- Next message: David Portas: "Re: Cursor for loops"
- Previous message: David Portas: "RE: Cursor for loops"
- In reply to: Ian Oldbury: "Re: Cursor for loops"
- Next in thread: David Portas: "Re: Cursor for loops"
- Reply: David Portas: "Re: Cursor for loops"
- Reply: Ian Oldbury: "Re: Cursor for loops"
- Reply: Tibor Karaszi: "Re: Cursor for loops"
- Messages sorted by: [ date ] [ thread ]
Date: Tue, 12 Oct 2004 11:56:45 +0200
No, no, I didn't mean simply 'for loops', but 'cursor for loops'.
They look like this in Oracle:
FOR mycursor IN (SELECT PERSON_ID, NAME FROM T_PERSON)
LOOP
doSomething(mycursor.PERSON_ID);
END LOOP;
I think this is a very useful construct, therefore I'm looking for something
similar in T-SQL.
"Ian Oldbury" <ian_oldbury@_NO_msn_SPAM_.com> wrote in message
news:Orj1$wDsEHA.2136@TK2MSFTNGP14.phx.gbl...
> i don't know Oracle however have a look at ....
>
> WHILE @i < 100
>
> BEGIN
>
> -- your task
>
> SET @i = @i + 1
>
> END
>
>
> i hope it helps
> ian
>
> "Agoston Bejo" <gusz1@freemail.hu> wrote in message
> news:Oy%23fjvDsEHA.516@TK2MSFTNGP09.phx.gbl...
> > Is there something in T-SQL that is the same as FOR loops in Oracle
> > PL/SQL?
> > if not, what is the closest equivalent?
> >
> >
> >
>
>
- Next message: David Portas: "Re: Cursor for loops"
- Previous message: David Portas: "RE: Cursor for loops"
- In reply to: Ian Oldbury: "Re: Cursor for loops"
- Next in thread: David Portas: "Re: Cursor for loops"
- Reply: David Portas: "Re: Cursor for loops"
- Reply: Ian Oldbury: "Re: Cursor for loops"
- Reply: Tibor Karaszi: "Re: Cursor for loops"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|