When connecting to an Access db with ODBC and inserting recordes with
SQLBulkOperations, how do control the order in the db that records are
inserted? Whether I call SQLFetchScroll or not, the newly added record
turns
up at the top of the table, and subsequent calls add the record below the
last added record at the top of the table regardless of field values.
Have I missed a stmt attribute or something?
Tom
What you're missing is an ORDER BY clause in an SQL statement. There is no
such thing as an "insert order". That is to say the physical ordering of
records is arbitrary (unless using a clustered index). SQL does not
guarantee any sort of ordering by itself. You have to use the ORDER BY
clause.
Re: formula help please ... primary and foreign keys are essentials in solving such problems. ... each of the tables are related to each other with each SQL statement.... engine like Oracle), the program adds additional lines to the actual ... WHERE clause that describes how the tables are to be linked together. ... (comp.databases.oracle.misc)
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: WHERE clause question ...Carl Imthurn wrote: ... > Here's the WHERE clause of my SQL statement:... I modified the WHERE clause as follows, ran it, and went ... How unique is the ProcedureID data in relation to the entire table? ... (microsoft.public.sqlserver.programming)
Re: Using SQL in Sub to fill box on mouseclick ... Your SQL statement is incorrect. ... The WHERE clause comes before the GROUP BY clause. ... > filled with a query telling me which people are scheduled to work a shift.... > Private Sub Ctl8a_4pb_Click ... (microsoft.public.access.formscoding)
WHERE clause question ... Here's the WHERE clause of my SQL statement:... I cancelled the stored procedure... I modified the WHERE clause as follows, ran it, and went ... (microsoft.public.sqlserver.programming)