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.

ISQL Error -185

5 posts in General Discussion Last posting was on 2004-03-05 15:24:30.0Z
Nagendra Makineni Posted on 2004-03-04 20:06:51.0Z
From: "Nagendra Makineni" <nagendra.makineni@brinksinc.com>
Newsgroups: ianywhere.public.general
Subject: ISQL Error -185
Lines: 30
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 12.172.207.3
X-Original-NNTP-Posting-Host: 12.172.207.3
Message-ID: <40478c5b@forums-1-dub>
Date: 4 Mar 2004 12:06:51 -0800
X-Trace: forums-1-dub 1078430811 12.172.207.3 (4 Mar 2004 12:06:51 -0800)
X-Original-Trace: 4 Mar 2004 12:06:51 -0800, 12.172.207.3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2706
Article PK: 6177

Dear Friends

I am getting ISQL Error -185 "Select returns more than one row" when I run
the following watcom SQL commands in ASA ISQL Version 8.02.

The code is:

BEGIN

DECLARE @selstatement text;

SET @selstatement = 'SELECT * from tblItemType';

EXECUTE IMMEDIATE @selstatement;

END

I have two different servers one for QA and one for Development running same
version of ISQL. I have no issues running on Development Server and
returned the results that I expected. But running the same code on
different Server is giving me the problem. There should some setting some
where which I am not sure, to be set to ON or Off.

Could you please let me know, If you have and clue on what is going on.

Thanks a lot.

Nagendra


Reg Domaratzki Posted on 2004-03-04 20:28:35.0Z
From: "Reg Domaratzki" <Spam_bad_rdomarat@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <40478c5b@forums-1-dub>
Subject: Re: ISQL Error -185
Lines: 50
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: rdomarat-pc.sybase.com
X-Original-NNTP-Posting-Host: rdomarat-pc.sybase.com
Message-ID: <40479173$1@forums-1-dub>
Date: 4 Mar 2004 12:28:35 -0800
X-Trace: forums-1-dub 1078432115 172.31.143.163 (4 Mar 2004 12:28:35 -0800)
X-Original-Trace: 4 Mar 2004 12:28:35 -0800, rdomarat-pc.sybase.com
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2708
Article PK: 6181

The ability to use EXECUTE IMMEDIATE and return a result set was not
introduced until version 9. I suspect that your development server is
running v9, and you QA server is running v8. Connect to each database using
ISQL and execute "select @@version" to verify this.

--
Reg Domaratzki, Sybase iAnywhere Solutions
Sybase Certified Professional - Sybase ASA Developer Version 8
Please reply only to the newsgroup

iAnywhere Developer Community : http://www.ianywhere.com/developer
ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
-> Choose SQL Anywhere Studio
-> Set "Platform Preview" and "Time Frame" to ALL

"Nagendra Makineni" <nagendra.makineni@brinksinc.com> wrote in message
news:40478c5b@forums-1-dub...
> Dear Friends
>
> I am getting ISQL Error -185 "Select returns more than one row" when I run
> the following watcom SQL commands in ASA ISQL Version 8.02.
>
> The code is:
>
> BEGIN
>
> DECLARE @selstatement text;
>
> SET @selstatement = 'SELECT * from tblItemType';
>
> EXECUTE IMMEDIATE @selstatement;
>
> END
>
> I have two different servers one for QA and one for Development running
same
> version of ISQL. I have no issues running on Development Server and
> returned the results that I expected. But running the same code on
> different Server is giving me the problem. There should some setting some
> where which I am not sure, to be set to ON or Off.
>
> Could you please let me know, If you have and clue on what is going on.
>
> Thanks a lot.
>
> Nagendra
>
>


