﻿<?xml version='1.0' encoding='UTF-8'?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/"><channel><title>SQLServerCentral / SQL Server 2008 / T-SQL (SS2K8)  / Check Datetime Existence within multiple columns / Latest Posts</title><generator>InstantForum.NET v2.9.0</generator><description>SQLServerCentral</description><link>http://www.sqlservercentral.com/Forums/</link><webMaster>notifications@sqlservercentral.com</webMaster><lastBuildDate>Tue, 18 Jun 2013 22:16:14 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Check Datetime Existence within multiple columns</title><link>http://www.sqlservercentral.com/Forums/Topic1410486-392-1.aspx</link><description>replies here[url]http://www.sqlservercentral.com/Forums/Topic1410489-1292-1.aspx[/url]</description><pubDate>Wed, 23 Jan 2013 05:38:01 GMT</pubDate><dc:creator>anthony.green</dc:creator></item><item><title>Check Datetime Existence within multiple columns</title><link>http://www.sqlservercentral.com/Forums/Topic1410486-392-1.aspx</link><description>[font="Courier New"]Hi there,I've a BillDate as date, and a Mark as bit column in First table.(Mark=0 by default)In Second table I've FromDate as date, and ToDate as date Column.I want to set Mark=1 if BillDate is exists between FromDate &amp; ToDateLet Say In First Table the data is----------------------------BillDate             | Mark----------------------------2012-11-10 11:15:30  | 02012-12-12 09:00:00  | 0In Second Table the data is---------------------------------------------FromDate             | ToDate---------------------------------------------2012-11-01 07:00:00  | 2012-11-09 23:59:592012-12-08 07:00:00  | 2012-12-15 23:59:59So in the above scenario only the second row from First tablewhich is having, BillDate-&amp;gt;2012-12-12 09:00:00 will be Mark as 1because it comes between second row of second tableI hope I've explained my scenario,[/font]</description><pubDate>Wed, 23 Jan 2013 05:04:17 GMT</pubDate><dc:creator>adnan8t2</dc:creator></item></channel></rss>