|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
varcharmax issueI ran into an issue with varcharmax and I was wondering if anyone knows
about this If you look at a file exported from sql mgmt studio it exports the line in the create statement for a varcharmax field as [news] [varchar] (-1) But if you try to run that in query analyzer it causes an error. You have to use [news] [varchar] (MAX) Is this a bug? Not a bug - a 'feature'!! :-))
Sounds like a bug to me, either in SSMS or in the API/code used to do the scripting (SMO??). At least you can do a text replacement to get (max) where you need it though. -- Show quoteTheSQLGuru "DWC" <D**@discussions.microsoft.com> wrote in message news:984C20A4-1808-43DE-AEAB-660362AF0CD0@microsoft.com... > > I ran into an issue with varcharmax and I was wondering if anyone knows > about this > > If you look at a file exported from sql mgmt studio it exports the line in > the create statement for a varcharmax field as > [news] [varchar] (-1) > > But if you try to run that in query analyzer it causes an error. You have > to use > > > [news] [varchar] (MAX) > > Is this a bug? I just ran a few and couldn't reproduce - but I'm not
following how you did this. What are the steps to reproduce the issue? What file are you exporting from where with the create statement? What service pack are you running? -Sue On Thu, 15 Mar 2007 11:55:10 -0700, DWC <D**@discussions.microsoft.com> wrote: Show quote > >I ran into an issue with varcharmax and I was wondering if anyone knows >about this > >If you look at a file exported from sql mgmt studio it exports the line in >the create statement for a varcharmax field as > [news] [varchar] (-1) > >But if you try to run that in query analyzer it causes an error. You have >to use > > > [news] [varchar] (MAX) > >Is this a bug? |
|||||||||||||||||||||||