Subject | RE: [firebird-support] Re: Equivalent of VFP6 LEFT() in FB |
---|---|
Author | Peter J. Gore |
Post date | 2004-09-14T08:39:47Z |
If you want to use substring the syntax is
SELECT SUBSTRING( MyCharField FROM 1 FOR 5) FROM MyTable
Is equivalent to VFP
SELECT LEFT(MyCharField,5) FROM TyTable
You only need to CAST if the selected field is not of character type.
Peter Gore
Project Manager IT
(ddi) 01277 376433
(swb) 01277 372916
(mob) 07952 695755
________________________________
From: vso_ad1@... [mailto:vso_ad1@...] On Behalf Of
Namit Nathwani
Sent: 14 September 2004 06:12
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Equivalent of VFP6 LEFT() in FB
Hi
Thanks for responding.
At 08:19 pm 13/09/2004, you wrote:
SUBSTRING(CAST(mAddress) as VARCHAR(100)) FROM 1 FOR 44)
this didn't work. Any other suggestions.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://ahmedabad.sancharnet.in/vso_ad1/
namitbn@...
___________________________________________
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=1299lpvdj/M=295196.4901138.6071305.3001176/
D=groups/S=1705115386:HM/EXP=1095225739/A=2128215/R=0/SIG=10se96mf6/*htt
p:/companion.yahoo.com>
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=404739614>
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
Service <http://docs.yahoo.com/info/terms/> .
__________________________________________________________________________
TM Retail, Ashwells Road, Brentwood, Essex CM15 9ST
This e-mail including any attachments is intended only for the addressee
named above and it may contain confidential or privileged information.
If you are not the intended recipient please notify the sender and note
that the contents must not be disclosed to anyone else, no copies can be
taken and all existing copies must be destroyed.
TM Retail will not be liable for any error in transmission.
You should carry out your own virus checks before opening any attachments.
Opinions, conclusions and other information in this message
and attachments that do not relate to the official business
of TM Retail are neither given nor endorsed by it.
TM Retail is the trading name of Forbuoys Limited.
[Non-text portions of this message have been removed]
SELECT SUBSTRING( MyCharField FROM 1 FOR 5) FROM MyTable
Is equivalent to VFP
SELECT LEFT(MyCharField,5) FROM TyTable
You only need to CAST if the selected field is not of character type.
Peter Gore
Project Manager IT
(ddi) 01277 376433
(swb) 01277 372916
(mob) 07952 695755
________________________________
From: vso_ad1@... [mailto:vso_ad1@...] On Behalf Of
Namit Nathwani
Sent: 14 September 2004 06:12
To: firebird-support@yahoogroups.com
Subject: [firebird-support] Re: Equivalent of VFP6 LEFT() in FB
Hi
Thanks for responding.
At 08:19 pm 13/09/2004, you wrote:
>for varchar fields you can useWith your help I have tried this for a character field and it works
>SUBSTRING(value FROM startpos [FOR length])
>SUBSTRING(CAST(value) as VARCHAR(100)) FROM startpos [FOR length])Here I assume value means the field name? So I created something like
SUBSTRING(CAST(mAddress) as VARCHAR(100)) FROM 1 FOR 44)
this didn't work. Any other suggestions.
Regards
Bhavbhuti
___________________________________________
Softwares for Indian Businesses at:
http://ahmedabad.sancharnet.in/vso_ad1/
namitbn@...
___________________________________________
----------
---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.760 / Virus Database: 509 - Release Date: 10/09/2004
[Non-text portions of this message have been removed]
Yahoo! Groups Sponsor
ADVERTISEMENT
click here
<http://us.ard.yahoo.com/SIG=1299lpvdj/M=295196.4901138.6071305.3001176/
D=groups/S=1705115386:HM/EXP=1095225739/A=2128215/R=0/SIG=10se96mf6/*htt
p:/companion.yahoo.com>
<http://us.adserver.yahoo.com/l?M=295196.4901138.6071305.3001176/D=group
s/S=:HM/A=2128215/rand=404739614>
________________________________
Yahoo! Groups Links
* To visit your group on the web, go to:
http://groups.yahoo.com/group/firebird-support/
* To unsubscribe from this group, send an email to:
firebird-support-unsubscribe@yahoogroups.com
<mailto:firebird-support-unsubscribe@yahoogroups.com?subject=Unsubscribe
>* Your use of Yahoo! Groups is subject to the Yahoo! Terms of
Service <http://docs.yahoo.com/info/terms/> .
__________________________________________________________________________
TM Retail, Ashwells Road, Brentwood, Essex CM15 9ST
This e-mail including any attachments is intended only for the addressee
named above and it may contain confidential or privileged information.
If you are not the intended recipient please notify the sender and note
that the contents must not be disclosed to anyone else, no copies can be
taken and all existing copies must be destroyed.
TM Retail will not be liable for any error in transmission.
You should carry out your own virus checks before opening any attachments.
Opinions, conclusions and other information in this message
and attachments that do not relate to the official business
of TM Retail are neither given nor endorsed by it.
TM Retail is the trading name of Forbuoys Limited.
[Non-text portions of this message have been removed]