Forum Replies Created

Viewing 15 posts - 61 through 75 (of 371 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • RE: Backups

    mohammed moinudheen (5/28/2012)


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

    Same here. 🙂

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • RE: Summing in a table

    This would work as well 🙂

    SUM([column]) OVER () AS AllTotal

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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,

    ...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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. 🙂

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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.

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

  • 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...

    Best regards,

    Andre Guerreiro Neto

    Database Analyst
    http://www.softplan.com.br
    MCITPx1/MCTSx2/MCSE/MCSA

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