Forum Replies Created

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

  • RE: INTERSECT 2

    Great back-to-basics question and I got it wrong because I wasn't paying enough attention. Err...

    I think there is a copy and paste mistake in SELECT #2 and SELECT #3 as...

  • RE: 9 Things to Do When You Inherit a Database

    Very nice little article from some years ago! Thanks.

    I agree with others that just dropping obsolete objects is a dangerous task, especially when you just got the job and don't...

  • RE: Backups

    mohammed moinudheen (5/28/2012)


    I got this wrong as I selected the most evident answer 🙂

    Same here. 🙂

  • RE: Logical Operators

    mtassin (5/24/2012)I think that's what it is... I got it wrong.

    The description makes sense... but I was looking at it as

    A AND B OR C

    In order to return from...

  • RE: Summing in a table

    dwain.c (5/20/2012)


    Here's yet another way:

    DECLARE @t TABLE (status VARCHAR(30))

    INSERT INTO @t

    SELECT 'On Hold' UNION ALL SELECT 'On Hold' UNION ALL SELECT 'On Hold'

    UNION ALL SELECT 'On Hold' UNION ALL...

  • RE: Not enough space on Server

    tt-615680 (5/18/2012)


    its very large around 2500000 from all tables.

    2 million rows from all tables don't seem too much.

    Do you have many VARCHAR(MAX), TEXT, VARBINARY(MAX), etc. columns in your tables?

    I would...

  • RE: Summing in a table

    This would work as well 🙂

    SUM([column]) OVER () AS AllTotal

  • RE: Transactions 1

    Thank you for the question. I found it easy because we have three INSERT statements there. Each one is an implicit transaction. Now nothing would be returned if it was...

  • RE: Foreign key

    I wasn't paying enough attention to detail here.

    Table2's int column was just an int and nothing else. :hehe:

    Time to go to bed for me.

    Thank you for the question.

    I still see...

  • RE: List of the last day of the month

    Thank you, ColdCoffee.

    I totally forgot about DATENAME. :w00t:

    DECLARE @Year INT = 2011;

    SELECT TMP.lastDay,

    DATENAME(WEEKDAY, tmp.lastDay)

    FROM (SELECT DATEADD(DAY,

    ...

  • RE: List of the last day of the month

    How about this:

    DECLARE @Year INT = 2011;

    SELECT TMP.lastDay,

    CASE (DATEPART(dw, tmp.lastDay) + @@DATEFIRST) % 7

    WHEN...

  • RE: NULLS

    Glad to have answered it right because I had some issues with COALESCE and ISNULL before so I had to research a little. Thank you for the excellent question. 🙂

  • RE: How to Create a Corrupt SQL Server Database

    I loved this article. Very interesting to some of us who are learning the SQL Server internals and need to simulate disaster recovery.

  • RE: Altering a Column

    Sorry, guys, for not adding a note on how many answers should be selected.

    Next time I'll pay more attention. 🙂

    BOL had me a little confused on this concept because the...

  • RE: Permissions

    You can't assign permissions to object types in SQL Server. But you could create a schema with only the procedures and tables you need to give permissions for and then...

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