Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Previous quater

Status
Not open for further replies.

Ajaygupta

Programmer
Mar 24, 2003
21
IN
hi

Dear

I am facing problem to get sql statement...

I want current year quater data, previous year quater, and current year previous quater as on date. How I will write the sql statement.

rgs
 
Create an object like:

(CHAR(YEAR(DATE)) || CHAR(MONTH(DATE)) )

to get the proper periods to choose from. (like 200303)
The exact syntax depends on your RDBMS , this syntax is for DB2.

Alternative is to work with calenderfiles........ T. Blom
Information analyst
tbl@shimano-eu.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top