Can you just open the cursor, fetch the first row, and then close the cursor?

Include "optimize for 1 row"

James Campbell

> --------------- MESSAGE db2eug.v002.n207.10 ---------------
> 
> From: Ranjana Deshmukh <[EMAIL PROTECTED]>
> Subject: Fetch First n rows only ???
> Date: Thu, 15 Nov 2001 16:40:03 +0530
> MIME-Version: 1.0
> Content-Type: text/plain;
>       charset="iso-8859-1"
> 
> Basically I am looking for the equivalent of rownum in Oracle. 
> 
> I have a scenario where I have to get the first row in the selected set. 
> I have found that fetch first n rows only does the same for me. 
> 
> But this does not seem to work from inside a SQL stored procedure. Whenever
> I give this clause with the select statement inside a SQL stored procedure .
> It says unexpected token. 
> 
> What should I use ? Can anyone help. 
> 
> Thanks 
> Ranjana
> 

James A Campbell

=====
To unsubscribe, send 'unsubscribe' to [EMAIL PROTECTED]
For other info (and scripts), see http://people.mn.mediaone.net/scottrmcleod

Reply via email to