Forum Replies Created

Viewing 15 posts - 901 through 915 (of 1,409 total)

  • RE: Table Join on three columns

    Perhaps you can do it without the third table:

    select

    coalesce(june.level, july.level) as 'level'

    , coalesce(june.sthdi_code, july.sthdi_code) as 'sthdi_code'

    , coalesce(june.Functional_Area, july.Functional_Area) as 'Functional_Area'

    , coalesce(june.Quantity, 0) as 'Qty_june'

    , coalesce(july.Quantity, 0) as 'Qty_july'

    , coalesce(july.Quantity, 0)...

  • RE: SPs inside BEGIN/ROLLBACK TRAN

    Yes, it's possible!

    But when the transaction inside the stored procedure is rolled back, it will state an error message: "Transaction count after EXECUTE indicates a mismatching number of BEGIN and...

  • RE: SQL Netbackup Job failures

    Can you post the error message from the logging/job history?

  • RE: create proc

    gurbanov.1984 (7/17/2013)


    Post 295, Level 16, State 3, Procedure insyenicek11, line 31

    Syntax error converting character string to smalldatetime data type.

    All your variables in your query are declared with a NVARCHAR datatype....

  • RE: Join of 2 subqueries

    It's not really clear what you want, but I think you can put the GROUP BY statement inside the second sub-select (and remove the "q1" alias within this GROUP BY)

  • RE: How to get the first date of my table?

    You have to remove column [attendence] from the GROUP BY because you are aggregating these values with the MIN statement.

  • RE: SQL Server Backups & Maintenance - Best Practices

    JAMMOD (7/17/2013)


    - Full DB Backup (Once Before Working Hours, Once During Working Hours, Once After Working Hours)

    - DB Differential Backup...

  • RE: How to get the first date of my table?

    Homework assignment?

    Just use a GROUP BY in combination with a MIN statement.

  • RE: Full backups on any database, will it affect the LSN chain ?

    Lynn Pettis (7/17/2013)


    I beg to differ with you. Full and Differential backups WILL NOT break your log chains.

    I agree that it won't break your LOG chain, maybe I used...

  • RE: Autogrowth of database with it's file name

    I use this script to list all auto-growth events. It will summarize the number of times it happened and includes the oldest time and most recent time. The second select...

  • RE: create proc

    One more point to keep in mind: the sub-selects must only return one single row. If more rows are returned, the insert will fail. You can use the SELECT TOP...

  • RE: create proc

    As Koen allready pointed out, you need to use a single SELECT statement to insert the values. You also made some errors declaring he variables. Below is the working code....

  • RE: Find Data Source

    There is not enough information to answer your question.

    You say there are stored procedures and triggers involved. So you have allready a clue to how the data is entered. Take...

  • RE: Full backups on any database, will it affect the LSN chain ?

    Any full backup will break the LSN chain, unless it's executed with the COPY_ONLY option. But this breaking of the LSN chain only applies to the DIFF backups. If you...

  • RE: Right click on a Database, select properties Error, cannot show requested dialog.

    GilaMonster (7/3/2013)


    Check that the database owner is set to a valid account. SA is often used.

    In my experience this is most time the cause of the error. The login of...

Viewing 15 posts - 901 through 915 (of 1,409 total)