Re: sql question



Tried. Also over 3 minutes.
Left join uses more time than a cartesian product, over 6 minutes. I killed the query.

Found the solution:

CREATE TEMPORARY haha ( KEY (field1), KEY (field2) )
AS
SELECT po_no, po_date, item_no FROM ..... WHERE ....

Then I don't need the privilege for ALTER TABLE.

--
iTech Consulting Services Limited
Expert in ePOS (Point-Of-Sales) solutions
Website: http://www.itech.com.hk (IE only)
Tel: (852)2325 3883 Fax: (852)2325 8288
.



Relevant Pages

  • Re: Add constraint returns syntax error on constrain clause
    ... Using Northwind, if you try, in the query designer: ... CurrentProject.Connection.Execute "ALTER TABLE Products ADD CONSTRAINT ...
    (microsoft.public.access.queries)
  • Re: "Local Security Policy", Is it stored in registry?
    ... know if the user has the privilege. ... To query local policy settings, using secedit to export a security template ...
    (microsoft.public.win2000.security)
  • Re: Embedded Queries?
    ... alter table MyTable ... Columnist, SQL Server Professional ... the time of running the query. ... UPDATE chrisslu SET 'discquantity' = '(SELECT ...
    (comp.databases.ms-sqlserver)
  • Re: Warning: Existing columns have ANSI_PADDING off
    ... Try adding the column by running an ALTER TABLE query in Query ... Analyzer instead of using Enterprise Manager: ... ALTER TABLE MattsTable ADD newColumn CHAR ...
    (microsoft.public.sqlserver.programming)
  • Re: Alter table via t-sql vs Ent Manager
    ... Drop the table and dependants ... So it is allways advisible to change the table definition using Query ... ANalyzer -- ALTER TABLE command. ... logged we can revert back if the database is set in FULL recovery model. ...
    (microsoft.public.sqlserver.server)