cast to integer?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • jamesd0142
    Contributor
    • Sep 2007
    • 471

    cast to integer?

    ok i have this:

    [code=sql]
    insert into DataSet_Rows
    select rtrim(col01), rtrim(col02) from tempout
    [/code]

    col02 is a varchar(50)
    but i want it to be an integer how can i do this?

    cheers james
  • dusana
    New Member
    • Oct 2007
    • 3

    #2
    Originally posted by jamesd0142
    ok i have this:

    [code=sql]
    insert into DataSet_Rows
    select rtrim(col01), rtrim(col02) from tempout
    [/code]

    col02 is a varchar(50)
    but i want it to be an integer how can i do this?

    cheers james

    insert into DataSet_Rows
    select cats(col01 as int), cast(col02 as int) from tempout

    Comment

    • dusana
      New Member
      • Oct 2007
      • 3

      #3
      Originally posted by dusana
      insert into DataSet_Rows
      select cast(col01 as int), cast(col02 as int) from tempout

      use this
      insert into DataSet_Rows
      select cast(col01 as int), cast(col02 as int) from tempout

      Comment

      Working...