× The internal search function is temporarily non-functional. The current search engine is no longer viable and we are researching alternatives.
As a stop gap measure, we are using Google's custom search engine service.
If you know of an easy to use, open source, search engine ... please contact support@midrange.com.



<snip>
I have a flat file as below :

SRCSEQ SRCDAT SRCDTA
54.00 0 USDAUD 0000009414499 05/13/08
55.00 0 USDEUR 0000015482499 05/13/08
56.00 0 USDGBP 0000019474000 05/13/08

------------------------------------------------------------------------
------------

I want to extract from this file
USDGBP conversion rate 1.9474000 on date 05/13/08.

Can some one please help me with an SQL or any alternate solution. I
donot have any ideas how can I get period(.) after first digit example
: 1.9474000 as flat file comes as 19474000...
</snip>

Making the assumption that the number of leading digits is the same and
you are using my iDate(www.think400.dk/downloads.htm) to do the
conversion, you could do the following:

Select Decimal(Substring(InField,39,6) + '.' +
Substring(InField,44,7),13,7) As Amount, iDate(Substring(InField,50,8))
As MyDate
From FlatFile
Where Substring(InField,3,6) <> 'SRCSEQ'

If the number of decimal places is variable, that would require code but
how you would know that I don't know.

Don't assume my starting positiona are correct. I am just guessing.


As an Amazon Associate we earn from qualifying purchases.

This thread ...


Follow On AppleNews
Return to Archive home page | Return to MIDRANGE.COM home page

This mailing list archive is Copyright 1997-2024 by midrange.com and David Gibbs as a compilation work. Use of the archive is restricted to research of a business or technical nature. Any other uses are prohibited. Full details are available on our policy page. If you have questions about this, please contact [javascript protected email address].

Operating expenses for this site are earned using the Amazon Associate program and Google Adsense.