I’m not sure if this is the appropriate place for this, but I hope that someone can help….

I’m querying data from an Oracle database using ODBC in MS Access.

There is a column in the Oracle table that I’m querying that is formatted as NUMBER(19). When I apply the “to_char” function using SQLPlus I get the below results:

SQL
SELECT f.ID, f.END_TIME,
to_char(f.MEDIA_SERVER_IXN_ID,'xxxxxxxxxxxxxxxx') AS switch_id


FROM INFOMART.FACT f
WHERE f.ID=28258811
AND f.END_TIME>=to_date('16-JAN-09')
And f.END_TIME<to_date('17-JAN-09');

ID END_TIME SWITCH_ID
-------------- --------- -----------------
28258811 16-JAN-09 10c01a6859b3c6c

If I use the Cstr function in MS Access the results that I get back are listed below, but I need the switch id to look as it does when I use the to_char function above. How do I replicate that function in MS Access to return the same results that I got using SQLPlus?


ID END_TIME SWITCH_ID
28258811 01/16/2009 8:43:15 AM 75437108476197996