How to search and retrive a value

General Help regarding HMG, Compilation, Linking, Samples

Moderator: Rathinagiri

User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to search and retrive a value

Post by esgici »

RPC wrote: Sun Dec 03, 2017 7:03 am ...
it is not two cents worth but two million dollar worth of code for me.
Another way of processing text file. I love it.
...
Hi Rajeev

Many thanks to your nice words for me :)

But please do not exaggerate, it was only a humble work for friends :oops:

By the way; if you want we can raise the bar:

for example converting a CSV ( or DSV ;) ) file to .dbf;

what is your opinion ?

Regards
Viva INTERNATIONAL HMG :D
jayadevu
Posts: 238
Joined: Tue May 19, 2009 7:10 am

Re: How to search and retrive a value

Post by jayadevu »

Very nice code Esgici.

Warm regards,

Jayadev
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to search and retrive a value

Post by esgici »

jayadevu wrote: Sun Dec 03, 2017 4:59 pm Very nice code Esgici.
...
Thanks Jayadevu;

just your grace :D

Regards
Viva INTERNATIONAL HMG :D
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: How to search and retrive a value

Post by RPC »

esgici wrote: Sun Dec 03, 2017 1:58 pm
RPC wrote: Sun Dec 03, 2017 7:03 am ...
it is not two cents worth but two million dollar worth of code for me.
Another way of processing text file. I love it.
...
Hi Rajeev

Many thanks to your nice words for me :)

But please do not exaggerate, it was only a humble work for friends :oops:

By the way; if you want we can raise the bar:

for example converting a CSV ( or DSV ;) ) file to .dbf;

what is your opinion ?

Regards
Many thanks for offering help to convert from CSV to DBF.
At present I am interested in getting just one value from CSV file.
I will certainly ask in case I am interested in CSV to DBF conversion,
thanks
With Best Wishes
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to search and retrive a value

Post by esgici »

RPC wrote: Mon Dec 04, 2017 11:27 am ...
I will certainly ask in case I am interested in CSV to DBF conversion,
...
OK, I will start,

please remain in line ;)

Regards :D
Viva INTERNATIONAL HMG :D
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: How to search and retrive a value

Post by RPC »


...
please remain in line ;)
...
Ok, I am all eyes and ears. :D
franco
Posts: 816
Joined: Sat Nov 02, 2013 5:42 am
DBs Used: DBF
Location: Canada

Re: How to search and retrive a value

Post by franco »

rajeev,
I needed this exact situation and I used rat()
you keep shortening the long string until you get to right comma
local a:=0, b:=longstring, c := 'strwanted'
a:= val(substr(b ,rat(c,b)-1
//here you can make your 6 loops.
b:=substr(b,1,a)
a:=val(substr(b,rat(',',b)-1

// this works for me I can find any point in string or field.
regards Franco ;)
All The Best,
Franco
Canada
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: How to search and retrive a value

Post by RPC »

franco wrote: Tue Dec 05, 2017 7:10 pm rajeev,
I needed this exact situation and I used rat()
you keep shortening the long string until you get to right comma
local a:=0, b:=longstring, c := 'strwanted'
a:= val(substr(b ,rat(c,b)-1
//here you can make your 6 loops.
b:=substr(b,1,a)
a:=val(substr(b,rat(',',b)-1

// this works for me I can find any point in string or field.
regards Franco ;)
Thanks Franco.
I will try and report.
User avatar
esgici
Posts: 4543
Joined: Wed Jul 30, 2008 9:17 pm
DBs Used: DBF
Location: iskenderun / Turkiye
Contact:

Re: How to search and retrive a value

Post by esgici »

RPC wrote: Mon Dec 04, 2017 11:27 am ...
I am interested in CSV to DBF conversion,
...
Hi Rajeev (and all of course )

As promised:

as name implied ...
as name implied ...
ScreenShotOf_DSV2DBF.prg.jpg (43.28 KiB) Viewed 4009 times
DSV2DBF.zip
DSV2DBF source files and resources
(5.42 KiB) Downloaded 209 times

Please don't forgive my faults :arrow:

Once again:

HMG is a miracle; built by a genius, thousands of fools couldn't break

Viva HMG :D
Viva INTERNATIONAL HMG :D
RPC
Posts: 281
Joined: Fri Feb 10, 2017 4:12 am
DBs Used: DBF

Re: How to search and retrive a value

Post by RPC »

RPC wrote: Wed Dec 06, 2017 10:58 am Thanks Franco.
I will try and report.
Franco
I tried your code and it works like charm :!: and its so simple :D
Many Thanks
I am really thankful to all those who have helped me in this code.
Post Reply