Discussion:
deleting multiples rows...
(too old to reply)
Geoff Wass [dBVIPS]
2008-11-02 07:02:58 UTC
Permalink
What format should I enter when deleting records of a table, using the
menuBar of dBasePlus V 2.5 when using the specified option to delete a
group of
records?
It shows ( )Current
( )Specified [ ] <---------
( )All
I am referring to the SPECIFIED option
Example: deleting rows 25 thru 52
I try several ways: 25-52, 25 52, 25 thru 52 at no avail.
Please help!
Thanks,
Ivan
Ivan,

The "specified" option is looking for a condition. If you have a field
called IDNum, you could say "IDNum > 24 and IDNum < 53". I don't use it
often, so I don't know how complex it can be. I normally use the Command
Window and:

use myTable
delete for IDNum > 24 and IDNum < 53 // dBASE command
delete where IDNum > 24 and IDNum < 53 // local SQL command

My habit is to use local SQL.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
*Lysander*
2008-11-02 15:36:27 UTC
Permalink
Here, we are going "bananas" between McCain vs. Obama, God help us.
It will soon be over and people will find that not too much actually
will change, at least not to the extreme. The US will probably find
their way back into the community of states who are respecting
democracy, human rights and territorial integrity - no matter if they
are lead by McCain or Obama.

And some people in these newsgroups hopefully will be able to apologize
for insulting each other over nearly nothing.
*Lysander*
2008-11-02 23:21:13 UTC
Permalink
I hope to have your help when I stuck in my programming code.
Always, if I still can. dBase was my passion for long years, until
it/they decided to betray me. Some people long gone from these
newsgroups (and some who still linger *g*) have helped me a lot over the
years and I am always delighted if I can give something back, even if it
is to somebody else :)
I am Ivan Benttini, just a dBase lover.
I am Andre Knappstein, you can call me the "ex" *g*
Geoff Wass [dBVIPS]
2008-11-03 06:07:35 UTC
Permalink
Geoff,
Very glad to here from you.
As always many THANKS for your devoted time and energy to us (people that
love dBASE but don't know as much).
It is my wishes that you and family are doing well.
Here, we are going "bananas" between McCain vs. Obama, God help us.
Ivan
Ivan,

It is good to hear from you, too. Thank-you for your well wishes.
Helping here is a pleasure for me. Your elections get followed up here,
too. We also had an election recently, ourselves, so I can sympathize
with your situation. However, we do have a very brief campaign compared
to the US model.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
*Lysander*
2008-11-03 06:42:40 UTC
Permalink
Post by Geoff Wass [dBVIPS]
However, we do have a very brief campaign compared
to the US model.
Who hasn't? :)
And a much cheaper one, I guess, which does not leave that many
obligations to "pay back" somehow for whoever would win.
Geoff Wass [dBVIPS]
2008-11-04 06:28:32 UTC
Permalink
Post by *Lysander*
Post by Geoff Wass [dBVIPS]
However, we do have a very brief campaign compared
to the US model.
Who hasn't? :)
And a much cheaper one, I guess, which does not leave that many
obligations to "pay back" somehow for whoever would win.
André,

The obligations are there pretty much everywhere, if you choose to look
for them. In some places they may be small in size and in other places
smaller in quantity, but the temptation is always there.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
unknown
2008-11-03 18:43:41 UTC
Permalink
On Mon, 3 Nov 2008 22:32:51 -0500 Ivan Benttini
Sender: "Ivan Benttini" <***@nc.rr.com>
wrote the following in:
Newsgroup: dbase.programming
What format should I enter when deleting records of a table, using the
menuBar of dBasePlus V 2.5 when using the specified option to delete a
group of
records?
It shows ( )Current
( )Specified [ ] <---------
( )All
I am referring to the SPECIFIED option
Example: deleting rows 25 thru 52
I try several ways: 25-52, 25 52, 25 thru 52 at no avail.
Please help!
Ivan,

Your question indicates that you did not press the 'Help' button, but just assumed that record
numbers.

When you have found out that the Table menu won't allow you to do what you want, you should not
immediately cry for help. Just make you own function to do the job :-)

Copy, Save and Run the code below my signature to see one way to solve the problem


Ivar B. Jessen

//----- Save as delFish.prg -----
/*
Usage:
c = {"3-5", "7", "9"}
delfish(c)
*/

function delFish(c)

copy Table :dbasesamples:Fish to Fish
use fish
goto top

for i = 1 to c.size
if "-" $ c[i]
nBegin = val(substr(c[i],1,at("-",c[i])))
nEnd = val(substr(c[i], rat("-", c[i]) + 1))
for j = nBegin to nEnd
goto j
delete
next j
else
goto val(c[i])
delete
endif
next i

list ID, Name
use
drop table Fish
//-----
Geoff Wass [dBVIPS]
2008-11-04 06:34:13 UTC
Permalink
Thanks Ivar,
It easy said than done, I don't have your experience yet, maybe some day?
Thanks so much for helping. I only go to you guys when I run out of what I
know
which is not much, you kind people are my only library plus Ken's book.
I don't "cry" often as much as I get disappointed. My learn abilities are
very different
then most people, I am handicap from a spinal cord surgery.
I have never seen a dBase book in book stores
Thanks again so much for showing me the right direction to resolve things.
Have yourself a nice week. Your new friend,
Ivan
Ivan,

Everyone here has gone through the same learning curve and the same
frustrations. There may be times you feel disappointed, as you say, but
don't let that keep you down. Keep on trying and don't hesitate to ask
questions here. People will be happy to help.
--
Geoff Wass [dBVIPS]
Montréal, Québec, Canada

.|.|.| dBASE info at http://geocities.com/geoff_wass |.|.|.
.|.|.| ---------------------------------------------------------- |.|.|.
.|.|.| IT Consultant http://Geoff_Wass.com |.|.|.
Loading...