View Single Post

   
  #4 (permalink)  
Old 04-08-2008, 02:50 PM
Rob Verschoor
 
Posts: n/a
Default Re: Multi version procedures ?

Yes, this is possible; in fact, in a number of different ways.
Chapter 1 of my book "Tips, Tricks & Recipes for Sybase ASE"
(www.sypron.nl/ttr) tells you how to do this...

HTH,

Rob
-------------------------------------------------------------
Rob Verschoor

Certified Sybase Professional DBA for ASE 12.5/12.0/11.5/11.0
and Replication Server 12.5

Author of "Tips, Tricks & Recipes for Sybase ASE" and
"The Complete Sybase ASE Quick Reference Guide"
Online orders accepted at http://www.sypron.nl/shop

mailto:rob@DO.NOT.SPAM.sypron.nl.REMOVE.THIS.DECOY
http://www.sypron.nl
Sypron B.V., P.O.Box 10695, 2501HR Den Haag, The Netherlands
-------------------------------------------------------------

"Dale Kerr" <dalekerrNOSPAM@lycos.com> wrote in message
news:9710df07.0308141730.369147b2@posting.google.c om...
> I'm guessing that this can't be done, but am I able to write a

single
> procedure using functions and environment variables that don't exist
> in that version, but using an IF statement to execute the correct

code
> based on the ASE version?
>
> For example:
>
> IF version >= 12.5
> run this
> ELSE
> run this instead
>
> If I execute my procedure on 12.5, no problem. But to execute on

12.0,
> I will get the errors:
>
> Msg 137, Level 15, State 2:
> Must declare variable ...
>
> or
>
> Msg 195, Level 15, State 10:
> ... is not a recognized built-in function name.
>
> So is there any way to successfully compile the procedure, and avoid
> these errors, or do I really have to write a separate procedure per
> ASE version (unless I use a common denominator approach)?
>
> Regards,
>
> Dale Kerr
> Melbourne, Australia


Reply With Quote