I.T. Discussion Community!
-Collapse +Expand
DBA
Search DBA Group:

Advanced
-Collapse +Expand DBA Store
PRESTWOODSTORE

Prestwood eMagazine

February Edition
Subscribe now! It's Free!
Enter your email:

   ► MB LobbyDBA, Databases, & Data BoardInterbase Topic   Print This     

substring in stored proc?

substring in stored proc? in Interbase topic (part of our DBA, Databases, & Data group).

Quick Search: substring   substring stored   substring stored proc  
Ritche M
 (Inactive)
Philippines
how do we use substring is stored proc using variables. substring will only work with table columns.
ex. variable1 = 'borland'
how do we get 'land' from borland?

need help... thanks.
 Posted 18 years ago (Thread Starter)
Comment Quote
About Ritche M -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Email Not Verified!
Once email is verified, we will review and approve the account.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9530, 1 replies
Thread Started 5/2/2003 8:02:00 PM
View Counter=3710
Last Reply Posted 5/5/2003 10:17:00 AM)
Location=Philippines  
Joined=20 years ago   MB Posts=9  
Most Recent Post
Scott Wehrly
Prestwood IT
 (Inactive)
Las Vegas, NV USA
This is a common newbie predicament in InterBase SQL. Any function that you can execute on a TABLE column can be executed on a local variable...the trick is in the SELECT statement.



For instance, this statement between a VARCHAR variable and an INTEGER column in a table:

 SELECT vsPRODUCT = CAST(Product_ID AS VARYING CHARACTER) FROM PRODUCTS 


...can be reversed to assign the value to an integer variable like this:

SELECT viPRODID = CAST(vsPRODUCT AS INTEGER) FROM RDB$DATABASE  


Notice the difference. When working strictly with local variables, use a SELECT statement with RDB$DATABASE in the FROM clause.
 Posted 18 years ago
Comment Quote
About Scott Wehrly -Collapse +Expand
Visit Profile
Inactive member.
Member does not subscribe to this thread.
Old Account!
If this is your account, sign in to activate web presence data (sign in quarterly to keep active). Alternatively, you can subscribe to our monthly eMag with a valid email address.
Web Presence Hidden.
Once above is taken care of, full Profile content will display including back links, about me, my message, custom Profile html, social networking links, message board signature, company profile, etc.

Post ID #9536 (Level 1.1)  Reply to 9530
Thread Started 5/5/2003 10:17:00 AM
View Counter=2
Location=Las Vegas, NV USA 
Joined=19 years ago   MB Posts=442   KB Posts=19  

Revive Thread!

Add a comment to revive this old thread and make this archived thread more useful.

Write a Comment...
Full Editor
...
Sign in...

If you are a member, Sign In. Or, you can Create a Free account now.


Anonymous Post (text-only, no HTML):

Enter your name and security key.

Your Name:
Security key = P1266A1
Enter key:
Icon: A Post    Thread    Idea    Important!    Cool    Sad    No    Yes    Includes a Link...   
Thread #9530 Counter
3710
Since 4/2/2008

Follow PrestwoodBoards on: 


©1995-2021 PrestwoodBoards  [Security & Privacy]
Professional IT Services: Coding | Websites | Computer Tech