Re: is there a simpler way to do this?

From: Keith Langer <tanalbit_at_aol.com>
Date: 22 Feb 2003 12:18:21 -0800
Message-ID: <15c7b652.0302221218.3b4894b6_at_posting.google.com>


Okay, thanks guys. This one looks so obvious now, but I couldn't find it in the newsgroups. SQL Server handles "select into" only with tables.

Keith

Jeff Piatt <member25196_at_dbforums.com> wrote in message news:<2560987.1045883724_at_dbforums.com>...
> Yes, use a singleton select (select... into...) along these lines:
>
> declare
> n_ID daily_changes.change_ID%TYPE;
> begin
> select max(change_ID)
> into n_ID
> from daily_changes
> where daily_id = 1;
> dbms_output.put_line(n_ID);
> end;
Received on Sat Feb 22 2003 - 21:18:21 CET

Original text of this message