home
products
contribute
download
documentation
forum
Home
Forums
New posts
Search forums
What's new
New posts
All posts
Latest activity
Members
Registered members
Current visitors
Donate
Log in
Register
What's new
Search
Search
Search titles only
By:
New posts
Search forums
Search titles only
By:
Menu
Log in
Register
Navigation
Install the app
Install
More options
Contact us
Close Menu
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Overlapping programs cleanup script for TVGuide
Contact us
RSS
JavaScript is disabled. For a better experience, please enable JavaScript in your browser before proceeding.
You are using an out of date browser. It may not display this or other websites correctly.
You should upgrade or use an
alternative browser
.
Reply to thread
Message
<blockquote data-quote="Dirk" data-source="post: 65358" data-attributes="member: 11937"><p>The sql-scripts above are versions with a nice layout.</p><p>These here are the raw versions. (less spaces)</p><p><strong>The first (show) script:</strong></p><p>[code]Select p1.strTitle,p2.strTitle,p3.strTitle, p1.iStartTime, p2.iStartTime,p3.iEndTime, p1.iEndTime</p><p>From tblPrograms p1</p><p>, tblPrograms p2</p><p>, tblPrograms p3</p><p>where p2.iStartTime >= p1.iStartTime</p><p> and p2.iEndTime < p1.iEndTime</p><p> and p2.idChannel = p1.idChannel</p><p>and p3.iStartTime > p1.iStartTime</p><p> and p3.iEndTime <= p1.iEndTime</p><p> and p3.idChannel = p1.idChannel[/code]</p><p></p><p><strong>The second (delete) script</strong></p><p>[code]Delete tblPrograms p1</p><p>where exists (Select 0 from tblPrograms p2</p><p> where p2.iStartTime >= p1.iStartTime</p><p> and p2.iEndTime < p1.iEndTime</p><p> and p2.idChannel = p1.idChannel)</p><p>and exists (Select 0 from tblPrograms p3</p><p> where p3.iStartTime > p1.iStartTime</p><p> and p3.iEndTime <= p1.iEndTime</p><p> and p3.idChannel = p1.idChannel)</p><p>[/code]</p><p>This time I used the preview option!</p><p> :idea:</p></blockquote><p></p>
[QUOTE="Dirk, post: 65358, member: 11937"] The sql-scripts above are versions with a nice layout. These here are the raw versions. (less spaces) [b]The first (show) script:[/b] [code]Select p1.strTitle,p2.strTitle,p3.strTitle, p1.iStartTime, p2.iStartTime,p3.iEndTime, p1.iEndTime From tblPrograms p1 , tblPrograms p2 , tblPrograms p3 where p2.iStartTime >= p1.iStartTime and p2.iEndTime < p1.iEndTime and p2.idChannel = p1.idChannel and p3.iStartTime > p1.iStartTime and p3.iEndTime <= p1.iEndTime and p3.idChannel = p1.idChannel[/code] [b]The second (delete) script[/b] [code]Delete tblPrograms p1 where exists (Select 0 from tblPrograms p2 where p2.iStartTime >= p1.iStartTime and p2.iEndTime < p1.iEndTime and p2.idChannel = p1.idChannel) and exists (Select 0 from tblPrograms p3 where p3.iStartTime > p1.iStartTime and p3.iEndTime <= p1.iEndTime and p3.idChannel = p1.idChannel) [/code] This time I used the preview option! :idea: [/QUOTE]
Insert quotes…
Verification
Post reply
Forums
MediaPortal 1
Support
Electronic Program Guide
WebEPG
Overlapping programs cleanup script for TVGuide
Contact us
RSS
Top
Bottom