Forum Replies Created

Viewing 15 posts - 61 through 75 (of 254 total)

  • RE: Notification Programs

    I can't address most of your question, but you can NET SEND to an entire domain by providing the domain name. I've done that on accident before. It was entertaining....

  • RE: Stripping a string

    ISNULL( name, case when CHARINDEX('@', email, 1) = 0 then '' else LEFT(email, CHARINDEX('@', email, 1) - 1) end ) AS name

     

  • RE: RPC:Starting delay

    Are you re-using the connection or establishing a new connection for each call? Have you timed your application between calls to the stored procedure to see how much of the...

  • RE: Moving Data between Text fields

    The SUBSTRING command implicitely converted Description into a varchar(8000). I'm guessing that the characters at positions 7953-8000 are spaces and so were implicitely RTRIMed.

    The Query Analyzer setting only limits the...

  • RE: Can you create a cumulative count field within groups?

    SELECT A.ID, A.Month, ( SELECT COUNT(*) FROM MyTable B WHERE B.ID = A.ID and B.Month <= A.Month ) AS Count FROM MyTable A

    The above gets messed up a touch when...

  • RE: Precision & Scale question

    The arithmatic is adjusting the precision and scale in an automated attempt to retain a data container of sufficient accuracy. Since you have such a high precision value you immediately...

  • RE: SQL 7.0 to SQL 2000 (Post Migration Problem) in MS Access

    I would assume that the cause is due to a new execution plan being determined. I suppose it could also be a bug, but I'm assuming you are on the...

  • RE: Cross-server issues with sub-selects

    I tried olavho's queries within our system (modified for one of our tables) and the MAX version worked just fine as one would expect. We are runnnig SQL 2000 SP3 something ("SP3a"...

  • RE: How to optimize query for maximum amount

    As for optimization, I think no matter what SQL you eventually use you will want to make sure there is an index for the MemberId column probably all by itself....

  • RE: How to optimize query for maximum amount

    SELECT C.TransID, C.MemberID, C.DateOfTrans, C.Amount, C.TransType

    FROM ( SELECT DISTINCT MemberID FROM Transactions ) A

           LEFT JOIN Transactions B

                 ON B.Amount = ( SELECT MAX(Amount) FROM Transactions B2 WHERE B2.MemberId...

  • RE: Help with Contiguous Sequences in SQl

    Assuming that the seq will not be reused for a given shelf, I believe what you are after can be done with three subselects in the WHERE clause. It won't perform...

  • RE: SQL Query Help

    Try:

    SELECT A.Field1, A.Field2, A.Field3

             FROM Table1 A

                    INNER JOIN Table 2 B

                             ON B.Field1 = A.Field1

                             AND B.Field2 = A.Field2

    If Field1/Field2 do not constitue the full key on Table2 then it...

  • RE: general syntax error help

    The reason the case statement failed is because "acres" no longer exists. You now select an expression instead of a column and expressions are not named automatically. Try:

    ( select convert(float,...

  • RE: Massive Inserts

    I expect it depends primarily on the percentage of rows you expect to fail due to a unique key constraint. The second most significant factor I suspect would be the...

  • RE: general syntax error help

    I doubt 2 stored procedures would perform better. I also don't understand why using a convert would cause the the case to fail. Could you post the entire SQL statement...

Viewing 15 posts - 61 through 75 (of 254 total)