Re: What's wrong?
Dr.UgoGagliardelli wrote:
il 25/04/2007 0.23, Scrive Bradley V. Stone 33811944:
Wouldn't it be just as easy to build STMT dynamically inserting the
variables into the SQL statement? Then you can leave out the USING
clause and the question marks.
That way, as the cursor is declared only once, and even if you change
the query inside the statement variable, each time you open the cursor
the first query will be executed, that's not what I need. The USING
clause should be specific for opening the cursor with a changed query
each time. I think, or not?
I always build my SQL statements dynamically. Much easier building the
entire string, at least I think so. :)
Brad
.
Relevant Pages
- Re: query based on form
... Typically it's only the WHERE clause of the query that changes so you can build that dynamically, patch it into the SQL statement, and assign it to the SQL property of the QueryDef you use for export. ... they can choose one Sales Rep, all cities, all states, all counties, just one type of business and one renewal month. ... (microsoft.public.access.queries) - Re: Whats wrong?
... variables into the SQL statement? ... That way, as the cursor is declared only once, and even if you change the query inside the statement variable, each time you open the cursor the first query will be executed, that's not what I need. ... The USING clause should be specific for opening the cursor with a changed query each time. ... (comp.sys.ibm.as400.misc) - Re: Ranking my results in a query to get the TOP#10 percent
... Without order by clause, it just returns 10 percent of the records. ... Can this be accomplished in same Total query where I perform a "COUNT" on ... the SQL statement suggested below. ... Could you please assist me with an Access SQL statement that can ... (microsoft.public.access.queries) - Re: Select / Scan / Select / Endscan
... The first Select statement generates a cursor called ... "Query" because you don't have an Into Cursor/Table clause in your code. ... It occurs when the code hits ENDSCAN the first time. ... (microsoft.public.fox.helpwanted) - Re: Send filtered subform data to excel
... Private Sub Export_to_Excel_Click ... A QueryDef is just a saved query (i.e. the definition of the of the query, ... It is defined as a SQL statement, ... WHERE clause), goes in the constant we named strcTail. ... (microsoft.public.access.formscoding) |
|