Results 1 to 3 of 3
  1. #1
    Join Date
    Jul 2003
    Posts
    1

    Unanswered: CAST/Convert and performance measurements

    Has anyone any testdata on how long a cast/convert from varchar to other datatypes is taking. Is casting a large number of data a major problem for MSSQL 2000?

  2. #2
    Join Date
    May 2003
    Posts
    60
    This is what I know.

    CAST is the old way that SQL used to change from one data type to another. CONVERT is the preferred method according Microsoft.

    I've used CONVERT on tables with a couple hundred thousand rows and didn't really see a large degradation in performance.

    Hope this helps.

  3. #3
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    CAST has simpler syntax, CONVERT has more functionality. They both work fast, and if you look at the documentation for them you'll see that SQL Server will do many conversion implicitily, so that you don't even need to use CAST or CONVERT.

    blindman

Posting Permissions

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