close

Well, Ardus

That's something I hadn't stumbled on before and find it very helpful
Thanks

quot;Ardus Petusquot; wrote:

gt; Use :
gt; SELECT * FROM TABLE WHERE YEAR = ?
gt;
gt; Close Microsoft Query and get back to Excel
gt;
gt; In popup window, select Parameters...
gt;
gt; HTH
gt; --
gt; AP
gt;
gt; quot;Preacher Manquot; lt;nospamgt; a écrit dans le message de
gt; ...
gt; gt; I have a situation that I hope someone can give me a good answer to.
gt; Please
gt; gt; bear with me as I try to explain my needs.
gt; gt;
gt; gt; My goal is to have an Excel spreadsheet that pulls from a SQL database and
gt; gt; the the query pulls from a variable in the Excel sheet. For example let's
gt; gt; say I am pulling Sales Orders from SQL, let's also simply assume the
gt; record
gt; gt; has two fields Year and SOno.
gt; gt;
gt; gt; Under a simple query I could say Select * from table. Of course that
gt; would
gt; gt; pull all so's from every year.
gt; gt;
gt; gt; To filter the query of course I could say Select * from table where
gt; gt; year='2006'. And naturally that would give me 2006 orders.
gt; gt;
gt; gt; OK, here's where I can't figure this out. I want the query to filter
gt; gt; according to a value in a cell in excel. Let's use cell A1. Essentially
gt; I
gt; gt; am looking for a query that says quot;Select * from table where Year=(Cell A1
gt; in
gt; gt; the Sheet)quot;
gt; gt;
gt; gt; Is this possible?
gt; gt;
gt; gt;
gt;
gt;
gt;

arrow
arrow
    全站熱搜
    創作者介紹
    創作者 software 的頭像
    software

    software

    software 發表在 痞客邦 留言(0) 人氣()