[Date Prev][Date Next][Thread Prev][Thread Next]
[Author Index] [Date Index] [Thread Index]
[SQR-USERS Info] [SQRUG Home Page]

Re: SQR 3728



I think you have to use an sql section, I'm not into Oracle but Sybase
(I thought Oracle doesn't support temptables?) but try something like
this:

begin-sql
   select location
   into   temp
   from   locations
end-sql

Or just:

begin-procedure whatever
...
begin-sql
   create table temp (location  datatype)
end-sql
...
begin-select

location  &location
   do proc_insert
from locations
end-select
...
end-procedure

begin-procedure proc_insert
begin-sql
   insert into temp values (&_location)
end-sql
end-procedure


Arjan






--- Philippe Godin <philippe.godin@VIDEOTRON.CA> wrote:
> Good day,
>
>     I've went thru the library to find my answer but couldn't find
> it,
> perhaps someone can help...
>
>  What i'm trying to do is a select into command. This is what I have:
>
> Begin-Select
> location
> into TEMP Test
> from locations
> end-select
>
>     This gives me the following error:
>
> Error on line 9:
>    (SQR 3728) SQL expression not ended, perhaps missing &name.
> from locations
>
> Errors were found in the program file.
>
> SQR: Program Aborting.
>
> Cursor Status:
>
>  Cursor #1:
>  Not processed due to report errors.
>
> Anyone knows how I can achieve this and if using this statement can
> be done
> by a user that don't have the rights to create a table???
>
> TIA
>
> Philippe Godin
> CiM Maintenance Inc.


__________________________________________________
Do You Yahoo!?
Yahoo! Auctions - buy the things you want at great prices
http://auctions.yahoo.com/