Re: Pro*C - column aliases in cursors

From: Kenneth C Stahl <BlueSax_at_Unforgettable.com>
Date: Thu, 16 Dec 1999 09:05:39 -0500
Message-ID: <3858F1B3.C7214C90_at_Unforgettable.com>


Clint Eastwood wrote:
>
> HiYa
>
> I was wondering in explicit cursors in SQL statements like
>
> EXEC SQL DECLARE orders_cur CURSOR FOR
> SELECT ordr.provider_order_num,
> ordr.account_code,
> ordr.enquiry_num,
> ordr.delivery_method_code ... yadda;
>
> if there is a point in giving them column aliases, as it seems that the
> examples just fetch into the variables, with the position being the key
> rather than like cursor for loops in PL/SQL
>
> IE
>
> EXEC SQL FETCH orders_cur INTO
> :ftchdOrd.provider_order_number:inds[0],
> :ftchdOrd.account_code:inds[1],
> :ftchdOrd.enquiry_num:inds[2],
> :ftchdOrd.delivery_method_code:inds[3],
>
> rather than as in a for loop....
>
> so (as I'm trying to save space on the line) is there any disadvantage
> to not aliasing the cols??

I can't think of why you would need aliases. Nothing stopping you from using them though. They might have some implication for dynamic sql 4 though. Received on Thu Dec 16 1999 - 15:05:39 CET

Original text of this message