Microsoft
Software
Hardware
Network
Question : Want to update a field with values from another field within the same table if it meets a condition
I have: Tablegz
Novice I am at SQL. Using Access 2007.
So I want to fill field FINGP with values from field PROP if PROP has values, everything is within the same table. Note that field PROP does have cells with no data--are empty in other words, not even a zero. If PROP does not have values then FINGP should get filled with the values from field EXG. Right now I get an error for missing an item using the first statement below. Do I even have the right expression for what I am trying to accomplish? Is an IIF statement allowied in an UPDATE?
UPDATE Tablegz
SET ([FINGP]=([EXG], iif([PROP]='')), [FINGP]=[PROP]
or is this more appropriate? SELECT Tablegz, IIF([PROP]=' ', [FINGP]=[EXG]), [FINGP]=[PROP]
However the second expression here asks me to enter a parameter value and if I enter nothing and press OK 3 times it returns 3 empty fields in the following order: Tablegz, Expr1001, Expr1002.
I don't know folks. I need more practice big time.
Your expertise is appreciated.
Answer : Want to update a field with values from another field within the same table if it meets a condition
UPDATE Tablegz
SET FINGP = IIf(Nz(PROP, "") <> "", PROP, EXG)
Random Solutions
SNMP Install missing files MSI.MFL
VB.NET: optimal buffer size and speed issues with IO.FileStream
Access 2007 Exit Button ID for ribbon UI
SSIS Connection Manager
adjust macro to count and display values
Can't find system.mdw file
Is it possible (and practical) to move/import an existing blog into SharePoint?
windows xp IE 7
Powerpoint slide numbering - start on page 3 as page number 1, question re-posted
Pivot table: Add Chart Title - Dynamic by Filter