Question : display the messages to a specific conversation

Not sure which one to do I will build it right away.
how should I setup the stored proc.

-- to display in repeater
--
-- Method #1:- in the received order (not as conversation view) ----------------
select * from #messages order by messageid desc

-- Method #2:- in conversation view (as in gmail) ----------------
-- this will reorder the message in a way that reply to a message will appear exactly below to its initial message
select a.*
            from #messages a left outer join
            (
                  select ltrim(rtrim(cast(messageid  as varchar(10)))) as Location, * from #messages
                              where initialMessageID is null
            ) b
on a.initialMessageID = b.messageID
order by
      case when a.initialMessageID is null
                        then ltrim(rtrim(cast(a.messageID as varchar(10))))
                  else
                        ltrim(rtrim(cast(a.initialMessageID as varchar(10)))) + '_' +
                        ltrim(rtrim(cast(a.messageid as varchar(10))))  
            end

Answer : display the messages to a specific conversation

http://www.codeproject.com/KB/string/SqlRegEx.aspx

Alternatively, using/setting up an ASP/ASP.Net page that will query the table/field strip out the HTML and update the entry.

If you have perl on your system you might be able to use it to do the same task.

Random Solutions  
 
programming4us programming4us