Menu

Can't rename column with 'AS' command

Help
2017-02-17
2017-02-17
  • Andrea Rozza

    Andrea Rozza - 2017-02-17

    Hi,
    just started to use UCanAccess in a project that was previously using the odbc.jdbc bridge.

    I noticed that the AS function/statement/command don't work in a query like this:

    Select field1, field2 AS myfield from mytable

    but it work if i modify it in (this is just an example):

    Select field1, cstr(field2) AS myfield from mytable

    Has any of you run in this issue? There's a solution to this?

    Thanks,
    Andrea

     
  • Gord Thompson

    Gord Thompson - 2017-02-17

    Hi Andrea.

    I am unable to reproduce your issue under UCanAccess 4.0.1 using the attached .mdb file. This is what I get using console.sh:

    UCanAccess>Select field1, field2 AS myfield from mytable;
    ---------------------
    | field1 | myfield | 
    ---------------------
    
    | 1 | hello |
    

     
    Please ensure that you are using version 4.0.1. If your issue is specific to your particular database then please upload a sample file that can be used to reproduce the problem.

     
  • Andrea Rozza

    Andrea Rozza - 2017-02-20

    Hi Gord,
    first, thanks for the answer. I'm using the 4.0.1 version, and i too have tried execute the query via the console, the results are correct. So it may be a problem with the software i'm using, but i can work around that easily. Was only checking if someone had this same issue as me.

    Have a great day,
    Andrea

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.