none
Entering a row from a table to a column of other table RRS feed

  • Question

  • Is it possible to enter a complete record into a column say varchar(max) and then be able to retreive the record from the column. I am using sql 2005.

     

    Thanks very much in advance,

    Friday, October 6, 2006 9:51 AM

Answers

  •  

    you can use a separator for columns and insert it into a table.

    insert into tablename (varcharnmaxcolumn)

    select col1 +'|' + col2+'|' +col3

    from table1

     

    and during retrieval you can split the output as per separator as '|' in this case

    Friday, October 6, 2006 9:56 AM