SQL Server Performance Forum – Threads Archive
How to get info. for the past 3 or 6 months?
Hi there~<br /><br />I need a help on SQL queries in order for me to show out the previous past 3 months or 6 months information.<br /><br />Eg: If i select past 3 months, the invoice no. issue out for jan, feb and march will show out. If i select past 6 months, the invoice no. issue out for oct, nov, dec, jan, feb and march will show out. Is there any idea i could do that?<br /><br /><br />Urgently need help on this. Thanks in advance~ [<img src=’/community/emoticons/emotion-2.gif’ alt=’
See if this helps:http://www.sql-server-performance.com/fk_datetime.asp —
Frank Kalis
Moderator
Microsoft SQL Server MVP
Webmaster:http://www.insidesql.de
<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Taurusgal83</i><br /><br />Hi there~<br /><br />I need a help on SQL queries in order for me to show out the previous past 3 months or 6 months information.<br /><br />Eg: If i select past 3 months, the invoice no. issue out for jan, feb and march will show out. If i select past 6 months, the invoice no. issue out for oct, nov, dec, jan, feb and march will show out. Is there any idea i could do that?<br /><br /><br />Urgently need help on this. Thanks in advance~ [<img src=’/community/emoticons/emotion-2.gif’ alt=’

<blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by DilliGrg</i><br /><br /><blockquote id="quote"><font size="1" face="Verdana, Arial, Helvetica" id="quote">quote:<hr height="1" noshade id="quote"><i>Originally posted by Taurusgal83</i><br /><br />Hi there~<br /><br />I need a help on SQL queries in order for me to show out the previous past 3 months or 6 months information.<br /><br />Eg: If i select past 3 months, the invoice no. issue out for jan, feb and march will show out. If i select past 6 months, the invoice no. issue out for oct, nov, dec, jan, feb and march will show out. Is there any idea i could do that?<br /><br /><br />Urgently need help on this. Thanks in advance~ [<img src=’/community/emoticons/emotion-2.gif’ alt=’


]]>