Link to home
Start Free TrialLog in
Avatar of lulubell-b
lulubell-b

asked on

Compare fields in Access

Hello,

I'm using to Access to perform my column compares and I'm having some issues. Do you have some recommendations?

I was going to use the nz function but I dont know how reliable it is.

Thanks
Avatar of Bryan Butler
Bryan Butler
Flag of United States of America image

Please clarify that you are comparing columns in your Access DB tables.  Also, what nz function are you referring to?  (the return value one?)  What is the error/issue you are having?  
Avatar of lulubell-b
lulubell-b

ASKER

I'm comparing columns in my access tables. I need to compare data of old vs. new. and I need to see any differences that occurred.

nz([AFTER].[01]))<>([BEFORE].[1])

I'm just unsure if this is the best way to go. I need to compare each column within the table.
Nz(After,0)<>Nz(Before,0)
BTW, I've found Nz() is very reliable - however, I can't say the same for some of the users ;-)
ASKER CERTIFIED SOLUTION
Avatar of GRayL
GRayL
Flag of Canada image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
I assume you are looping through result sets using NZ.  But would a query work for you?

select * from before B, after A where B.fld2Compare != A.fld2Comapare
Oh, and you need a key...

select * from before B, after A where B.fld2Compare != A.fld2Comapare  and B.key = A.key
'!=' doesn't fly in Access.  

In the Immedidate Pane:

? 1<>2
True
? 1!=2
False
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Can I perform an outer join with it too? I would like value that do not exist New but existed in the Old

Thanks
I also noticed that in the before its lowercase and uppercase in the after.

How do I add the UCASE function to the NZ function?

Thanks
I figured out the rest, thank you
Thanks, glad to help.