Forum Replies Created

Viewing 15 posts - 91 through 105 (of 371 total)

  • RE: Find Customers Who Bought "A" and "B" But Not "C" (SQL Spackle)

    David Rueter (3/29/2012)


    Thanks, Jeff.

    I thought my standard pattern of simple joins would do about as well:

    SELECT DISTINCT p.CustomerID

    FROM

    #Purchase p

    JOIN #Purchase p2 ON

    p.CustomerID...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Technical Interview - I feel dumb now.... :)

    Interesting conversation.

    Here in my company I have a friend who told me that one of the most experienced DBAs (+10 years) failed the SQL Server 2008 certification on implementation &...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Find Customers Who Bought "A" and "B" But Not "C" (SQL Spackle)

    I see that most examples are accessing the same table more than once (IN/NOT IN, EXISTS/NOT EXISTS or JOINs). I wonder if it's faster than acessing the table only once...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Find Customers Who Bought "A" and "B" But Not "C" (SQL Spackle)

    Jonathan AC Roberts (3/29/2012)


    No, it would return someone who as ordered 'A' only or 'B' only

    I guess I may have drank too much coffee today. :doze:

    Thank you.

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Find Customers Who Bought "A" and "B" But Not "C" (SQL Spackle)

    SELECT

    CustomerId

    FROM Purchase

    WHERE ProductCode IN ('A','B', 'C')

    GROUP BY CustomerID

    having sum(case when ProductCode = 'A' then 1 else 0 end) > 0

    and sum(case when ProductCode =...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Pivot Data

    I guess what Jeff means is this:

    SELECT emp_id,

    course1,

    course2,

    course3,

    ...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: help with "joiN' quiries

    Just to add to what the others have said, I'm assuming that "EID" is the employer's ID and "DeptID" is the department's ID. If I'm right, this part of the...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: VIEWS 4

    The only two cases when I use "SELECT *" are:

    1) Quick ad-hoc queries that will be used only once;

    2) On the outer query when the inner queries already defined the...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: VIEWS 4

    Learned something new today. Thank you!

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Data WareHouse

    PaulB-TheOneAndOnly (3/26/2012)


    Probably you are not looking at the right places, there is a vibrant community indeed - one entry point would be http://www.oracle.com/technetwork/index.html - the famous Oracle Technology Network. ...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Generating Test Data: Part 1 - Generating Random Integers and Floats

    Another great article! And it explains the reasons to use that technique going back to basics.

    Sometimes we know that we should do things one way or another because it's recommended...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Data WareHouse

    I'd really love to hear someone's opinions on why the Oracle community is somewhat difficult to find. Very different from the SQL Server community which has important events like the...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Triangle Join - Can I do it right or a replacement?

    Jeff Moden (3/24/2012)


    The thing I'm curious about is do you really intend to report by day? I can see storing weeks and months and their running totals but I'm...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Triangle Join - Can I do it right or a replacement?

    Excellent advice. Actually we came with something similar while we we were on a meeting in the company.

    Let me see if I understand what you suggested. A table with running...

    Best regards,

    Andre Guerreiro Neto

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

  • RE: Pleae Help with Variable - if this is possible

    Lynn Pettis (3/21/2012)


    I'd say it depends on how the CASE function is being used. In this case it is being used on the right side of the equality condition...

    Best regards,

    Andre Guerreiro Neto

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

Viewing 15 posts - 91 through 105 (of 371 total)