Forum Replies Created

Viewing 15 posts - 5,266 through 5,280 (of 5,393 total)

  • RE: How to increase performance over WAN?

    Poor performance is due to data tranfer between SQL Server and client application. There's no simple solution: in some way you will have to change your application or your system...

    -- Gianluca Sartori

  • RE: Union all with order by not working

    Try this:

    SELECT *

    FROM (

    select '0' + dbo.date_format(getdate(), 'MMDDYY') AS End_Date

    union all

    select

    '1' +

    CONVERT(varchar, dbo.date_format(mt.end_date, 'MMDDYY')) +

    left(right('0000000'+mt.client_num, 7) + '.' + right('0000000'+mt.matter_num, 7) + ' ...

    -- Gianluca Sartori

  • RE: Looking for operator to coerce char values to '0' or '1'

    SQLServer translates COALESCE in CASE / WHEN, so it would be exactly the same to do:

    CASE

    WHEN field IS NULL THEN '0'

    WHEN...

    -- Gianluca Sartori

  • RE: SQL Server Develepment

    varchar with no length means varchar(1), so you'll get 1 as result.

    Gianluca

    -- Gianluca Sartori

  • RE: SQL Performance

    Thanks Gail,

    I have a new top ranked item for my to-do list today...

    -- Gianluca Sartori

  • RE: SQL Performance

    Thank you very much Gail, I didn't know about page splits!

    I use sometimes NOLOCK when my data is partially static and I need to read only the static part, avoiding...

    -- Gianluca Sartori

  • RE: SQL Performance

    GilaMonster (3/11/2009)


    NOLOCK allows for a possibility of missing rows or reading rows twice.

    Gail, what do you mean "reading rows twice"? I know I could miss some rows with NOLOCK,...

    -- Gianluca Sartori

  • RE: Update with a join where more than one value can be returned

    Try this:

    UPDATE TempFactTable

    SET CodeID = LookupID

    FROM TempFactTable t

    INNER JOIN (

    SELECT LookupCode, MAX(LookupID) AS LookupID, MAX(OtherCode) AS OtherCode

    FROM LookupTable

    ...

    -- Gianluca Sartori

  • RE: Determining Case sensitive

    You can query the ASCII code for the first char:

    'a' is different from 'A'

    try this:

    SELECT ASCII('A')

    SELECT ASCII('a')

    One thing you could do is:

    SELECT *

    FROM MyTable

    WHERE ASCII(LEFT(FirstName,1)) <> ASCII(LEFT(UPPER(FirstName),1))

    Onether thing you...

    -- Gianluca Sartori

  • RE: sqlservr.exe uses 100% CPU

    Your result set is too big. Work on the server side.

    -- Gianluca Sartori

  • RE: SQL Performance

    If you're sure every user works only on his data, try putting some NOLOCK in the select satements to avoid table and page locking during reads.

    With this little information this...

    -- Gianluca Sartori

  • RE: SQL Performance

    It depends! What does the procedure do? Does it select or modify data?

    Gianluca

    -- Gianluca Sartori

  • RE: sqlservr.exe uses 100% CPU

    Babar Javaid (3/11/2009)


    The used SP return the aggregate data and i am calling the SP 5 million times. One time call return the whole data to code and code do...

    -- Gianluca Sartori

  • RE: sqlservr.exe uses 100% CPU

    If you can alter the stored procedure code, aggregate the data with the appropriate group by clause, in order to get the data formatted the same way you need to...

    -- Gianluca Sartori

  • RE: sqlservr.exe uses 100% CPU

    If you're building a report you should be working with a reasonable set of records and 5 million rows is far from being reasonable, so you need to cut it...

    -- Gianluca Sartori

Viewing 15 posts - 5,266 through 5,280 (of 5,393 total)