Forum Replies Created

Viewing 15 posts - 106 through 120 (of 337 total)

  • RE: CPU Usage reached 100%

    Increase the Cost Threshold for Parallelism settings.

    If that also does not help then you will have to find the offending queries that are causing parallelism which maybe due to missing...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Help needed for a complex query.

    The user will pass Start Date, End Date, Number of Records and Period. Period can be daily, weekly, monthly, quarterly or yearly.

    The user will pass Start Date,End Date,No of...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: update error

    This all looks so confusing..

    You are trying to update column P of table_1 with column P of another copy of table_1 matched on table_1.link = selrow.link where selrow...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Running total error

    Yes that's right..

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Running total error

    Quote strange.Can you post the entire query.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Running total error

    Is this SQL 2005 and above ?

    EDIT: Whats the compatibility of the database ?

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Input paramter for Store Procedure like in statement 'Value1','Value2'

    No need for dynamic sql.Just split the values ('Value1','Value2') and insert into a temp table

    Value1

    Value2

    then Select * from YourTable where Id in (Select Id from Temp)

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Input paramter for Store Procedure like in statement 'Value1','Value2'

    You will have to split the values coming in from the parameters.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: Database Mirroring login attempt by user 'domain\SQLLogin' failed

    Was the account name from domain deleted and recreated ?

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: problem .... income during month in sql server 2008

    SELECT DATEPART(MM,VISITINGDATE),SUM(COST) FROM yourtable

    GROUP BY DATEPART(MM,VISITINGDATE)

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: comparing dates

    If you are using sql server edition higher than 2005 you can simply convert it to date datatype and it will return just the datepart

    select convert(date,'2010-09-23 13:02:54.000')

    else you will have...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: how to get this year and last year totals in tow separate columns

    SELECT SUM(CASE WHEN fd.CalendarYear = '2013' THEN [Sales (LCY)]) 2013,

    SUM(CASE WHEN fd.CalendarYear = '2014' THEN [Sales (LCY)])2014

    FROM [$Cust_ Ledger Entry] cle

    LEFT OUTER JOIN dw.dim.FiscalDate fd

    ON fd.CalendarDate = cle.[Posting Date]

    WHERE [Customer...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: I need a pivot of this data

    Instead of mixing everything in dynamic sql I would suggest put the desired records into a temporary table and then use only that temporary table in dynamic sql for pivoting.

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: How to: Bulk import xml to table

    Is the XML in proper format ? When I tried to assign it to a xml variable it threw an error

    Declare @x xml='Your XML'

    Select @x

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

  • RE: I need a pivot of this data

    Do these columns exist in any of the referred tables of the query ?

    Msg 207, Level 16, State 1, Line 1

    Invalid column name 'pmDescription'.

    Msg 207, Level 16, State 1, Line...

    --------------------------------------------------------------------------------------------------
    I am just an another naive wannabe DBA trying to learn SQL Server

Viewing 15 posts - 106 through 120 (of 337 total)