dbTalk Databases Forums  

how to truncate a table in Access

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss how to truncate a table in Access in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Rockitman
 
Posts: n/a

Default how to truncate a table in Access - 11-20-2008 , 05:28 PM






I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?

Reply With Quote
  #2  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM






Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #3  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #4  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #5  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #6  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #7  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #8  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #9  
Old   
Gerald Aichholzer
 
Posts: n/a

Default Re: how to truncate a table in Access - 11-21-2008 , 05:44 AM



Hi,

Rockitman wrote:
Quote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?
you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
  #10  
Old   
Girish Nanjangud
 
Posts: n/a

Default Re: how to truncate a table in Access - 12-01-2008 , 11:33 PM



hi gerald,

the delete command will only deletet rows in the MS Access and it wont
delete the blank spaces. the MS Access database will not free the memory
space occupied by table even though if you use the command DELETE * FROM
TABLE_NAM

so, my question is "is there any command like TRUNCATE TABLE_NAME in MS
Access database which will act simillar in the oracle data base"....

The TRUNCATE TABLE_NAME command in ORACLE will free the memory occupied by
the table....... i want the same functionality in MS Access...... and is it
possible in MS Access????

if any body have the answer for this please do reply to me on the e-mail id
given below

giri.nsg (AT) gmail (DOT) com




"Gerald Aichholzer" wrote:

Quote:
Hi,

Rockitman wrote:
I'm creating a local package in a 2000 SQL server that FTP's a flat file,
transforms this data to a table in an Access database, then transforms this
table to a table on the SQL server. We use the Access database for other
things, so don't ask why I'm not just moving the data straight to the SQL
table.
My problem is that unless I put out a clean Access file in the desired
directory (by clean, I mean that the table in it is blank) before this
package runs, it will error out because it will see duplicate entries in the
table.

So, how can I clear the contents of this Access table first, using this
local package?
Which task will do this? Is it possible?

you can use SQL (the Access syntax of course):

DELETE * FROM tablename

HTH,
Gerald


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.