H Harry_38 Registered User. Local time Today, 23:01 Joined Jan 14, 2011 Messages 47 Nov 2, 2014 #1 I have a table that contains a field with 30 characters. Query: If the 15th character of that field is a 2 then that field of the query should return a '2' else it should be '1'. How to do that in a query?
I have a table that contains a field with 30 characters. Query: If the 15th character of that field is a 2 then that field of the query should return a '2' else it should be '1'. How to do that in a query?
jdraw Super Moderator Staff member Local time Today, 17:01 Joined Jan 23, 2006 Messages 15,498 Nov 2, 2014 #2 Untested IIF(Instr(YourfieldName,"2")=15,"2","1")
H Harry_38 Registered User. Local time Today, 23:01 Joined Jan 14, 2011 Messages 47 Nov 2, 2014 #3 Jdraw, : it worked (but , should be ; ) thanks a lot