Decode function

  • Thread starter Thread starter gg.2.max-75
  • Start date Start date
G

gg.2.max-75

Dear all,

I'm just new in access databases (using MSaccess 2003)
I've a native application generating an sql code against an oracle
database.
I 'd like to use this code in access via a linked table but my sql
using a "decode" function (transforming 1 into "Y" and 0 into "No".

What would be the equivalent via access?

Thanks in advance

TT
 
You can just write a public function in VB that does the conversion.
The function will accept 1 or 0 as a parameter and return Y or No.
Call the function from your query.
-- Dorian
"Give someone a fish and they eat for a day; teach someone to fish and they
eat for a lifetime".
 
You could use IIF like this --
IIF([YourField] = 1, "Y", "No")
unless there maybe other entries besides 1 and 0. Then this --
IIF([YourField] = 1, "Y", IIF([YourField] = 0, "No", "Error")))
 
You could use IIF like this --
      IIF([YourField] = 1, "Y", "No")
   unless there maybe other entries besides 1 and 0.  Then this --
      IIF([YourField] = 1, "Y", IIF([YourField] = 0, "No", "Error")))

--
Build a little, test a little.



Dear all,
I'm just new in access databases (using MSaccess 2003)
I've a native application generating an sql code against an oracle
database.
I 'd like to use this code in access via a linked table but my sql
using a "decode" function (transforming 1 into "Y" and 0 into "No".
What would be the equivalent via access?
Thanks in advance
TT- Hide quoted text -

- Show quoted text -

works perfect !
THanks
 
Back
Top