![]() | |
#1
| |||
| |||
|
#2
| |||
| |||
|
|
I have a database with a field named PULLED? that is either a "Y" or blank. How do I write code to go through and delete all the people with a "Y" in the PULLED? field, and put them into a new database in the same directory called PEOPLE PULLED.db? I started out, but got a little nervous because the query was writing automatically to the :PRIV: directory... I was unsure just what checking I should be using (for existing tables, etc.). -b |
#3
| |||
| |||
|
|
I have a database with a field named PULLED? that is either a "Y" or blank. How do I write code to go through and delete all the people with a "Y" in the PULLED? field, and put them into a new database in the same directory called PEOPLE PULLED.db? I started out, but got a little nervous because the query was writing automatically to the :PRIV: directory... I was unsure just what checking I should be using (for existing tables, etc.). -b |
#4
| |||
| |||
|
|
I have a database with a field named PULLED? that is either a "Y" or blank. How do I write code to go through and delete all the people with a "Y" in the PULLED? field, and put them into a new database in the same directory called PEOPLE PULLED.db? I started out, but got a little nervous because the query was writing automatically to the :PRIV: directory... I was unsure just what checking I should be using (for existing tables, etc.). -b |
#5
| |||
| |||
|
|
By default, when records are deleted in a query, does it always go to :PRIV:deleted.db? |
|
If it does, I can code to just copy that file to what I want, and I think that will take care of the issue. |
#6
| |||
| |||
|
|
By default, when records are deleted in a query, does it always go to :PRIV:deleted.db? If it does, I can code to just copy that file to what I want, and I think that will take care of the issue. -b |
eleted.db to "People Pulled.db"|
"Willard J. Hoppe" <billh (AT) nospam (DOT) brraspam.com> wrote in message news:43c7d29d$1 (AT) pnews (DOT) thedbcommunity.com... I have a database with a field named PULLED? that is either a "Y" or blank. How do I write code to go through and delete all the people with a "Y" in the PULLED? field, and put them into a new database in the same directory called PEOPLE PULLED.db? I started out, but got a little nervous because the query was writing automatically to the :PRIV: directory... I was unsure just what checking I should be using (for existing tables, etc.). -b |
#7
| |||
| |||
|
|
"Willard J. Hoppe" wrote: By default, when records are deleted in a query, does it always go to :PRIV:deleted.db? by default, yes.. If it does, I can code to just copy that file to what I want, and I think that will take care of the issue. do what Michael said.. query out the records, rename the table or add the records, THEN delete the records.. that way, you can error trap along the way, save your butt if the process fails in the middle, etc, etc., etc.. dee-fense.. dee-fense.. -- Steven Green - Waldorf Maryland USA Diamond Software Group http://www.diamondsg.com/main.htm Paradox Support & Sales - Corel CTech Paradox --------------------------------------------------- Diamond Sports Gems http://www.diamondsg.com/gemsmain.htm Trading Cards and other Sports Memorabilia --------------------------------------------------- |
#8
| |||
| |||
|
|
Why not to use "subtract" table in that case? |
#9
| |||
| |||
|
|
I suggest: 1. Make a backup of your main table!!! 2. Create an empty Table named PeoplePulled, borrowing the Structure and Family from the main table 3. Run a query on the main table, extracting all the fields in records where PULLED = Y 4. Copy this ANSWER table into the Empty table. 5. Run a query on the main table, deleting all records where PULLED = Y Mike |
#10
| |||
| |||
|
|
By default, when records are deleted in a query, does it always go to :PRIV:deleted.db? |
riv:deleted.db"![]() |
| Thread Tools | |
| Display Modes | |
| |