Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

AEP Result Ordered.

2 posts in AEP Last posting was on 2005-08-09 16:18:32.0Z
Alfredo C3 Posted on 2005-08-09 01:44:20.0Z
From: "Alfredo C3" <alfredo@myhostserver.com>
Newsgroups: Advantage.AEP
Subject: AEP Result Ordered.
Date: Mon, 8 Aug 2005 18:44:20 -0700
Lines: 21
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1506
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1506
NNTP-Posting-Host: 201.138.198.119
Message-ID: <42f80bd8@solutions.advantagedatabase.com>
X-Trace: 8 Aug 2005 19:50:16 -0700, 201.138.198.119
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!201.138.198.119
Xref: solutions.advantagedatabase.com Advantage.AEP:444
Article PK: 1103736

Hi,

I need to order by a field the result of my stored procedure.

I can't do the following,
Insert into my
table
Select myFields
from MyTable
order by MyOrderField.

The order statement is not valid in the Insert statement.
Any tip?

Thanks in advance
best regards

Alfredo.


Lance Schmidt Posted on 2005-08-09 16:18:32.0Z
From: "Lance Schmidt" <LanceSc@ExtendSys.com>
Newsgroups: Advantage.AEP
References: <42f80bd8@solutions.advantagedatabase.com>
Subject: Re: AEP Result Ordered.
Date: Tue, 9 Aug 2005 10:18:32 -0600
Lines: 38
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.2527
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2527
X-RFC2646: Format=Flowed; Original
NNTP-Posting-Host: 198.102.102.91
Message-ID: <42f8d921@solutions.advantagedatabase.com>
X-Trace: 9 Aug 2005 10:26:09 -0700, 198.102.102.91
Path: solutions.advantagedatabase.com!solutions.advantagedatabase.com!198.102.102.91
Xref: solutions.advantagedatabase.com Advantage.AEP:446
Article PK: 1103734

Hi Alfredo,

I suggest trying a SELECT INTO statement rather than an INSERT INTO
statement.

SELECT myFields INTO my table FROM MyTable ORDER BY MyOrderField.

Best Regards,

Lance Schmidt
Advantage R&D
LanceSc@ExtendSys.com

"Alfredo C3" <alfredo@myhostserver.com> wrote in message
news:42f80bd8@solutions.advantagedatabase.com...
> Hi,
>
> I need to order by a field the result of my stored procedure.
>
> I can't do the following,
> Insert into my
> table
> Select myFields
> from MyTable
> order by MyOrderField.
>
> The order statement is not valid in the Insert statement.
> Any tip?
>
> Thanks in advance
> best regards
>
> Alfredo.
>
>
>