if that is kinda example you want to parse ( 0000023674 - V4 ) well, just use Right function in sql. Right(str,1)...you'll get 4. Right? If you want it in a hard way and you don't know where is the position of letter V....if that letter V occurs only once in a certain string....u can use:
Select mid(str,1,instr(fld,'V')-length(str)) from tbl_name where........
i didn't test this but i have previous applications of this. Happy Coding!
Jesse Bryant <[EMAIL PROTECTED]> wrote:
That will work but if it's a one digit number it'll be simpler to use..... oh what is it now... Right()?Jesse.-----Original Message-----
From: sanat kumar mishra [mailto:[EMAIL PROTECTED]
Sent: Wednesday, 27 October 2004 4:48 PM
To: [EMAIL PROTECTED]
Subject: Re: PSC SQL - splitting dataUSE MID FUNCTION AND INSIDE IT USE THE INSTR TO GET THE POSITION OF THE CHARACTER U R SEARCHING.
On Wed, 27 Oct 2004 miss_mystikal wrote :
>Hi, how to split data like this:
>
>0000023674 - V4
>
>I want to get the number after �V�.
>
>Can we do it in SQL? I have one table and they are thousand records with
>similar id.
>
>Instead of using loop in VB, is there any other way to cut the number?
>
>
>---
>Outgoing mail is certified Virus Free.
>Checked by AVG anti-virus system (http://www.grisoft.com).
>Version: 6.0.762 / Virus Database: 510 - Release Date: 9/13/2004
>
Yahoo! Messenger - Communicate instantly..."Ping" your friends today! Download Messenger Now
To unsubscribe, send an email to:
[EMAIL PROTECTED]
| Yahoo! Groups Sponsor | |
|
|
Yahoo! Groups Links
- To visit your group on the web, go to:
http://groups.yahoo.com/group/PlanetSourceCode/
- To unsubscribe from this group, send an email to:
[EMAIL PROTECTED]
- Your use of Yahoo! Groups is subject to the Yahoo! Terms of Service.
