abc def ghi jkl mno reason
--------------------------------
1 2 3 4
3 7 9 8
I have table in which i want to update reason column as "def missing" on 1st record and "mno missing" on second record.
Please help, Thanks in advance.
abc def ghi jkl mno reason
--------------------------------
1 2 3 4
3 7 9 8
I have table in which i want to update reason column as "def missing" on 1st record and "mno missing" on second record.
Please help, Thanks in advance.
Open the records and edit them. If you want to automate these two edits for multiple records, that would be two UPDATE queries.
UPDATE tablename SET reason = 'def missing' WHERE def Is Null;
UPDATE tablename SET reason = 'mno missing' WHERE mno Is Null;
Now what do you want to do if a record has both def and mno missing?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
i have a excel file need to imported, which has nearly 110 Columns, after importing there are required columns which should not be empty, so i was taking them out from database in form of Excel where it needs and reason for Rejection, that so column data is missing.
reason there are total 12 columns need to be check for such instances and the records are nearly more than 200, writing update query is ok, but if in single query i could fetch the column name then it would be nice.
Think would require VBA code.
Can more than one column be missing data in same record?
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.
This might work:
UPDATE tablename SET reason = Switch(IsNull([abc]), "abc missing", IsNull([def]), "def missing", IsNull([ghi]), "ghi missing", IsNull([jkl]), "jkl missing", IsNull([mno]), "mno missing");
How to attach file: http://www.accessforums.net/showthread.php?t=70301 To provide db: copy, remove confidential data, run compact & repair, zip w/Windows Compression.