Viewing 12 posts - 1 through 12 (of 12 total)
Create table #temp(
DocNum nvarchar (50),
BegAttach nvarchar (50),
EndAttach nvarchar (50),
AttachLevel nvarchar (50),
AttachmentID nvarchar (50)
)
;
insert into #temp(DocNum, BegAttach, EndAttach, AttachLevel, AttachmentID) values
('ABC001','ABC001','ABC003','0','ABC002; ABC003'),('ABC002','ABC001','ABC003','1',''),('ABC003','ABC001','ABC003','1',''),
('DCF001','DCF001','DCF004','0','DCF002; DCF003; DCF004'),('DCF002','DCF001','DCF004','1',''),('DCF003','DCF001','DCF004','1',''),('DCF004','DCF001','DCF004','1','')
;
select *
from #temp
;
drop table #temp
Hi Luis,
I have another...
September 11, 2015 at 2:29 pm
Thank you Luis! I think you used the row_number function for each row and partition by the attachpid so that each new attachpid restarts at 1 again, which is perfectly...
October 25, 2014 at 10:54 am
Thank you Luis! You are awesome! I will create the sample data next time if I need to post. I can't believe loop is not needed for this but somehow...
October 23, 2014 at 8:13 pm
Thank you capnhector. Look like I have more readings to do. 🙂
October 29, 2012 at 11:00 am
Capnhector,
So I got what I needed however I need to update a field in Tbldoc (maybe called as UPDATEDTO).
What I can see in the last statement(below) is more like...
October 27, 2012 at 9:59 am
Thank you so much Capnhector. That makes a lot of senses now. I have the ID field, which is unique. I have to take out the group by clause. and...
October 27, 2012 at 9:30 am
Hi Sean,
I figured out what the dbo.DelimitedSplit8K function is and have it run successfully.
with cte as
(
select 1 as listid, [To] as tolist from tblDoc where [To]IS not null AND...
October 26, 2012 at 5:58 pm
Hi capnhector,
Thank you for your explanation. I am getting the picture now. I think I need to add the function in first. Without doing so, I can't really tell if...
October 26, 2012 at 4:33 pm
Hi Sean,
Instead of using:
-----------------------------------------------------------------------------------------------------
with cte as
(
select 1 as ListID, 'John Doe1 <John.Doe1@abc.com>; Mary Doe1 <Mary.Doe1@abc.com>' as ToList union all
select 2, 'John Doe3 <John.Doe3@abc.com>; Mary Doe1 <Mary.Doe2@abc.org>Some longer name <LongEmailAddressHere@LongDomainName.com>;Short...
October 26, 2012 at 4:26 pm
Thank you Lowell and Sean! Much appreciated!
This reply post is for Lowell. I am testing out your codes and I think I'm slightly not getting some part of the codes....
October 26, 2012 at 4:15 pm
I may need your help again
I asked you for help with the From field however I am coning across another problem similar to this but this time it's a TO...
October 26, 2012 at 10:39 am
Thank you so much to both of you!. It works perfectly. Much appreciated!
October 23, 2012 at 10:04 am
Viewing 12 posts - 1 through 12 (of 12 total)