Re: NextNumbers Tables
From: Pablo Sanchez <pablo_at_dev.null>
Date: Wed, 12 Feb 2003 15:02:18 -0600
Message-ID: <Xns93208ECE962EApingottpingottbah_at_216.166.71.233>
>
> Hmm, is the order of evaluation guaranteed?
Date: Wed, 12 Feb 2003 15:02:18 -0600
Message-ID: <Xns93208ECE962EApingottpingottbah_at_216.166.71.233>
Larry Coon <larry_at_assist.org> wrote in news:3E4A99BF.599C_at_assist.org:
>> 2) Set a local variable within the UPDATE: >> >> UPDATE mytable >> set _at_my_next_val = next_val, >> next_val = next_val + 1 >> ... >> COMMIT;
>
> Hmm, is the order of evaluation guaranteed?
I believe with ASE you can coerce it to do the right thing by using the local variable on the RHS.
> What's to stop a particular implementation from doing the second one
> first?
It's definitely implementation dependent which means that the vendor needs to document. I equate it to how C is documented to evaluate and stop evaluation on false from left to right.
-- Pablo Sanchez, High-Performance Database Engineering http://www.hpdbe.comReceived on Wed Feb 12 2003 - 22:02:18 CET