Portal | Manuals | References | Downloads | Info | Programs | JCLs | Master the Mainframes
IBM Mainframe Computers Forums Index
 
Register
 
IBM Mainframe Computers Forums Index Mainframe: Search IBM Mainframe Forum: FAQ Memberlist Usergroups Profile Log in to check your private messages Log in
 

 

which function is better YEAR(col) or SUBSTR() (performance)

 
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2
View previous topic :: :: View next topic  
Author Message
jajularamesh
Currently Banned

New User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Tue Nov 07, 2006 10:57 am    Post subject: which function is better YEAR(col) or SUBSTR() (performance)
Reply with quote

which function is better YEAR(col) or SUBSTR() performance wise.Actually both are functions so performance will go down.i am using these these functions repeatedly so i wanted to make sure which is better of the two functins.
Back to top
View user's profile Send private message

guptae

Moderator


Joined: 14 Oct 2005
Posts: 1187
Location: Bangalore,India

PostPosted: Tue Nov 07, 2006 1:17 pm    Post subject:
Reply with quote

Hi Jajularamesh ,

Both the function are for different purpose.
Year() : to find out year of passed given date
Substr():Gives substring of passed string
Back to top
View user's profile Send private message
priyesh.agrawal

Senior Member


Joined: 28 Mar 2005
Posts: 1452
Location: Chicago, IL

PostPosted: Thu Nov 09, 2006 9:40 am    Post subject: Re: which function is better YEAR(col) or SUBSTR() (performa
Reply with quote

My cards are on SUBSTR... as we would pass specifically which characters to pick out... Wild guess though...
Back to top
View user's profile Send private message
View previous topic :: :: View next topic  
Post new topic   Reply to topic    IBMMAINFRAMES.com Support Forums -> DB2 All times are GMT + 6 Hours
Page 1 of 1

 

Search our Forum:

Similar Topics
Topic Author Forum Replies Posted
No new posts What is the Extract Function in JCL dharmaraok JCL & VSAM 3 Wed Jun 14, 2017 9:12 am
No new posts CONTIG for performance? JPVRoff JCL & VSAM 7 Fri Jun 09, 2017 8:39 am
No new posts SUBSTR for Date functions Shaheen Shaik DB2 4 Thu Apr 06, 2017 2:14 pm
No new posts SORT to append Month and YEAR in MMYY... tisamf DFSORT/ICETOOL 1 Wed Mar 08, 2017 4:46 pm
No new posts 2 byte YEAR from Y'DATE2' field tecnokrat DFSORT/ICETOOL 2 Tue Feb 07, 2017 12:05 pm


Facebook
Back to Top
 
Mainframe Wiki | Forum Rules | Bookmarks | Subscriptions | FAQ | Tutorials | Contact Us