UtterAccess.com
X   Site Message
(Message will auto close in 2 seconds)

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topic
> Update Number Field To 0 If Blank, Office 2000    
 
   
dlbhome
post May 5 2012, 09:37 AM
Post #1

UtterAccess Member
Posts: 21



I need a query that would update a number field to the number 0 if the field is blank.

SELECT SDI.SALE_PRICE
FROM SDI Where SDI.SALE_PRICE=NULL
Update SDI.SALE_PRICE 0;

I'm lost (IMG:style_emoticons/default/iconfused.gif)

NE Help would Great!
Thanks in Advance
Go to the top of the page
 
+
theDBguy
post May 5 2012, 09:39 AM
Post #2

Access Wiki and Forums Moderator
Posts: 47,914
From: SoCal, USA



Hi,

Try:

UPDATE SDI SET Sale_Price = 0 WHERE Sale_Price Is Null

Just my 2 cents... (IMG:style_emoticons/default/2cents.gif)
Go to the top of the page
 
+
dlbhome
post May 5 2012, 10:08 AM
Post #3

UtterAccess Member
Posts: 21



Thanks works great...
Go to the top of the page
 
+
orange999
post May 5 2012, 10:15 AM
Post #4

UtterAccess Guru
Posts: 621
From: Ottawa, Ontario, Canada



dlbHome,

For what it's worth, here are 2 great free, online resources for SQL syntax and examples

Google "sql techonthenet"

or "w3schools sql update"


Go to the top of the page
 
+
theDBguy
post May 5 2012, 11:12 AM
Post #5

Access Wiki and Forums Moderator
Posts: 47,914
From: SoCal, USA



Hi,

QUOTE (dlbhome @ May 5 2012, 08:08 AM) *
Thanks works great...

(IMG:style_emoticons/default/yw.gif)

Orange and I are happy to help. Good luck with your project.
Go to the top of the page
 
+

Thank you for your support! Reply to this topicStart new topic

Jump To Forum:
 



RSS Go to Top  ·  Lo-Fi Version Time is now: 19th May 2013 - 01:27 AM