How to input 2 values into 1 field using SQL Server 2005 with an insert statement?

zimmer9
zimmer9 used Ask the Experts™
on
I am using SQL Server 2005.

How would you insert 2 values into 1 field ELEMENT_TYPE_VALUE_PAIRS?

I tried the following
placing User_type & Master Access into ELEMENT_TYPE_VALUE_PAIRS
and got a syntax error.

INSERT INTO dbo.tblDirect_Entlmnts (PRINCIPAL_ID_TYPE, PRINCIPAL_NAME, ELEMENT_TYPE_VALUE_PAIRS)
values ('K', 'nitod', ('User_type', 'Master Access'));
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Commented:
HI

You cannot insert two values in single field in sql server.
You can achieve the above task by concatenation of two values into one and then inserting into table

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial