Forum Replies Created

Viewing 15 posts - 2,326 through 2,340 (of 2,462 total)

  • RE: ''=0 ?!?!

    Thanks Gail.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Select all data where one condition is met

    Your typo messed me up too...

    You can also try:

    ;WITH x AS

    (SELECT ID, Stat, StatDate

    FROM #Apps

    WHERE Stat='AppRec' AND StatDate >= '2012-12-01' )

    SELECT ID, Stat, StatDate

    FROM #Apps

    WHERE ID...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: IF statement with subquery problem

    zilla (12/17/2012)


    I have a sub query within my IF statement that evaluates to one single number that I am using for a comparison operator. I am thinking there is something...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Has SQL Query Termination (;) become mandatory in SQL Server 2012?

    In case anyone was curious - the line in the Ben Gan book I was referring to is:

    The SQL Server documentation indicates that not terminating T-SQL statements with a semicolon...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Has SQL Query Termination (;) become mandatory in SQL Server 2012?

    I cannot find anything that states that it has become mandatory, but I did find someone claiming that the BOL for SQL 2008 (not R2) stated that it was...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Request

    Great Post!

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Dynamic SQL

    Sean Pearce (12/11/2012)


    +1

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: No data showing up in a Database replication

    forceman29 (12/13/2012)


    I have a server 2008 R2 server were Database A is replicating to Database B. A full snapshot was done without any issues. I have the publication setup as...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Need a TSQL Book that I can expertise in writing Tsql

    I second all those that said Itzek Ben-Gan. There are some great stairways on this site. I would say that Greg Larson's Stairway to DML and Celko's Stairway to Data...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: NEED HELP WITH RECURSIVE CTE

    capnhector (12/12/2012)


    This looks like a running total (from the math in the rCTE). Have a look at Jeff Modens article on the "Quirky Update" http://www.sqlservercentral.com/articles/T-SQL/68467/ It will at...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: NEED HELP WITH RECURSIVE CTE

    CELKO (12/12/2012)


    Read about the Window clause, which makes it very easy to write running totals:

    CREATE VIEW Running_Balance (payment_nbr, receipt_date, payment_amt, acct_balance)

    AS

    SELECT payment_nbr, receipt_date, payment_amt,

    ...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: 2012 Management Console

    Sean Grebey (12/11/2012)


    If I use 2012 Management Console from the Express version to Manage an Enterprise version of 2008, will things like Maintenance plans be available, or have those features...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Microsoft Certified Solutions Associate (MCSA)

    sanandh87 (12/12/2012)


    Hi,

    ... and I need dump also.

    Thanks,

    Anandh

    I like this guy's blog and am using it to study for the SQL Serve 2012 certs. Note how he passed and why he...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Need HTML T-SQL script to run scheduled job.

    SSIS is the best tool for this.

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

  • RE: Interview Questions

    Your Name Here (12/5/2012)


    Sorry to be a bit off-topic but this thread flashed me back to an interview I had years ago. The 'technical' questions about troubleshooting were surprisingly...

    "I cant stress enough the importance of switching from a sequential files mindset to set-based thinking. After you make the switch, you can spend your time tuning and optimizing your queries instead of maintaining lengthy, poor-performing code."

    -- Itzik Ben-Gan 2001

Viewing 15 posts - 2,326 through 2,340 (of 2,462 total)