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: 1208
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 View Bookmarks
All times are GMT + 6 Hours
Forum Index -> DB2

 


Similar Topics
Topic Forum Replies
No new posts Calling an Open C library function in... CICS 1
No new posts DATE2 function SYNCSORT 15
No new posts exploiting Z16 performance PL/I & Assembler 2
No new posts Help on PL/I jsonPutValue function PL/I & Assembler 8
No new posts how to use Tso outtrap external function All Other Mainframe Topics 8
Search our Forums:

Back to Top