If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > PC based Database Applications > Microsoft Excel > Too few parameters error when Get External Access Data

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 07-08-04, 01:01
aaronkuok aaronkuok is offline
Registered User
 
Join Date: Jul 2004
Posts: 1
Too few parameters error when Get External Access Data

I use Excel as a front-end for an Access database.

I have tried running a manual Get External Data > New Database Query, and it seems to connect to the Access database fine because it lists the fields and lets me select them and so on, but when I click "Finish" to import the data it comes back with an error "Too few parameters. Expected 7."

My SQL statement doesn't use any parameter passing and it works fine in Access. The SQL is as follow :

SELECT [rptFormat].[type], [rptFormat].[group], (IIF([res1].[GP_TTL] > 0, [res1].[GP_TTL], 0)) AS [ttl]
FROM [rptFormat]
LEFT JOIN
(
(SELECT [em_mast].[type_code], [em_mast].[l2_code], count(*) AS [Gp_TTL]
FROM [em_mast]
WHERE (([em_mast].[L2_CODE]<>"X") AND ([em_mast].[COMPANY_CO]="ABC") AND ([em_mast].[STAFF_STAT]="A"))
GROUP BY [em_mast].[type_code], [em_mast].[l2_code])
AS [res1] )
ON (([rptFormat].[type] = [res1].[type_code]) AND ([rptFormat].[group]=[res1].[l2_code] ))


Thanks for help !
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
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

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On