If my answer is in another post, I've not found it. A post I thought might have my answer was "I want to concatenate 2 strings from 2 textareas and insert them into a column in my table."
I am converting some data. Other database has text that is stored in the same table, different fields. each field (x.description_plain_text has a sequence number as illustrated in the script. As you can maybe see with my attempt, I would like to bring both of the text lines into one (varchar(8000)) field and separate with a line or two. I don't know if I am allowed to tag a second objective, but if/after I get these separate lines from the other database into one field in my new database I then want to be able to put an identifier next to each ... as I am trying to show in the 2nd illustration ...
1st illustration
--select x.description_plain_text, x.SEQ_NO
update MIC.dbo.Item set CustomerDocumentNote =
case
when x.SEQ_NO = 1 then cast(x.description_plain_text as varchar(8000))
when x.SEQ_NO = 2 then cast(x.description_plain_text as varchar(8000))
END
-- x.description_plain_text + CHAR(13) + CHAR(10) + cast(x.description_plain_text as varchar (8000))
from MIC.dbo.Item a
inner join in_item_xdesc x on x.item_id = a.itemid
where (a.ItemNumber = '14661')--(IS_PRINT_ACKNOW = 'Y' and SEQ_NO = 2)
2nd illustration ... need a SQL query that will give me just the description with P_A ... P_A is merely an identifier ... can be anything ... just a way to say If P_A then print but IF P_PT_PO THEN print ...
P_A - Heater with 1.5" OD flange at 2.5", 48" mica leads with 36" SS braid exiting 90° from sheath, single clip support. 800 Watts & 240 Volts. For Gala pellitizer.
+ CHAR(13) +
P_PT_PO - Stamp "MIC #14661" on OD of heater. Silicone over Cement at lead ends.