Click here to Skip to main content
15,898,134 members
Home / Discussions / Database
   

Database

 
QuestionSET NOCOUNT ON; Pin
geekfromindia17-Oct-08 5:09
geekfromindia17-Oct-08 5:09 
AnswerRe: SET NOCOUNT ON; Pin
Jon_Boy17-Oct-08 10:19
Jon_Boy17-Oct-08 10:19 
GeneralRe: SET NOCOUNT ON; Pin
geekfromindia17-Oct-08 12:01
geekfromindia17-Oct-08 12:01 
GeneralRe: SET NOCOUNT ON; Pin
Jon_Boy17-Oct-08 13:23
Jon_Boy17-Oct-08 13:23 
AnswerRe: SET NOCOUNT ON; Pin
Mycroft Holmes17-Oct-08 22:57
professionalMycroft Holmes17-Oct-08 22:57 
QuestionProblem with creating a table using a stored procedure [modified] Pin
TheComputerMan17-Oct-08 4:29
TheComputerMan17-Oct-08 4:29 
AnswerRe: Problem with creating a table using a stored procedure Pin
TheComputerMan17-Oct-08 5:22
TheComputerMan17-Oct-08 5:22 
AnswerRe: Problem with creating a table using a stored procedure Pin
Kevin Horgan23-Oct-08 2:08
Kevin Horgan23-Oct-08 2:08 
Hi,

It looks like the length is the issue. I guess you might have some tab characters in the code for formatting perhaps, not sure. Anyway, I just fixed a similar problem in a Sybase IQ procedure and just removed all the white space.

So for example...

DECLARE @SQLStatement varchar(1500)
SET @SQLStatement = 'CREATE TABLE [' + @Surname
+ '] ([AutoID] [int] IDENTITY(1,1) NOT NULL,'
+ '[FirstName] [nvarchar](50) NULL CONSTRAINT [DF_'
+ @Surname
+ '_FName] DEFAULT (''''), '
+ '[SecondName] [nvarchar](50) NULL CONSTRAINT [DF_' + @Surname
+ '_SName] DEFAULT (''''), '
+ '[ThirdName] [nvarchar](50) NULL CONSTRAINT [DF_' + @Surname
... etc
... etc
... etc
+ ' STATISTICS_NORECOMPUTE = OFF, '
+ ' IGNORE_DUP_KEY = OFF, '
+ ' ALLOW_ROW_LOCKS = ON, '
+ ' ALLOW_PAGE_LOCKS = ON)'
+ ' ON [PRIMARY]) '
+ ' ON [PRIMARY]'
EXEC @SQLStatement

I hope that helps.

Good luck Smile | :) ,

Kevin
GeneralRe: Problem with creating a table using a stored procedure Pin
TheComputerMan23-Oct-08 2:20
TheComputerMan23-Oct-08 2:20 
GeneralRe: Problem with creating a table using a stored procedure Pin
TheComputerMan23-Oct-08 3:35
TheComputerMan23-Oct-08 3:35 
Question'Open Table' menu option missing in SSMS 08 (SQL compact 3.5) Pin
Jon_Boy17-Oct-08 2:44
Jon_Boy17-Oct-08 2:44 
AnswerRe: 'Open Table' menu option missing in SSMS 08 (SQL compact 3.5) Pin
Jon_Boy18-Oct-08 14:41
Jon_Boy18-Oct-08 14:41 
QuestionFind Percentage? Pin
PadmaPriya.S16-Oct-08 23:59
PadmaPriya.S16-Oct-08 23:59 
AnswerRe: Find Percentage? Pin
Ashfield17-Oct-08 0:54
Ashfield17-Oct-08 0:54 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:09
PadmaPriya.S17-Oct-08 1:09 
GeneralRe: Find Percentage? Pin
Ashfield17-Oct-08 1:12
Ashfield17-Oct-08 1:12 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:14
PadmaPriya.S17-Oct-08 1:14 
GeneralRe: Find Percentage? Pin
Ashfield17-Oct-08 1:29
Ashfield17-Oct-08 1:29 
GeneralRe: Find Percentage? Pin
PadmaPriya.S17-Oct-08 1:39
PadmaPriya.S17-Oct-08 1:39 
QuestionIs this possible?? Pin
VinothRao16-Oct-08 20:48
VinothRao16-Oct-08 20:48 
AnswerRe: Is this possible?? Pin
Mycroft Holmes16-Oct-08 21:39
professionalMycroft Holmes16-Oct-08 21:39 
QuestionDistinct Records Pin
jonhbt16-Oct-08 20:43
jonhbt16-Oct-08 20:43 
AnswerRe: Distinct Records Pin
Eslam Afifi16-Oct-08 21:46
Eslam Afifi16-Oct-08 21:46 
QuestionStore Image in Database Pin
astrovirgin16-Oct-08 20:11
astrovirgin16-Oct-08 20:11 
AnswerDouble Post - Please ignore Pin
Giorgi Dalakishvili16-Oct-08 20:32
mentorGiorgi Dalakishvili16-Oct-08 20:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.