Link to home
Start Free TrialLog in
Avatar of --TripWire--
--TripWire--

asked on

Using SQL's INSERT INTO in Access

I have a very simple question.

I have a comma-delimited text file (created from an Excel spreadsheet)
and I want to insert the values into an MDB.

BUT, I want to be able to specify which values go into which field into my MDB's table.

I've done this before with SQL server on a larger scale, but since this computer is a server, I don't want to have to download a large app like that.

Can I use SQL's INSERT INTO command just using Access 2002/2003?

Thanks
SOLUTION
Avatar of AkAlan
AkAlan

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Avatar of Scott McDaniel (EE MVE )
Scott McDaniel (EE MVE )
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Avatar of --TripWire--
--TripWire--

ASKER

I've Googled the TransferText command, but I'm still not sure where it should go.
In somewhere the Macro?
Tripwire,

Is this a onetime task or will be repeating this process on a regular basis.

If a one time thing you can do it manually. Look at LSMConsulting's recommendation.  

If the will be repeated, I will use a form. In a command button with  VbA code to use Helen's recommendation. .  
Hello,
This will be a one time task.  I need to group about 2-300 records and import them into an existing MDB.
Anybody know of any good step-by-step How-To pages for this?
Thanks for your answer - but the problem with that is I only want SOME columns to be imported.  The rest are irrelevant to the table.

Also, the table I wan to import the values into has an autonumber as it's PK.  Is there a way to autopopulate that column so the DB doesn't cry foul on lack of PK values?
An error occured trying to import file "C:zzz.xls." the file was not imported.
SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
See my comment above - it's not importing at all.
ASKER CERTIFIED SOLUTION
Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Thanks, that series worked.

Just a side note, I had some Type Conversion errors at first, but to solve that, I had to go into my spreadsheet and perform what's outlined in this link....

http://support.microsoft.com/kb/109376
You can import the whole sheet (or range) to a table of raw data, and then use a Select query to select the columns you need, and do data type conversion as needed.
Thanks for the info, but the articles deals in rows and is probably less work.
But I will definitely try your method as well.
Can someone please give me some advice on my latest requirement? Thanks

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_26874699.html