convert function

  • Thread starter Thread starter Milan Kuèera
  • Start date Start date
M

Milan Kuèera

Hi,
I need to get some numeric data converted to a string from Access through
Jet .
For example, it is exactly somethig I can easily write in MS SQL like this:
SELECT ... CONVERT(varchar, MyNumeric) FROM MyTable

On MSSQL it works perfectly, but on Access/Jet I cannot find the right
syntax for it.
Any suggestions?

Thanks in advance

Milan
 
SELECT CStr([MyNumeric]) AS MyAlias FROM MyTable

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.
 
Many thanks, surprisingly (for me) it really works.

Milan

Brendan Reynolds said:
SELECT CStr([MyNumeric]) AS MyAlias FROM MyTable

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Milan Kuèera said:
Hi,
I need to get some numeric data converted to a string from Access through
Jet .
For example, it is exactly somethig I can easily write in MS SQL like
this:
SELECT ... CONVERT(varchar, MyNumeric) FROM MyTable

On MSSQL it works perfectly, but on Access/Jet I cannot find the right
syntax for it.
Any suggestions?

Thanks in advance

Milan
 
Yes, if you're used to T-SQL, I'm sure it must look very strange to use a
VBA function in SQL, but that's how Jet works.

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Milan Kuèera said:
Many thanks, surprisingly (for me) it really works.

Milan

Brendan Reynolds said:
SELECT CStr([MyNumeric]) AS MyAlias FROM MyTable

--
Brendan Reynolds (MVP)
http://brenreyn.blogspot.com

The spammers and script-kiddies have succeeded in making it impossible
for
me to use a real e-mail address in public newsgroups. E-mail replies to
this post will be deleted without being read. Any e-mail claiming to be
from brenreyn at indigo dot ie that is not digitally signed by me with a
GlobalSign digital certificate is a forgery and should be deleted without
being read. Follow-up questions should in general be posted to the
newsgroup, but if you have a good reason to send me e-mail, you'll find
a useable e-mail address at the URL above.


Milan Kuèera said:
Hi,
I need to get some numeric data converted to a string from Access through
Jet .
For example, it is exactly somethig I can easily write in MS SQL like
this:
SELECT ... CONVERT(varchar, MyNumeric) FROM MyTable

On MSSQL it works perfectly, but on Access/Jet I cannot find the right
syntax for it.
Any suggestions?

Thanks in advance

Milan
 
Back
Top