Forum Replies Created

Viewing 15 posts - 18,496 through 18,510 (of 18,926 total)

  • RE: Concatenation within Stored Procedures

    I already answered this question under your other post.

  • RE: Concatenation in SP''''s

    He is right when he tells that it will cause degredation. However to cause major problems you would have to run these procs a few 1000 times/hours (if the result...

  • RE: UDF using the REPLACE function

    I just played with it... have a go with this script and post the final result to us :

    if object_id ('Replaces') > 0

    begin

    drop table Replaces

    end

    GO

    if object_id ('Dummys') > 0

    begin

    drop...

  • RE: UDF using the REPLACE function

    Always depends on how you "loop" but I think you can figure out a fast way of doing that.

  • RE: Concatenate Strings of same column

    Maybe I can help you with concatenating on the client side...

    read this for an exemple of a quick concatenation script :

    http://local.15seconds.com/howto/pg000929.htm

  • RE: Aggregate sum gives wrong results

    CASE WHEN Max(SalePrice) > 0 THEN Max(SalePrice) ELSE CASE WHEN Max(UnitPrice) > 0 Then Max(UnitPrice) Else 1 END END

  • RE: Concatenate Strings of same column

    if you need more than 8000 characters I would suggest doing the work on the client because it's gonna be easier there than working with a text variable on the...

  • RE: Converting Access DAO to ADO

    Dim db As ADODB.Connection

    'add this

    set db = new adodb.connection

    db.Open "Provider=SQLOLEDB.1;Persist Security Info=True;Initial Catalog=Agency ControlSQL;Data Source=servername", "userid" "password"

  • RE: SELECT AND UPDATE

    WHERE AND HAVING are very similar, but your conditions differ from one another because of the max operation.

    Try removing the (MAX(Orders.OrderDate) to only Orders.OrderDate > DATEADD(d, - 90, GETDATE())

  • RE: SELECT AND UPDATE

    as I stated earlier :

    HAVING (MAX(Orders.OrderDate) > DATEADD(d, - 90, GETDATE()))

    IS VERY DIFFERENT than

    WHERE (Orders.OrderDate > DATEADD(d, - 90, GETDATE()))

    add MAX(Orders.OrderDate) and COUNT(*) from the first select query to...

  • RE: SELECT AND UPDATE

    it's still not enough info to help you (no table definition)..

    Try running the first query without the sum/group by and find out which lines are missing for a product compared...

  • RE: Need to run a sql script each 10 minutes

    Why is it painfull to have a task run more than once per day?

  • RE: SELECT AND UPDATE

    can you post the DDL and some of the data from the table along with the results from each of the queries? I can't help you further without that.

  • RE: SELECT AND UPDATE

    I haven't checked the whole thing but this jumped right to my face :

    GROUP BY Products.Manufacturer + ' ' + Products.ProductName

    HAVING (MAX(Orders.OrderDate) > DATEADD(d, - 90, GETDATE()))

    WHERE (Orders.OrderDate >...

  • RE: How to avoid those empty result sets ?

    Maybe not what you want to hear, but don't use a cursor.

    Can you post the SP so that we can provide alternative solution to the cursor and check for small...

Viewing 15 posts - 18,496 through 18,510 (of 18,926 total)