Wednesday, March 7, 2012

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?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.|||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.|||I think you can use an OPENDATASOURCE functionality against the spreadsheet, but I haven't tried it myself.|||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!|||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|||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?

No comments:

Post a Comment