Geeks Talk

Prepare for your Next Interview


Welcome to the Geeks Talk forums.

You are currently viewing our boards as a guest which gives you limited access to view most discussions and access our other features. By joining our free community you will have access to post topics, communicate privately with other members (PM), respond to polls, upload content and access many other special features. Registration is fast, simple and absolutely free so please, join our community today!

If you have any problems with the registration process or your account login, please contact contact us.

Question of the Day : SubString Usage

This is a discussion on Question of the Day : SubString Usage within the Database General forums, part of the Databases category; Hello All, Let’s see how many of you work with different databases and programming languages.... List the usage of substring with sample code in various databases like Oracle, SQL Server. ...

Go Back   Geeks Talk > Databases > Database General
Register Blogs FAQ Tag Cloud Calendar Mark Forums Read

Database General Database common Questions

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Jun 2006
Posts: 140
Thanks: 2
Thanked 12 Times in 9 Posts
Jim.Anderson is on a distinguished road
Question of the Day : SubString Usage

Hello All,

Let’s see how many of you work with different databases and programming languages....

List the usage of substring with sample code in various databases like Oracle, SQL Server. My SQL, DB2 and Programming languages like c, c++, vb. vb.net, C#, java, jsp and so on

Thanks,
Jim
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Jun 2006
Posts: 140
Thanks: 2
Thanked 12 Times in 9 Posts
Jim.Anderson is on a distinguished road
Re: Question of the Day : SubString Usage

The Substring command returns the portion of source defined by firstChar and numChars.
Reply With Quote
  #3 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: Question of the Day : SubString Usage

substr(main, start[, length]);

While 'main' is a string argument,
'start position' & 'length required' are numeric.

It returns 'length' number of characters of 'main' starting from the character at position 'start'.

'length' is optional. If omitted, the function returns the rest of the characters from the position 'start'.

Last edited by sutnarcha; 12-12-2006 at 01:18 PM.
Reply With Quote
  #4 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Jun 2006
Posts: 140
Thanks: 2
Thanked 12 Times in 9 Posts
Jim.Anderson is on a distinguished road
Re: Question of the Day : SubString Usage

Quote:
Originally Posted by sutnarcha View Post
substr(main, start[, length]);

While 'main' is a string argument,
'start position' & 'length required' are numeric.

It returns 'length' number of characters of 'main' starting from the character at position 'start'.

'length' is optional. If omitted, the function returns the rest of the characters from the position 'start'.
Sutnarcha, Please update post with programming launguage... Thanks, Jim
Reply With Quote
  #5 (permalink)  
Old 12-12-2006
Expert Member
 
Join Date: Nov 2006
Location: Hyd-IND
Posts: 528
Thanks: 1
Thanked 63 Times in 50 Posts
sutnarcha is on a distinguished road
Re: Question of the Day : SubString Usage

Well, this is general syntax.
But if I have to name the programming language, I would say C/C++.
Reply With Quote
Reply

  Geeks Talk > Databases > Database General

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is On
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads

Thread Thread Starter Forum Replies Last Post
Usage of QBASIC sripri Windows 2 10-13-2008 09:49 AM
Usage of function janelyn C and C++ 2 11-12-2006 02:11 PM
Usage of this Command sripri Unix/Linux 1 11-12-2006 01:57 PM
What is the Usage of this Command RyanJames Unix/Linux 1 08-20-2006 12:17 AM
Usage of this command Bessie Unix/Linux 1 08-17-2006 01:08 AM


All times are GMT -4. The time now is 10:42 AM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO 3.3.1
Copyright © 2005 - 2010 GeekInterview.com. All Rights Reserved