Results 1 to 3 of 3

Thread: type casting

  1. #1
    Join Date
    Jun 2002
    Posts
    1

    Arrow Unanswered: type casting

    how to conver the value retrived from varchar type field to integer in the query only

  2. #2
    Join Date
    Jun 2002
    Location
    Dublin, Ireland
    Posts
    23
    I assume there is only numeric values in the varchar field you want to convert. This is how to do it:


    select convert(int, <your varchar column here>)
    from...
    where...
    Mark Sheehan,
    Senior Sybase DBA

  3. #3
    Join Date
    Jun 2002
    Location
    Dublin, Ireland
    Posts
    23
    Sorry ignore my previous mail. I thought IO was in the Sybase forum. See the following site:

    http://www.mysql.com/doc/C/a/Cast_Functions.html
    Mark Sheehan,
    Senior Sybase DBA

Posting Permissions

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