Forum Replies Created

Viewing 15 posts - 38,761 through 38,775 (of 49,571 total)

  • RE: Msg 102, Level 15, State 1, Line 1 Incorrect syntax near '-'.

    Put square brackets around the linked server name.

  • RE: optimizing query

    Ok, you've neither given me all the table definitions nor any sample data so I can't test this, but give this a try. It should give you the idea if...

  • RE: sql server 2003 possible problem?

    Can you try reinstalling the java drivers?

  • RE: Writing Dynamic Stored Procedure

    TheSQLGuru (6/1/2009)


    use adventureworks

    go

    drop proc test

    go

    create proc test (@productid int = null, @quantity int = null)

    as

    set nocount on

    select *

    from [Production].[TransactionHistory]

    where (@productid is null or @productid = ProductID) --indexed

    and (@quantity is...

  • RE: Non Clustered index - With INCLUDE clause

    vikas bindra (6/2/2009)


    Do I actually need NIX_WITHINCLUDE_1 and NIX_WITHOUTINCLUDE indexes?

    I can't see any reason why you would. It is possible that SQL would use the smaller ones occationally, but the...

  • RE: optimizing query

    vidhyasudha (6/2/2009)


    First I create a temp table to hold the data that satisfy the where condition

    INSERT INTO #tmpP

    select x.p_id, x.col1,x.col2,x.col3 from x where x.colm4 'N'

    What is table x?

    set @pidentity...

  • RE: Use or not use all available CPUs or a single CPU

    Yup. The setting is 'max degree of parallelism'. If it's 0, SQL will use as many of the CPUs as it feels necessary for a query. If you set it...

  • RE: sql server 2003 possible problem?

    Do you mean SQL Server 2005? There is no version 2003.

  • RE: Writing Dynamic Stored Procedure

    rafidheenm (6/2/2009)


    This can be write like this and avoid CASE statements from WHERE clause..

    Yes, but it doesn't change the execution characteristics. Just like the case statement version, that will typically...

  • RE: Trigger not firing

    sql_lock (6/2/2009)


    IF(UPDATE(Authorised))

    That trigger is not going to do anything for the update you posted. It will only execute if the Authorised column is updated, that's what the IF UPDATED line...

  • RE: restoring from a database mirror

    In 2008, SQL can 'repair' damaged pages from the mirror automatically. Enterprise edition only.

    Books Online:

    A database mirroring partner running on SQL Server 2008 Enterprise or later versions automatically tries to...

  • RE: Deleting temp tables in the system "tempdb".

    It is about permission. Only the connection that created a temp table can drop it.

    See if you can run sp_spaceused on that table and see how much space it's taking...

  • RE: users in sleeping mode

    GURSETHI (6/1/2009)


    Q: If they are in sleeping mode yet can they be a reason of

    slow performance?

    A: Sleeping means waiting for a event to...

  • RE: Trigger not firing

    Is there code in the trigger to check that a row has actually changed?

  • RE: TempDB and SQL Error 845

    TRACEY (6/1/2009)


    Is this total or per DRIVE DISKS...to select.

    Individually for each drive that has SQL data or log.

    Taking the total's not very useful as more idle drives can skew the...

Viewing 15 posts - 38,761 through 38,775 (of 49,571 total)