What are the challenges you face when working across database platforms? Take the survey
Options

sysname - Unable to insert value for unknown user-defined or

moffmoff Posts: 34
edited September 28, 2007 7:41AM in SQL Prompt Previous Versions
For a table that includes columns of datatype sysname, the automagical build of the INSERT statement (which is brilliant, BTW), doesn't work properly

eg:
CREATE TABLE DummyTable (COL1 sysname, COL2 CHAR(50), COL3 NVARCHAR(MAX))

(recache DB)

Type INSERT INTO DummyT<prompted to complete - press completion key>
results in:
INSERT INTO DummyTable &#40;
	COL1,
	COL2,
	COL3
&#41; VALUES &#40; 
	/* COL1 - sysname */ /* Unable to insert value for unknown user-defined or CLR type */,
	/* COL2 - CHAR&#40;50&#41; */ '',
	/* COL3 - NVARCHAR&#40;MAX&#41; */ N'' &#41;

Running SQLPrompt 3.6.0.109

Comments

  • Options
    SQL Prompt does not examine UDT information. sysname, although it is just a string, is actually a UDT. Therefore, SQL Prompt is unable to find its precise type and so is unable to insert an appropriate default value.

    It may be possible in a future version of Prompt to extract UDT information and insert appropriate default values. I'll log this is a suggestion for a future version. Thanks for your input!
    Jason Crease
    Red Gate Software
Sign In or Register to comment.