Microsoft
Software
Hardware
Network
Question : Simple SQL Query Date Command
Hi SQL Experts,
I need help with a simple select statement.
I have a tenant table with field called 'dtleaseto' that holds the last date of the lease. I want to run a select statement to return all tenant records that have their 'dtleaseto' date ending within 30 days of today.
Answer : Simple SQL Query Date Command
select *
from tenent
where dtLeaseTo Between CONVERT(varchar(10), getdate(), 120 ) AND CONVERT(varchar(10), getdate()+30, 120 )
Random Solutions
Delivery Receipt's getting Queued
Using Integration Services how to create a pipe line delimited text file against a T-SQL script?
PHPMAILER: Sending mutiple Emails to different addresses with one instance/connection?
where-object does not filter out quilifying values for -notmatch
public folders do not replicate in exchange 2003. rpc errors in event log
Merging Windows 2003 Domains in same Forest
Temp Files Appearing On my Desktop Like A Rash
Return code or error message returned by Sybase when rollback trigger with raiserror is executed
Replace a file using a login script
550 Sender verify failed