Msg 2715, Level 16, State 7, Line 2 Column, parameter, or variable #4: Cannot find data type varchar(50)

  • Yep.

      I finally resolved the same issue with my [varchar(50)] when I took out the square brackets..  That is when I realized that the square brackets should have only been around varchar not the whole thing  i.e. [varchar](50).  I did not understand the point Lynn was making until I took out the square brackets.  But why would the auto-generated script show the square brackets in the incorrect location?

  • ejoell 66477 - Friday, April 20, 2018 8:26 AM

    Yep.

      I finally resolved the same issue with my [varchar(50)] when I took out the square brackets..  That is when I realized that the square brackets should have only been around varchar not the whole thing  i.e. [varchar](50).  I did not understand the point Lynn was making until I took out the square brackets.  But why would the auto-generated script show the square brackets in the incorrect location?

    I haven't seen an auto-generated script with this problem.  I have seen an errant replace cause it, however.

  • ejoell 66477 - Friday, April 20, 2018 8:26 AM

     But why would the auto-generated script show the square brackets in the incorrect location?

    It wouldn't.

    However, if the autogenerated script correctly contained [int] and you did a search/replace replacing "int" with "varchar(50)", then you will end up with [varchar(50)]

    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

Viewing 3 posts - 31 through 32 (of 32 total)

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