How to change Number to Text

  • Thread starter Thread starter fruitchunk
  • Start date Start date
F

fruitchunk

I have this SQL statement

select abcdoc.*
from abcdoc, order
where order.doc_no = 10599
and order.doc_no || '' = abcdoc.record_key
and abcdoc.filename = 'order'

When I enter it in SQL view in access i get an error "invalid use of
vertical bars in query expression" I guess because doc_no is stored as
numbers & record_key is stored as text.

Please help.
 
|| ''

Pipes || are how you concantanate data in Oracle. In Access you use the
ampersand & character. Even then you would need the || or &, along with the
", on both side of doc_no.

Try this instead:

and CStr(order.doc_no) = abcdoc.record_key
 
Back
Top