Geeks Talk

Prepare for your Next Interview




Get records from table month, day, year wise.

This is a discussion on Get records from table month, day, year wise. within the DB2 forums, part of the Databases category; How to get the records from table only month wise, day wise, year wise. If the records are arrange in the form of dd-mm-yyyy. Question asked by visitor ...


Go Back   Geeks Talk > Databases > DB2

Register FAQ Members List Calendar Mark Forums Read
  #1 (permalink)  
Old 06-06-2007
Expert Member
 
Join Date: Feb 2007
Posts: 1,279
Thanks: 0
Thanked 164 Times in 138 Posts
Geek_Guest is on a distinguished roadGeek_Guest is on a distinguished road
Get records from table month, day, year wise.

How to get the records from table only month wise, day wise, year wise.
If the records are arrange in the form of dd-mm-yyyy.

Question asked by visitor sunil bansal
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-11-2007
Junior Member
 
Join Date: May 2007
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
kckinney is on a distinguished road
Re: Get records from table month, day, year wise.

Could you rephrase the question? Are you trying the select on a specific month, day or year? Or could you be trying to reformat the key for output?

kk
Reply With Quote
  #3 (permalink)  
Old 06-12-2007
Junior Member
 
Join Date: May 2007
Posts: 16
Thanks: 0
Thanked 3 Times in 3 Posts
SQLTweety is on a distinguished road
Re: Get records from table month, day, year wise.

Sunil ,
Did you mean that you want fetch records only for perticular month / year / day?
If yes,

To get the records for for perticular month


Select * from my_table where month(my_date_Column)= month_i_want.


Similarly for year ,

Select * from my_table where Year(my_date_Column)= Year_i_want.


HTH

Regards,
Reply With Quote
Reply

  Geeks Talk > Databases > DB2


Thread Tools
Display Modes


Similar Threads

Thread Thread Starter Forum Replies Last Post
How to retrieve top 10 records from ORACE Table ppooven Oracle 2 07-12-2007 07:49 AM
Department wise max salary Geek_Guest Oracle 2 06-16-2007 09:22 AM
How to get the result column wise dhandhan QTP 3 04-19-2007 05:05 AM
I want to load odd number records into one target table ggk.krishna Data Warehousing 2 04-18-2007 12:22 AM
I want load the duplicate records to seperate table Geek_Guest Data Warehousing 4 04-06-2007 03:10 AM


All times are GMT -4. The time now is 01:48 PM.


Powered by vBulletin® Version 3.6.8
Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.1.0
Copyright © 2008 GeekInterview.com. All Rights Reserved