🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: borland.public.interbase.sql
Article #424

Is this safe?

#424
From: Dan K
Date: Fri, 07 Mar 2008 18:50
20 lines
1625 bytes
Hi,

I need to write some SQL to flip the values in a table or two.  Here's an
example of what I want to do.  It works, but I'm not sure if it's safe.  All
of our users are using Interbase 7.1.  In my example, I'm flipping tax2 with
tax1 and using tax3 as a placeholder.  I know that tax 3 is null, so that
part is safe.  Will the order of operation always be the same?

update taxes set
  tax_tax3desc = tax_tax1desc,
  tax_tax1desc = tax_tax2desc,
  tax_tax2desc = tax_tax3desc,
  tax_tax3desc = null
where storenumber_Id = 3

Strange looking, but it seems to work.

Thanks!

Dan K
Technical Details
Message-ID: <47d18e36$1@newsgroups.borland.com>
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.86.MISMATCH!news.astraweb.com!border1.a.newsrouter.astraweb.com!club-internet.fr!feedme-small.clubint.net!feeder1-1.proxad.net!proxad.net!feeder1-2.proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail

Show Full Headers
Complete Article Headers
X-Google-Thread: 114a0e,fbab0f944ae6f5eb,start
X-Google-Attributes: gid114a0e,public,usenet
X-Google-Language: ENGLISH,ASCII-7-bit
From: "Dan K" <koodanospam@icsusa.com>
Newsgroups: borland.public.interbase.sql
Subject: Is this safe?
Date: Fri, 7 Mar 2008 12:50:36 -0600
Lines: 22
Organization: ICS
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1914
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1914
NNTP-Posting-Host: 207.195.200.17
Message-ID: <47d18e36$1@newsgroups.borland.com>
X-Trace: newsgroups.borland.com 1204915766 207.195.200.17 (7 Mar 2008 10:49:26 -0700)
Path: arc1-ca.pugleaf.net!g2news1.google.com!news4.google.com!feeder3.cambrium.nl!feeder3.cambrium.nl!feeder2.cambrium.nl!feed.tweaknews.nl!193.201.147.86.MISMATCH!news.astraweb.com!border1.a.newsrouter.astraweb.com!club-internet.fr!feedme-small.clubint.net!feeder1-1.proxad.net!proxad.net!feeder1-2.proxad.net!203.109.252.33.MISMATCH!newsfeeds.ihug.co.nz!ihug.co.nz!newsgroups.borland.com!not-for-mail