Results 1 to 7 of 7
  1. #1
    Join Date
    Aug 2004
    Posts
    19

    Unhappy Unanswered: run a query on ONLY the records in spreadsheet (was "SQL Question")

    Ok, so my boss handed me a spreadsheet that contains about 1,000 records as retrieved by a SQL query.

    My boss now wants me to run a query on ONLY the records given to me in the spreadsheet. He wants me to grab two more fields of data for each of the records in the sheet.

    Naturally, my first question to my boss is, "Why don't you just give me the SQL code that was used for that query, and I'll just add a string or two to grab those additional fields? ...And then we'll run the new SQL?"

    My boss says, "Isn't there a way to run a query on just the records I've given you? Someone in another department has been able to do that before."

    I've never heard of this. Can anyone provide insight into how I might accomplish what my boss wants before I tell him he's full of crap?

  2. #2
    Join Date
    Feb 2002
    Location
    Houston, TX
    Posts
    809
    Does the spreadsheet have the query imbeded in VBA code?

    Unless the records on the spreadsheet have the unique key for the table(s) in question, or you can construct a unique key, hand you boss some ex-lax.

    On the otherhand you could just ask for the name of the individual in the other department, you might have an oppertunity to learn something or you could hand your boss some ex-lax.
    Paul Young
    (Knowledge is power! Get some!)

  3. #3
    Join Date
    Aug 2004
    Posts
    19
    There's no VBA code in the spreadsheet. It's basically a glorified flat-file.

    I think I'm going to have to hand my boss some ex-lax.

  4. #4
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    I think you can use an OPENDATASOURCE functionality against the spreadsheet, but I haven't tried it myself.
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

  5. #5
    Join Date
    Jun 2003
    Location
    Ohio
    Posts
    12,592
    Provided Answers: 1
    What a small world! I used to work with Someone In Another Department. Man, that dude was awesome. He could do stuff that NOBODY else could do. I only wish I had the knowledge, wisdom, time, and depth of understanding of Someone In Another Department.

    If I was running my own company, I would hire Someone In Another Department in a second!
    If it's not practically useful, then it's practically useless.

    blindman
    www.chess.com: "sqlblindman"
    www.LobsterShot.blogspot.com

  6. #6
    Join Date
    Jan 2004
    Location
    Aberdeen, Scotland
    Posts
    1,067
    Ok another option you might need to think about is wether the data has been passed through using MSQUERY, see if there is a saved query have a look under data-> get external data, you can then modify that query and rerun it and it might give you the recordset your looking for

  7. #7
    Join Date
    Jul 2003
    Location
    San Antonio, TX
    Posts
    3,662
    Quote Originally Posted by blindman
    What a small world! I used to work with Someone In Another Department. Man, that dude was awesome. He could do stuff that NOBODY else could do. I only wish I had the knowledge, wisdom, time, and depth of understanding of Someone In Another Department.

    If I was running my own company, I would hire Someone In Another Department in a second!
    Isn't that why you don't have your own company?
    "The data in a record depends on the Key to the record, the Whole Key, and
    nothing but the Key, so help me Codd."

Posting Permissions

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