Nagendra Makineni Posted on 2004-03-05 15:03:57.0Z
From: "Nagendra Makineni" <nagendra.makineni@brinksinc.com>
Newsgroups: ianywhere.public.general
References: <40478c5b@forums-1-dub> <40479173$1@forums-1-dub>
Subject: Re: ISQL Error -185
Lines: 73
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 12.172.207.3
X-Original-NNTP-Posting-Host: 12.172.207.3
Message-ID: <404896dd$1@forums-1-dub>
Date: 5 Mar 2004 07:03:57 -0800
X-Trace: forums-1-dub 1078499037 12.172.207.3 (5 Mar 2004 07:03:57 -0800)
X-Original-Trace: 5 Mar 2004 07:03:57 -0800, 12.172.207.3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2722
Article PK: 6196

Reg

Thank you so much for the fast reply. You are 100% right. I got two
different versions running, 8.0 on QA and 9.0 on Development. I spoke with
my manager and he said we can not migrate to 9.0 on QA and productions yet.
So I need to get the work around to get the multiple records from EXECUTE
IMMEDIATE.

Could you please help, if you have the solution for it.

I really appreciate your help on this.

THANKS AGAIN
Nagendra

"Reg Domaratzki" <Spam_bad_rdomarat@ianywhere.com> wrote in message
news:40479173$1@forums-1-dub...
> The ability to use EXECUTE IMMEDIATE and return a result set was not
> introduced until version 9. I suspect that your development server is
> running v9, and you QA server is running v8. Connect to each database
using
> ISQL and execute "select @@version" to verify this.
>
> --
> Reg Domaratzki, Sybase iAnywhere Solutions
> Sybase Certified Professional - Sybase ASA Developer Version 8
> Please reply only to the newsgroup
>
> iAnywhere Developer Community : http://www.ianywhere.com/developer
> ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
> -> Choose SQL Anywhere Studio
> -> Set "Platform Preview" and "Time Frame" to ALL
>
> "Nagendra Makineni" <nagendra.makineni@brinksinc.com> wrote in message
> news:40478c5b@forums-1-dub...
> > Dear Friends
> >
> > I am getting ISQL Error -185 "Select returns more than one row" when I
run
> > the following watcom SQL commands in ASA ISQL Version 8.02.
> >
> > The code is:
> >
> > BEGIN
> >
> > DECLARE @selstatement text;
> >
> > SET @selstatement = 'SELECT * from tblItemType';
> >
> > EXECUTE IMMEDIATE @selstatement;
> >
> > END
> >
> > I have two different servers one for QA and one for Development running
> same
> > version of ISQL. I have no issues running on Development Server and
> > returned the results that I expected. But running the same code on
> > different Server is giving me the problem. There should some setting
some
> > where which I am not sure, to be set to ON or Off.
> >
> > Could you please let me know, If you have and clue on what is going on.
> >
> > Thanks a lot.
> >
> > Nagendra
> >
> >
>
>


Breck Carter [TeamSybase] Posted on 2004-03-05 15:10:32.0Z
From: "Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com>
Newsgroups: ianywhere.public.general
Subject: Re: ISQL Error -185
Organization: RisingRoad Professional Services
Reply-To: NOSPAM__bcarter@risingroad.com
Message-ID: <ft5h40tef2tfv61l5ojgubdit2t5qd7mbg@4ax.com>
References: <40478c5b@forums-1-dub> <40479173$1@forums-1-dub> <404896dd$1@forums-1-dub>
X-Newsreader: Forte Agent 2.0/32.640
MIME-Version: 1.0
Content-Type: text/plain; charset=us-ascii
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: bcarter.sentex.ca
X-Original-NNTP-Posting-Host: bcarter.sentex.ca
Date: 5 Mar 2004 07:10:32 -0800
X-Trace: forums-1-dub 1078499432 64.7.134.118 (5 Mar 2004 07:10:32 -0800)
X-Original-Trace: 5 Mar 2004 07:10:32 -0800, bcarter.sentex.ca
Lines: 96
X-Authenticated-User: TeamPS
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2723
Article PK: 6199

Try this...

