Home Forums SQL Server 2005 Administering Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query. RE: Implicit conversion from data type sql_variant to varchar is not allowed. Use the CONVERT function to run this query.

  • Yup, that should work.

    Just one thing. What happens if the parameter is not string, into or decimal? May I suggest you make that a switch statement that covers all the types you use, along with an else for when nothing matches.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass