ORACLE/MSSQL casting question

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • B. Cavour

    ORACLE/MSSQL casting question

    I just changed a column from int to varchar.

    what I want to do is change those values to strings

    I'm having a hard time trying to find the command to do this

    Many thanks,

    BC


  • Nicholas Paldino [.NET/C# MVP]

    #2
    Re: ORACLE/MSSQL casting question

    BC,

    I believe what you want is:

    cast(<expressio n> as varchar(<string length>))

    I don't know if it will work in oracle, but it will work in SQL Server.
    It's easy enough to test in oracle.

    Hope this helps.


    --
    - Nicholas Paldino [.NET/C# MVP]
    - mvp@spam.guard. caspershouse.co m

    "B. Cavour" <cavourb@thirdh ayz.net> wrote in message
    news:%231l%23Lf wCGHA.736@TK2MS FTNGP10.phx.gbl ...[color=blue]
    >I just changed a column from int to varchar.
    >
    > what I want to do is change those values to strings
    >
    > I'm having a hard time trying to find the command to do this
    >
    > Many thanks,
    >
    > BC
    >[/color]


    Comment

    • Ignacio Machin \( .NET/ C# MVP \)

      #3
      Re: ORACLE/MSSQL casting question

      Hi,

      What this has to do with oracle AND ms sql?

      In which RDBMS are you working with?

      IIRC, in Oracle there is no INT as a type, but numeric , just check the
      PLSQL for the correct cast expression, this link was the first for a google
      search of oracle numeric nvarchar





      --
      Ignacio Machin,
      ignacio.machin AT dot.state.fl.us
      Florida Department Of Transportation



      "B. Cavour" <cavourb@thirdh ayz.net> wrote in message
      news:%231l%23Lf wCGHA.736@TK2MS FTNGP10.phx.gbl ...[color=blue]
      >I just changed a column from int to varchar.
      >
      > what I want to do is change those values to strings
      >
      > I'm having a hard time trying to find the command to do this
      >
      > Many thanks,
      >
      > BC
      >[/color]


      Comment

      Working...