BEGIN

DECLARE @selstatement text;

SET @selstatement = 'SELECT * INTO #t from tblItemType';

EXECUTE IMMEDIATE @selstatement;

SELECT * FROM #t;

END

On 5 Mar 2004 07:03:57 -0800, "Nagendra Makineni"

<nagendra.makineni@brinksinc.com> wrote:

>Reg
>
>Thank you so much for the fast reply. You are 100% right. I got two
>different versions running, 8.0 on QA and 9.0 on Development. I spoke with
>my manager and he said we can not migrate to 9.0 on QA and productions yet.
>So I need to get the work around to get the multiple records from EXECUTE
>IMMEDIATE.
>
>Could you please help, if you have the solution for it.
>
>I really appreciate your help on this.
>
>THANKS AGAIN
>Nagendra
>
>
>"Reg Domaratzki" <Spam_bad_rdomarat@ianywhere.com> wrote in message
>news:40479173$1@forums-1-dub...
>> The ability to use EXECUTE IMMEDIATE and return a result set was not
>> introduced until version 9. I suspect that your development server is
>> running v9, and you QA server is running v8. Connect to each database
>using
>> ISQL and execute "select @@version" to verify this.
>>
>> --
>> Reg Domaratzki, Sybase iAnywhere Solutions
>> Sybase Certified Professional - Sybase ASA Developer Version 8
>> Please reply only to the newsgroup
>>
>> iAnywhere Developer Community : http://www.ianywhere.com/developer
>> ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
>> -> Choose SQL Anywhere Studio
>> -> Set "Platform Preview" and "Time Frame" to ALL
>>
>> "Nagendra Makineni" <nagendra.makineni@brinksinc.com> wrote in message
>> news:40478c5b@forums-1-dub...
>> > Dear Friends
>> >
>> > I am getting ISQL Error -185 "Select returns more than one row" when I
>run
>> > the following watcom SQL commands in ASA ISQL Version 8.02.
>> >
>> > The code is:
>> >
>> > BEGIN
>> >
>> > DECLARE @selstatement text;
>> >
>> > SET @selstatement = 'SELECT * from tblItemType';
>> >
>> > EXECUTE IMMEDIATE @selstatement;
>> >
>> > END
>> >
>> > I have two different servers one for QA and one for Development running
>> same
>> > version of ISQL. I have no issues running on Development Server and
>> > returned the results that I expected. But running the same code on
>> > different Server is giving me the problem. There should some setting
>some
>> > where which I am not sure, to be set to ON or Off.
>> >
>> > Could you please let me know, If you have and clue on what is going on.
>> >
>> > Thanks a lot.
>> >
>> > Nagendra
>> >
>> >
>>
>>
>

--
SQL Anywhere Studio 9 Developer's Guide
Buy the book: http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
bcarter@risingroad.com
Mobile and Distributed Enterprise Database Applications
www.risingroad.com


Nagendra Makineni Posted on 2004-03-05 15:24:30.0Z
From: "Nagendra Makineni" <nagendra.makineni@brinksinc.com>
Newsgroups: ianywhere.public.general
References: <40478c5b@forums-1-dub> <40479173$1@forums-1-dub> <404896dd$1@forums-1-dub> <ft5h40tef2tfv61l5ojgubdit2t5qd7mbg@4ax.com>
Subject: Re: ISQL Error -185
Lines: 117
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1158
X-MIMEOLE: Produced By Microsoft MimeOLE V6.00.2800.1165
NNTP-Posting-Host: 12.172.207.3
X-Original-NNTP-Posting-Host: 12.172.207.3
Message-ID: <40489bae$1@forums-1-dub>
Date: 5 Mar 2004 07:24:30 -0800
X-Trace: forums-1-dub 1078500270 12.172.207.3 (5 Mar 2004 07:24:30 -0800)
X-Original-Trace: 5 Mar 2004 07:24:30 -0800, 12.172.207.3
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:2724
Article PK: 6197

