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.

Stored Procedures is Cursors...Anybody

5 posts in Product Futures Discussion Last posting was on 2008-01-11 04:16:25.0Z
jimmyc Posted on 2007-12-21 19:06:44.0Z
From: jimmyc <jmchios@gmail.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Stored Procedures is Cursors...Anybody
Date: Fri, 21 Dec 2007 11:06:44 -0800 (PST)
Organization: http://groups.google.com
Lines: 18
Message-ID: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com>
NNTP-Posting-Host: 155.104.37.17
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
X-Trace: posting.google.com 1198264005 21794 127.0.0.1 (21 Dec 2007 19:06:45 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 21 Dec 2007 19:06:45 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: w56g2000hsf.googlegroups.com; posting-host=155.104.37.17; posting-account=k5GGMwoAAADL1YWQr82mb5CiyFPnRVn_
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!w56g2000hsf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1953
Article PK: 97562

I would like to see Stored Procedures be accessed from a Cursor...


Something like this......
declare authors_scroll_crsr scroll cursor
for exec sp_get_authors 'CA'
.
.
.

This would really make life easier as a developer.
There have been many moments where that feature would have saved me
lots of time.


Any thoughts????

Jimmy


jimmyc Posted on 2007-12-21 19:09:33.0Z
From: jimmyc <jmchios@gmail.com>
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Stored Procedures is Cursors...Anybody
Date: Fri, 21 Dec 2007 11:09:33 -0800 (PST)
Organization: http://groups.google.com
Lines: 21
Message-ID: <a5a62a6b-24b7-47c2-bd28-ee205a52017d@a35g2000prf.googlegroups.com>
References: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com>
NNTP-Posting-Host: 155.104.37.17
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1198264173 22188 127.0.0.1 (21 Dec 2007 19:09:33 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Fri, 21 Dec 2007 19:09:33 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: a35g2000prf.googlegroups.com; posting-host=155.104.37.17; posting-account=k5GGMwoAAADL1YWQr82mb5CiyFPnRVn_
User-Agent: G2/1.0
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 1.1.4322; InfoPath.1),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newswest.sybase.com!newsfeed2.dallas1.level3.net!news.level3.com!postnews.google.com!a35g2000prf.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1954
Article PK: 97559

OOOOPS! I meant to write "Stored Procedured in Cursors..."

On Dec 21, 2:06 pm, jimmyc <jmch...@gmail.com> wrote:
> I would like to see Stored Procedures be accessed from a Cursor...
>
> Something like this......
> declare authors_scroll_crsr scroll cursor
> for exec sp_get_authors  'CA'
> .
> .
> .
>
> This would really make life easier as a developer.
> There have been many moments where that feature would have saved me
> lots of time.
>
> Any thoughts????
>
> Jimmy


Carl Kayser Posted on 2007-12-27 15:06:28.0Z
From: "Carl Kayser" <kayser_c@bls.gov>
Newsgroups: sybase.public.ase.product_futures_discussion
References: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com> <a5a62a6b-24b7-47c2-bd28-ee205a52017d@a35g2000prf.googlegroups.com>
Subject: Re: Stored Procedures is Cursors...Anybody
Lines: 31
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2900.3138
X-RFC2646: Format=Flowed; Original
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.3198
NNTP-Posting-Host: 146.142.34.192
X-Original-NNTP-Posting-Host: 146.142.34.192
Message-ID: <4773bf74$1@forums-1-dub>
Date: 27 Dec 2007 07:06:28 -0800
X-Trace: forums-1-dub 1198767988 146.142.34.192 (27 Dec 2007 07:06:28 -0800)
X-Original-Trace: 27 Dec 2007 07:06:28 -0800, 146.142.34.192
X-Authenticated-User: ase1251
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1956
Article PK: 97560

"jimmyc" <jmchios@gmail.com> wrote in message
news:a5a62a6b-24b7-47c2-bd28-ee205a52017d@a35g2000prf.googlegroups.com...
OOOOPS! I meant to write "Stored Procedured in Cursors..."

On Dec 21, 2:06 pm, jimmyc <jmch...@gmail.com> wrote:
> I would like to see Stored Procedures be accessed from a Cursor...
>
> Something like this......
> declare authors_scroll_crsr scroll cursor
> for exec sp_get_authors 'CA'
> .
> .
> .
>
> This would really make life easier as a developer.
> There have been many moments where that feature would have saved me
> lots of time.
>
> Any thoughts????
>
> Jimmy

Hmmmm, I don't quite see your goal. What is it that is being, well, shall I
say, "variableized" in your logic? Is it 'CA', 'MD', "VA', etc? Or the
name of a stored procedure (sp_get_authors)? Or something else? I suspect
that 'execute immediate' can be used to solve your problem ... if you could
be more specific.


species8472 Posted on 2007-12-24 11:16:18.0Z
From: Species8472 <species8472@ergens.op.het.net>
User-Agent: Thunderbird 2.0.0.9 (Macintosh/20071031)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Stored Procedures is Cursors...Anybody
References: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com>
In-Reply-To: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: a82-94-1-71.adsl.xs4all.nl
X-Original-NNTP-Posting-Host: a82-94-1-71.adsl.xs4all.nl
Message-ID: <476f9502$1@forums-1-dub>
Date: 24 Dec 2007 03:16:18 -0800
X-Trace: forums-1-dub 1198494978 82.94.1.71 (24 Dec 2007 03:16:18 -0800)
X-Original-Trace: 24 Dec 2007 03:16:18 -0800, a82-94-1-71.adsl.xs4all.nl
Lines: 24
X-Authenticated-User: techsupp
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1955
Article PK: 97565


jimmyc wrote:
> I would like to see Stored Procedures be accessed from a Cursor...
>
>
> Something like this......
> declare authors_scroll_crsr scroll cursor
> for exec sp_get_authors 'CA'
> .
> .
> .
>
> This would really make life easier as a developer.
> There have been many moments where that feature would have saved me
> lots of time.
>
>
> Any thoughts????
>
> Jimmy

You can setup a proc as a proxy table and the select from it from your
cursor.

joop


Jeff Tallman Posted on 2008-01-11 04:16:25.0Z
From: Jeff Tallman <tallman@sybase.com>
User-Agent: Thunderbird 2.0.0.9 (Windows/20071031)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.product_futures_discussion
Subject: Re: Stored Procedures is Cursors...Anybody
References: <262d4aae-8031-4090-aaf3-93decb3f8462@w56g2000hsf.googlegroups.com> <476f9502$1@forums-1-dub>
In-Reply-To: <476f9502$1@forums-1-dub>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: c-68-80-223-43.hsd1.pa.comcast.net
X-Original-NNTP-Posting-Host: c-68-80-223-43.hsd1.pa.comcast.net
Message-ID: <4786ed99$1@forums-1-dub>
Date: 10 Jan 2008 20:16:25 -0800
X-Trace: forums-1-dub 1200024985 68.80.223.43 (10 Jan 2008 20:16:25 -0800)
X-Original-Trace: 10 Jan 2008 20:16:25 -0800, c-68-80-223-43.hsd1.pa.comcast.net
Lines: 36
X-Authenticated-User: workspace
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.product_futures_discussion:1957
Article PK: 97561

One of the problems here is you would have to designate which result set
from the proc is the one the cursor should cursor over - and then the
result set would have to be fully materialized to a work table -
especially if attempting a scrolling cursor......

....so the only way is suggested below - to use a proxy table mapped to
the proc call as the proxy table effectively maps the expected outputs -
although you have to be careful as it isn't always perfect (i.e.
multiple queries with same result columns).

Species8472 wrote:
> jimmyc wrote:
>> I would like to see Stored Procedures be accessed from a Cursor...
>>
>>
>> Something like this......
>> declare authors_scroll_crsr scroll cursor
>> for exec sp_get_authors 'CA'
>> .
>> .
>> .
>>
>> This would really make life easier as a developer.
>> There have been many moments where that feature would have saved me
>> lots of time.
>>
>>
>> Any thoughts????
>>
>> Jimmy
>
> You can setup a proc as a proxy table and the select from it from your
> cursor.
>
> joop