Copy next 10 records to table

amerifax

Registered User.
Local time
Today, 05:03
Joined
Apr 9, 2007
Messages
304
In dBase I was able to do the following and end up with a 10 record table called Bob.dbf

copy next 10 to bob

Is there a way to do this in Access7.

Bob
 
Suppose the table you are working with is called tblOriginal

You can use this sql to Select 10 records from tblOriginal to a new table called tblBob in the same database.
Code:
SELECT TOP 10 tblOriginal.* INTO tblBob
FROM tblOriginal;
 
That appears to copy the 10 records above the cursor point...am I correct. How would you go about coping the entire table and/or just the structure itself. When you are doing the copy is it copying just the records or the entire database which would include the queries and forms?

Bob
 
That appears to copy the 10 records above the cursor point...am I correct. How would you go about coping the entire table and/or just the structure itself. When you are doing the copy is it copying just the records or the entire database which would include the queries and forms?

Bob

appears to copy the 10 records above the cursor point...am I correct.
SELECT TOP 10 tblOriginal.* INTO tblBob
FROM tblOriginal;
TOP 10:
Returns a certain number (10) records that fall at the top or the bottom of a range specified by an ORDER BY clause (default is ascending)

How would you go about coping the entire table
Code:
 SELECT tblOriginal.* INTO tblBob
FROM tblOriginal

just the structure itself.
Code:
SELECT tblOriginal.* INTO tblBOB
FROM  tblOriginal
WHERE  1 = 0
Since 1 is never = 0, no data is selected

When you are doing the copy is it copying just the records or the entire database which would include the queries and forms?
Just the records
 

Users who are viewing this thread

Back
Top Bottom