If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Update Part# field where is blank
Hello All,
i have the following two fields Part# and Cust# Have some records that have blank part number but contain a Cust# example, PART# Cust# zxe35 SER98 XR25 ZR25-R Is it possible to copy the Cust# into the Part# only for those records that are blank? Since I'm running a query based on the Part# field, I will not get those records with blank part number so want to make sure I copy the Cust into its respective part# field. Please advise if its possible. Thanks, juan |
#2
|
|||
|
|||
Use an update query
UPDATE Products SET Products.PART# = Products.Cust# WHERE (((Products.PART#) Is Null)); HTH Damon "JUAN" wrote in message ... Hello All, i have the following two fields Part# and Cust# Have some records that have blank part number but contain a Cust# example, PART# Cust# zxe35 SER98 XR25 ZR25-R Is it possible to copy the Cust# into the Part# only for those records that are blank? Since I'm running a query based on the Part# field, I will not get those records with blank part number so want to make sure I copy the Cust into its respective part# field. Please advise if its possible. Thanks, juan |
#3
|
|||
|
|||
Use the NZ function
SELECT Nz([Part#],[Cust#]) as MyPartNo FROM YourTable That will do show Cust# in the calculated column when Part# is Null. If you want to PERMANENTLY do this in the table, use an update query. UPDATE YourTable Set [Part#] = [Cust#] WHERE [Part#] is Null JUAN wrote: Hello All, i have the following two fields Part# and Cust# Have some records that have blank part number but contain a Cust# example, PART# Cust# zxe35 SER98 XR25 ZR25-R Is it possible to copy the Cust# into the Part# only for those records that are blank? Since I'm running a query based on the Part# field, I will not get those records with blank part number so want to make sure I copy the Cust into its respective part# field. Please advise if its possible. Thanks, juan |
#4
|
|||
|
|||
On Wed, 18 Aug 2004 14:20:31 -0700, "JUAN" wrote:
Is it possible to copy the Cust# into the Part# only for those records that are blank? Yes, though in my opinion that's a VERY strange thing to do! Customers are not Parts (I hope...!) and it sounds peculiar to assign a Cust# to a part. But to do so, create an Update query such as UPDATE yourtable SET [Part#] = [Cust#] WHERE [Part#] IS NULL John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public |
#5
|
|||
|
|||
Hello All,
just would like to thank all of you for providing help. I guess my brain was sleeping. Once again thanks alot. Juan -----Original Message----- On Wed, 18 Aug 2004 14:20:31 -0700, "JUAN" wrote: Is it possible to copy the Cust# into the Part# only for those records that are blank? Yes, though in my opinion that's a VERY strange thing to do! Customers are not Parts (I hope...!) and it sounds peculiar to assign a Cust# to a part. But to do so, create an Update query such as UPDATE yourtable SET [Part#] = [Cust#] WHERE [Part#] IS NULL John W. Vinson[MVP] Come for live chats every Tuesday and Thursday http://go.compuserve.com/msdevapps?loc=us&access=public . |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Suppressing a blank field in a report | Kay | Setting Up & Running Reports | 4 | July 14th, 2004 05:08 PM |
Unable to Update Field | Stupid Question | Using Forms | 1 | July 9th, 2004 03:38 AM |
NUMBERING the pages | Bob | New Users | 7 | June 14th, 2004 12:20 AM |
How to update a field with the value from another table? | Chris | Database Design | 2 | May 12th, 2004 09:28 AM |