Recode 2008 Code to 2005 Code

  • I have a sql script that will run on 2008 but when I run it on2005 server/db, it gives me errors. Is there an app or script that will change a script to run on 2005 that was written in 2008?

  • That would far too complex to automate. What if you are using new datatypes? What about table parameters?

    We can help you rework it but you need to post the script you are trying to change and some details about what the errors you are getting.

    _______________________________________________________________

    Need help? Help us help you.

    Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.

    Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.

    Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
    Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
    Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
    Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/

  • there's not very many differences between 2005 and 2008; first make sure the compatibility level on the target database really is 9.0/90 if it is 2005. you might be hitting the differences between 2000 instead due to the syntax limitations.

    SELECT cmptlevel

    from master.dbo.sysdatabases

    WHERE name=db_name()

    second, nope no easy fix...i think you just need to roll up your sleves and track down the issue based on the error(s) returned.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

Viewing 3 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply