i am trying to keep a library of code in sql express. i copied 1 piece of code and tried to past it into the column but it doesnt work, this is a small piece of code, I tried using varchar(4000) for the field and then text but when i paste the code nothing shows in the column and then when i do a select nothing shows, the colm also doesnt allow nulls:
SET ANSI_NULLS ON
SET QUOTED_IDENTIFIER ON
-- CREATED 3/10/08
-- Depends on:
-- DESCRIPTION: Select the TableName, PrimaryKey Columns and the name of the
-- Primary Key from the table
ALTER Proc [On_Impacted_Tables]
FROM INFORMATION_SCHEMA.TABLE_CONSTRAINTS A,
WHERE B.Constraint_Name = A.Constraint_Name
AND B.Table_Name = A.Table_Name
AND A.Table_Name = C.TableName
AND Constraint_Type = 'PRIMARY KEY '
AND c.Impacted =1
SET ANSI_NULLS OFF
SET QUOTED_IDENTIFIER OFF
Are you doing the editing through the GUI? I'm not sure how well that would handle pasting into blobs.
If you are using sqlsvr 2008, use the varchar(max) datatype.
Also try loading your data with an insert statement rather than pasting into the GUI.
If it's not practically useful, then it's practically useless.