[Cialug] SQL question
Dave J. Hala Jr.
dave at 58ghz.net
Wed Mar 15 13:49:56 CST 2006
UPDATE table SET table.SaleStatus = table.Closed WHERE table.SaleStatus
='Spec'
This looks at all records where SaleStatus = 'Spec', then in those
records it sets the value of the SaleStatus field to the value of the
Closed field. You'll want to make sure that the SaleStatus and Closed
fields are the same data type.
:) Dave
On Wed, 2006-03-15 at 13:34, David Stout wrote:
> I am using SQL server and I have a column named
> SalesStatus and one Named Close in my in the SalesStatus field I have
> values like
> BTO, Model, ssip, and Spec In the field named Close this is just a
> closing date.
> What I need to do is this:
>
> If SalesStatus='Spec' Then put the value of the closed field in here.
> else '<blank>'
>
> How do I write such a query?
>
> Thank you,
> David Stout
> Ragbari65 at yahoo.com
>
>
> ______________________________________________________________________
> Brings words and photos together (easily) with
> PhotoMail - it's free and works with Yahoo! Mail.
>
> ______________________________________________________________________
> _______________________________________________
> Cialug mailing list
> Cialug at cialug.org
> http://cialug.org/mailman/listinfo/cialug
--
Open Source Information Systems, Inc. (OSIS)
Dave J. Hala Jr., President <dave at osis.us>
641.485.1606
More information about the Cialug
mailing list