Forum Replies Created

Viewing 12 posts - 1 through 12 (of 12 total)

  • RE: Get the total number of attachments of a group ID

    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...

  • RE: Help with looping

    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...

  • RE: Help with looping

    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...

  • RE: Parsing out email address in FROM field

    Thank you capnhector. Look like I have more readings to do. 🙂

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    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....

  • RE: Parsing out email address in FROM field

    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...

  • RE: Parsing out email address in FROM field

    Thank you so much to both of you!. It works perfectly. Much appreciated!

Viewing 12 posts - 1 through 12 (of 12 total)