| Author |
Message |
TSchwab
Joined: 11 Jan 2008 Posts: 62 Location: Germany
|
Posted: Tue Dec 14, 2010 11:22 am Post subject: INSERT INTO ... doesn't return the correct column order |
|
|
Hi,
I have a table function with a table as return value.
For example:
| Code: |
CREATE FUNCTION [dbo].[GetAddress] (
)
RETURNS @Result TABLE (
_ID INT
, LastName NVARCHAR(MAX)
, FirstName NVARCHAR(MAX)
, ZIPCode NVARCHAR(100)
)
AS
BEGIN
INSERT INTO @Result
(LastName
, [_ID]
, ZIPCode
, FirstName)
VALUES ( -- LastName
-- _ID
-- ZIPCode
-- FirstName
)
END
GO
|
When I type the INSERT INTO the SQL-Prompt returns the columns in the wrong order!
It works when the table is created with a DECLARE statement. _________________ Regards,
Thorsten |
|
| Back to top |
|
 |
|
|
All times are GMT + 1 Hour
|
| Page 1 of 1 |
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
Powered by phpBB © 2001, 2005 phpBB Group