Breck

Wow! It works. I am so happy that I got the solution. I opened case with
Sybase on this. Now this issue got resoluved, I believe. Could you please
look at my other issue on this board by Subject "Unable to get Output
Parameter". Could you please help me if you have any solution on this!

Thanks a lot.

I think this issue has been resolved.

"Breck Carter [TeamSybase]" <NOSPAM__bcarter@risingroad.com> wrote in
message news:ft5h40tef2tfv61l5ojgubdit2t5qd7mbg@4ax.com...
> Try this...
>
> BEGIN
>
> DECLARE @selstatement text;
>
> SET @selstatement = 'SELECT * INTO #t from tblItemType';
>
> EXECUTE IMMEDIATE @selstatement;
>
> SELECT * FROM #t;
>
> END
>
> On 5 Mar 2004 07:03:57 -0800, "Nagendra Makineni"
> <nagendra.makineni@brinksinc.com> wrote:
>
> >Reg
> >
> >Thank you so much for the fast reply. You are 100% right. I got two
> >different versions running, 8.0 on QA and 9.0 on Development. I spoke
with
> >my manager and he said we can not migrate to 9.0 on QA and productions
yet.
> >So I need to get the work around to get the multiple records from EXECUTE
> >IMMEDIATE.
> >
> >Could you please help, if you have the solution for it.
> >
> >I really appreciate your help on this.
> >
> >THANKS AGAIN
> >Nagendra
> >
> >
> >"Reg Domaratzki" <Spam_bad_rdomarat@ianywhere.com> wrote in message
> >news:40479173$1@forums-1-dub...
> >> The ability to use EXECUTE IMMEDIATE and return a result set was not
> >> introduced until version 9. I suspect that your development server is
> >> running v9, and you QA server is running v8. Connect to each database
> >using
> >> ISQL and execute "select @@version" to verify this.
> >>
> >> --
> >> Reg Domaratzki, Sybase iAnywhere Solutions
> >> Sybase Certified Professional - Sybase ASA Developer Version 8
> >> Please reply only to the newsgroup
> >>
> >> iAnywhere Developer Community : http://www.ianywhere.com/developer
> >> ASA Patches and EBFs : http://downloads.sybase.com/swx/sdmain.stm
> >> -> Choose SQL Anywhere Studio
> >> -> Set "Platform Preview" and "Time Frame" to ALL
> >>
> >> "Nagendra Makineni" <nagendra.makineni@brinksinc.com> wrote in message
> >> news:40478c5b@forums-1-dub...
> >> > Dear Friends
> >> >
> >> > I am getting ISQL Error -185 "Select returns more than one row" when
I
> >run
> >> > the following watcom SQL commands in ASA ISQL Version 8.02.
> >> >
> >> > The code is:
> >> >
> >> > BEGIN
> >> >
> >> > DECLARE @selstatement text;
> >> >
> >> > SET @selstatement = 'SELECT * from tblItemType';
> >> >
> >> > EXECUTE IMMEDIATE @selstatement;
> >> >
> >> > END
> >> >
> >> > I have two different servers one for QA and one for Development
running
> >> same
> >> > version of ISQL. I have no issues running on Development Server and
> >> > returned the results that I expected. But running the same code on
> >> > different Server is giving me the problem. There should some setting
> >some
> >> > where which I am not sure, to be set to ON or Off.
> >> >
> >> > Could you please let me know, If you have and clue on what is going
on.
> >> >
> >> > Thanks a lot.
> >> >
> >> > Nagendra
> >> >
> >> >
> >>
> >>
> >
>
> --
> SQL Anywhere Studio 9 Developer's Guide
> Buy the book:
http://www.amazon.com/exec/obidos/ASIN/1556225067/risingroad-20
> bcarter@risingroad.com
> Mobile and Distributed Enterprise Database Applications
> www.risingroad.com