How can we help you today? How can we help you today?

sys table and information_schema view and insert statement

-no suggestion for all the sys table ? or information_schema view ?
it's very usefull ...

- too much line for the insert into.it make the code less readable.
1 line for the column value, 1 line for the commentary (column name - type )is too much
VALUES  (
 ''      
 , -- CODE - varchar(50)
the version in v3 was better :
VALUES ( 
/* CODE - varchar(50) */ '',
aGoram
0

Comments

3 comments

  • Anu D
    Thanks for your post.

    If I am not getting you wrong following are my suggestions:
    1. no suggestion for all the sys table ? or information_schema view ?

    Could you kindly check your settings: SQL Prompt 4 --> Options --> Suggestions--> Type of suggestions --> select List system objects?

    This should give you suggestion for all system objects. Please let me know if this is not what you are expecting.

    2. - too much line for the insert into.it make the code less readable.

    You can configure the Insert statements as per your requirement.
    Kindly navigate to SQL Prompt 4 --> Options --> Format --> Data Statements. Also configure what you want Insert statement to Insert in your query window navigate to SQL Prompt 4 --> Options --> Inserted Code --> Insert statement.

    Kindly let us know if that helped.
    Anu D
    0
  • aGoram
    Thanks for the response.
    I found the option i was looking for : Each subsequent column.

    But the thing is : it make the layout i want for the insert into statement but it change the layout of the select statement.

    I mean what a want is this :
    SELECT  staffId
                  , staffName
                  , a
                  , DAY(@dateOnly)
    FROM dbo.personnel
    
    INSERT  INTO mytable(CODE
                                 , NAME
                                 ,ACTIVE
                                 , DESCRIPTION 
                                )
    VALUES  (NULL, -- CODE - nvarchar(50)
             NULL, -- NAME - nvarchar(80)
             '', -- ACTIVE - char(1)
             NULL, -- DESCRIPTION - nvarchar(1500)
             )
    
    
    

    anyway thanks again
    aGoram
    0
  • Anu D
    Thanks for your post.

    As Insert and Select both are data statements, changes done to the Format Data Statements section will effect both Select and Insert Data Manipulation statements.

    Kindly let us know if you need any help on this.
    Anu D
    0

Add comment

Please sign in to leave a comment.