IBM Mainframe Forum Index
 
Log In
 
IBM Mainframe Forum Index Mainframe: Search IBM Mainframe Forum: FAQ Register
 

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


IBM Mainframe Forums -> DB2
Post new topic   Reply to topic
View previous topic :: View next topic  
Author Message
jajularamesh

New User


Joined: 21 Nov 2005
Posts: 8

PostPosted: Tue Nov 07, 2006 10:57 am
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: 1209
Location: Bangalore,India

PostPosted: Tue Nov 07, 2006 1:17 pm
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: 1448
Location: Chicago, IL

PostPosted: Thu Nov 09, 2006 9:40 am
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 All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts FUNCTION ADD-DURATION COBOL Programming 11
No new posts Queue application affecting performance CICS 12
No new posts Two where-criteria with GT - Performa... DB2 4
No new posts COBOL 6.4 - User Defined Function nee... COBOL Programming 6
No new posts Calling an Open C library function in... CICS 1
Search our Forums:


Back to Top