+ Reply to Thread
Results 1 to 2 of 2

Excel 2007 : External Data Query "Too few parameters expected 2"

  1. #1
    Registered User
    Join Date
    09-07-2010
    Location
    singapore
    MS-Off Ver
    Excel 2007
    Posts
    1

    Unhappy External Data Query "Too few parameters expected 2"

    hello all,

    i am trying to use data sourcing in Excell 2007, im using a txt file to link the data to a certain cell. but whenever i run the query:

    ---- SELECT COUNT(COLUMN_NAME) FROM (SELECT DISTINCT COLUMN_NAME FROM `C:\SA1 MONITORING\OUTPUT FILES`\`NA_STUDENTS_TAKING_CPA.TXT` where COLUMN_NAME2 in ('31','32'))---

    i get the following error message, "Too few parameters, Expected 2"

    i tried using another text file which is similar it works perfectly fine but the one i want to use gives me this error. i have looked into the name and the column names they are okay

    can anyone please help, urgent help needed. thanx

  2. #2
    Forum Expert Paul's Avatar
    Join Date
    02-05-2007
    Location
    Wisconsin
    MS-Off Ver
    2016/365
    Posts
    6,887

    Re: External Data Query "Too few parameters expected 2"

    Hi Haseeb, welcome to the forum.

    I don't use SQL commands too often, especially not in Excel, but are the apostrophes in the middle of the path supposed to be there?

    ...OUTPUT FILES'\'NA_STUDENTS.... ?

    My thoughts would be that those are creating separate text strings, with a \ character sitting in the middle of the SQL command that it doesn't know what to do with.

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1