Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 4 of 4
  1. #1
    Rockstar Coder
    Join Date
    Jun 2002
    Location
    USA
    Posts
    9,074
    Thanks
    1
    Thanked 328 Times in 324 Posts

    Convert() like function in Access SQL?

    I'm trying to convert a column from a number to a varchar-like column in a Access SQL query.

    Code:
    SELECT MSysObjects.Name, Convert(varchar,MSysObjects.Type) AS xtype, MSysObjects.DateCreate AS refdate FROM MSysObjects WHERE Type=5 OR Type=1 AND NOT Left(Name,4)='MSys'
    The problem with this code is that apparently, that function doesn't exist with Access.

    Additionally, I was just using the Replace() function in the query when I wrote the query in Access and it worked but it won't work from the outside using either the Access Driver or the Jet 4.0 Driver. So, since I couldn't do that, I was going to update the recordset after the fact but I can't do that until I get the field type to be something other than an integer.

    Any ideas?
    OracleGuy

  • #2
    raf
    raf is offline
    Master Coder
    Join Date
    Jul 2002
    Posts
    6,589
    Thanks
    0
    Thanked 0 Times in 0 Posts
    so noone responds ...

    i don't know the answer but was hoping that someone would step in because
    i was wondering why you need the typeconversion. I mean, what's the difference in the recordset in the value comes from a string or numeric value?
    why cant the fieldtype of the sourcevariable be an integer?

    i remember from the past that there were post in the ASP forum (from glengv i believe) about typeconversions, but i can't remember why they were needed + can't seam to find them through the searchfucntion.
    Posting guidelines I use to see if I will spend time to answer your question : http://www.catb.org/~esr/faqs/smart-questions.html

  • #3
    New Coder
    Join Date
    Aug 2004
    Posts
    44
    Thanks
    0
    Thanked 0 Times in 0 Posts

  • #4
    New to the CF scene
    Join Date
    Dec 2005
    Posts
    1
    Thanks
    0
    Thanked 0 Times in 0 Posts
    str()


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •