Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 Other Forums
 MS Access
 #error

Author  Topic 

Danny__T
Starting Member

27 Posts

Posted - 2004-09-20 : 20:59:37
I'm trying to extract a multiple insert script from some data i have in an access database in order to run it on a sql server db (I can REALLY annoyingly only insert data through executing queries because of a basic web interface - so no importing :()

here is my access query:

SELECT 'INSERT INTO tblJobs (employerId, description, Job_Title, DisciplineId, Date_Created, Your_Reference, Contact, Start_Date, LevelId, CountryId, CountyId,SalaryId, perm_TempId) VALUES(''some@email.com'', '''+[qryFINAL].[LongDescription]+''', '''+[qryFINAL].[ShortDescription]+''', '+[qryFINAL].[jobTypeId]+', '''+Format([qryFINAL].[datecr],"dd/mm/yy")+''', '''+[qryFINAL].[YOURREF]+''', '''+[qryFINAL].[Contact]+''', '''+[qryFINAL].[StartDate]+''', '+[qryFINAL].[levelId]+', 1, '+[qryFINAL].[countyId]+', '+[qryFINAL].[salaryId]+', '+[qryFINAL].[PermTempId]+')' AS InsertScript
FROM qryFINAL
ORDER BY qryFINAL.DATECR DESC;


The query executes but all i can see is #error for every record? if anyone can help me at all i'll be very grateful

RickD
Slow But Sure Yak Herding Master

3608 Posts

Posted - 2004-09-21 : 06:42:35
You Values list isn't in the same order as the field list for a start....
Go to Top of Page
   

- Advertisement -