Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.misc
DT DT is offline
external usenet poster
 
Posts: 20
Default "Too Few Parameters" Message

While trying to return data in Excel from an Access database source, I
receive the message "Too Few Parameters - Expected 1". There are several
different queries as source data leading up to the final output and I've
narrowed it down to an issue with a Union query (below). Any suggestions as
to what might be the problem? Thanks.

SELECT [Proj No],[Top Task], [Task No],[Task Name],[Budget Resource],[Tot
Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru Date]
FROM [q155187-I3-BudgetvsCost]

UNION ALL SELECT [Proj No],[Top Task],[Task No],[Task Name],"" as [Budget
Resource],0 as [Tot Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru
Date]
FROM [q155187-I3-NoBudgetResource];

  #2   Report Post  
Posted to microsoft.public.excel.misc
external usenet poster
 
Posts: 1,173
Default "Too Few Parameters" Message

DT

MSQuery will not work with union queries

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/
"DT" wrote in message
...
While trying to return data in Excel from an Access database source, I
receive the message "Too Few Parameters - Expected 1". There are several
different queries as source data leading up to the final output and I've
narrowed it down to an issue with a Union query (below). Any suggestions
as
to what might be the problem? Thanks.

SELECT [Proj No],[Top Task], [Task No],[Task Name],[Budget Resource],[Tot
Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru Date]
FROM [q155187-I3-BudgetvsCost]

UNION ALL SELECT [Proj No],[Top Task],[Task No],[Task Name],"" as [Budget
Resource],0 as [Tot Direct Cost Budget],[Exp Type], [Direct Cost PJTD],
[Thru
Date]
FROM [q155187-I3-NoBudgetResource];


  #3   Report Post  
Posted to microsoft.public.excel.misc
DT DT is offline
external usenet poster
 
Posts: 20
Default "Too Few Parameters" Message

Thanks for your response. While the Union query was the issue, I did get the
data to return in Excel by changing the sql statement "" as [Budget
Resource] to '' as [Budget Resource] (from double-quote to
double-apostrophe) when a co-worker suggested that Excel doesn't recognize
double-quote. That took care of the error issue

Thanks again.

"Nick Hodge" wrote:

DT

MSQuery will not work with union queries

--
HTH
Nick Hodge
Microsoft MVP - Excel
Southampton, England
DTHIS
web:
www.nickhodge.co.uk
blog (non-tech): www.nickhodge.co.uk/blog/
"DT" wrote in message
...
While trying to return data in Excel from an Access database source, I
receive the message "Too Few Parameters - Expected 1". There are several
different queries as source data leading up to the final output and I've
narrowed it down to an issue with a Union query (below). Any suggestions
as
to what might be the problem? Thanks.

SELECT [Proj No],[Top Task], [Task No],[Task Name],[Budget Resource],[Tot
Direct Cost Budget],[Exp Type], [Direct Cost PJTD], [Thru Date]
FROM [q155187-I3-BudgetvsCost]

UNION ALL SELECT [Proj No],[Top Task],[Task No],[Task Name],"" as [Budget
Resource],0 as [Tot Direct Cost Budget],[Exp Type], [Direct Cost PJTD],
[Thru
Date]
FROM [q155187-I3-NoBudgetResource];


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

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


Similar Threads
Thread Thread Starter Forum Replies Last Post
query criteria parameters "contains" Sum Limit and marking Excel Discussion (Misc queries) 2 July 20th 06 12:55 PM
HELP on "left","right","find","len","substitute" functions serene83 Excel Discussion (Misc queries) 5 June 27th 06 02:23 AM
Parameters in SQL queries using "contains" or "like" StuartAberdein Excel Discussion (Misc queries) 0 June 22nd 06 11:18 AM
Count occurences of "1"/"0" (or"TRUE"/"FALSE") in a row w. conditions in the next BCB New Users to Excel 7 May 13th 06 10:02 PM
How can I globally set "error message" parameters in Excel Evansct Excel Worksheet Functions 5 November 17th 05 05:13 PM


All times are GMT +1. The time now is 08:36 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"