Forum Replies Created

Viewing 15 posts - 91 through 105 (of 245 total)

  • RE: grouping joins syntax

    SQL 2000 does not have a perfect query optimizer.

    My query is against a tera byte  plus of data and the joins in question contain millions of rows. I have...

    www.sql-library.com[/url]

  • RE: grouping joins syntax

    thanks

    or

    select *

    from table1

    join (table2 join table3

    on tbale2.col = table1.col

    www.sql-library.com[/url]

  • RE: grouping joins syntax

    trying to improve performance of query

    several multi million row tables joing together want to experiment with join order structure.

    i thought you could pre join certain chunks of the from clause

    somethig...

    www.sql-library.com[/url]

  • RE: Remove non numeric characters

    for whats it worth franks function runs fastest in my sql express inastallatin on my creaking lap top

     

     

    (11000 row(s) affected)

    (100000 row(s) affected)

    --===== Frank's function

    DBCC execution completed. If DBCC printed...

    www.sql-library.com[/url]

  • RE: transaction

    if your using sql 2005 which i suspect you might be given your name! you should use try catch blocks which are much neater and much efficient as you dont...

    www.sql-library.com[/url]

  • RE: Triggers

    you database design isnt right. You shouldnt be storing the same data in two different tables becasue you are likely to have problems with consistency.

    why not just add a bit...

    www.sql-library.com[/url]

  • RE: Picking latest transaction from 3 tables

    'so prioritise those in a certain order.' Not sure what you mean by this. This code will run fast. Much much faster than a cursor.

    www.sql-library.com[/url]

  • RE: Picking latest transaction from 3 tables

    Version above only distinguishes between transaction on different days. Version below will do it down to milli seconds which is probably what you want.

     

    ---DDL--

    if

    www.sql-library.com[/url]

  • RE: Picking latest transaction from 3 tables

    ---DDL--

    if

    object_id('test_donations') is not null

    www.sql-library.com[/url]

  • RE: Picking latest transaction from 3 tables

     

    select min(transaction_date), customer_id

    from

    (

    select

    transaction_date, communication_id, customer_id

    from

    test_donations

    union

    www.sql-library.com[/url]

  • RE: Picking latest transaction from 3 tables

    ---DDL--

    if

    object_id('test_donations') is not null drop...

    www.sql-library.com[/url]

  • RE: Table format query....

    Read this. They platform they are using is mysql but the theory is identical for all RDBMS and it has a nice worked example

    http://dev.mysql.com/tech-resources/articles/intro-to-normalization.html

     

    This is a bit more advanced

    www.sql-library.com[/url]

  • RE: help with implementing paging in sql sever 2000

    --try this. note that the table variable defintion must fit the select statement, I have guessed at  some of the data types.

     

    declare

    @start int

    www.sql-library.com[/url]

  • RE: help with implementing paging in sql sever 2000

    post the select statement that returns the record set you want paged into chunks.

    www.sql-library.com[/url]

  • RE: case with join

    why not use a union

    so

    select * from table1 join table2 on table1.col = yourcondition

    union

    select * from table1 join table3 on table1.col = yourcondition

    www.sql-library.com[/url]

Viewing 15 posts - 91 through 105 (of 245 total)