I tried to create a INSERT INTO statement which gets its data from another data (partially).
I started typing INSERT INTO T_Transl.... and then picked the T_Translation table - worked fine, showed me all the columns in that table. I picked those needed, and went on to write the SELECT....... to select the values from the other table.
I had typed this:
insert into dbo.T_Translation(Code, Caption, LanguageOID,IsEdited)
SELECT
'ABC', 'Abc 1-2-3', OID, 1
FROM
dbo.T_Language
and then pressed <ENTER> to select the T_Language table, and the statement was completed with:
( OID ,
Caption ,
LCID ,
SortOrder ,
UserOIDStamp ,
DateTimeStamp ,
ISOLanguage
)
VALUES ( NULL , -- OID - uniqueidentifier
'' , -- Caption - varchar(100)
0 , -- LCID - int
0 , -- SortOrder - smallint
NULL , -- UserOIDStamp - uniqueidentifier
'2009-06-09 08:27:56' , -- DateTimeStamp - datetime
'' -- ISOLanguage - varchar(10)
)
I wasn't expecting to get the list of columns in the T_Language table - after all, this is in the SELECT statement, so this really doesn't make a whole lot of sense here.
It almost seems as if SQLPrompt 4 gets confused by the INSERT INTO at the very beginning of the statement, and then thinks I'm about to insert into the T_Language table, which is clearly *NOT* the case.....
Marc
I started typing INSERT INTO T_Transl.... and then picked the T_Translation table - worked fine, showed me all the columns in that table. I picked those needed, and went on to write the SELECT....... to select the values from the other table.
I had typed this:
insert into dbo.T_Translation(Code, Caption, LanguageOID,IsEdited)
SELECT
'ABC', 'Abc 1-2-3', OID, 1
FROM
dbo.T_Language
and then pressed <ENTER> to select the T_Language table, and the statement was completed with:
( OID ,
Caption ,
LCID ,
SortOrder ,
UserOIDStamp ,
DateTimeStamp ,
ISOLanguage
)
VALUES ( NULL , -- OID - uniqueidentifier
'' , -- Caption - varchar(100)
0 , -- LCID - int
0 , -- SortOrder - smallint
NULL , -- UserOIDStamp - uniqueidentifier
'2009-06-09 08:27:56' , -- DateTimeStamp - datetime
'' -- ISOLanguage - varchar(10)
)
I wasn't expecting to get the list of columns in the T_Language table - after all, this is in the SELECT statement, so this really doesn't make a whole lot of sense here.
It almost seems as if SQLPrompt 4 gets confused by the INSERT INTO at the very beginning of the statement, and then thinks I'm about to insert into the T_Language table, which is clearly *NOT* the case.....
Marc