[Cialug] SQL question

David Stout ragbrai65 at yahoo.com
Wed Mar 15 14:36:20 CST 2006


Thank you

"Dave J. Hala Jr." <dave at 58ghz.net> wrote:  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 ''
> 
> 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 
641.485.1606

_______________________________________________
Cialug mailing list
Cialug at cialug.org
http://cialug.org/mailman/listinfo/cialug



David Stout
Systems Programmer
Regency Homes
		
---------------------------------
 Yahoo! Mail
 Use Photomail to share photos without annoying attachments.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://cialug.org/pipermail/cialug/attachments/20060315/6f0910e7/attachment.htm


More information about the Cialug mailing list