﻿<?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 2005 / SQL Server 2005 General Discussion  / 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>Fri, 24 May 2013 07:10:10 GMT</lastBuildDate><ttl>20</ttl><item><title>RE: Check Datetime Existence within multiple columns</title><link>http://www.sqlservercentral.com/Forums/Topic1410490-149-1.aspx</link><description>Dont cross post.. it wastes time of other people. Original post here [url]http://www.sqlservercentral.com/Forums/Topic1410489-1292-1.aspx[/url]</description><pubDate>Wed, 23 Jan 2013 05:20:59 GMT</pubDate><dc:creator>Bhuvnesh</dc:creator></item><item><title>Check Datetime Existence within multiple columns</title><link>http://www.sqlservercentral.com/Forums/Topic1410490-149-1.aspx</link><description>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,</description><pubDate>Wed, 23 Jan 2013 05:06:39 GMT</pubDate><dc:creator>adnan8t2</dc:creator></item></channel></rss>