Viewing 15 posts - 91 through 105 (of 371 total)
David Rueter (3/29/2012)
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
March 29, 2012 at 5:44 pm
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
March 29, 2012 at 1:48 pm
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
March 29, 2012 at 9:39 am
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
March 29, 2012 at 9:34 am
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
March 29, 2012 at 8:14 am
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
March 28, 2012 at 6:58 pm
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
March 28, 2012 at 5:18 pm
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
March 27, 2012 at 1:28 pm
Learned something new today. Thank you!
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
March 27, 2012 at 8:45 am
PaulB-TheOneAndOnly (3/26/2012)
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
March 26, 2012 at 4:53 pm
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
March 26, 2012 at 6:35 am
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
March 25, 2012 at 8:50 pm
Jeff Moden (3/24/2012)
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
March 24, 2012 at 9:17 pm
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
March 23, 2012 at 7:41 am
Lynn Pettis (3/21/2012)
Best regards,
Andre Guerreiro Neto
Database Analyst
http://www.softplan.com.br
MCITPx1/MCTSx2/MCSE/MCSA
March 22, 2012 at 9:09 am
Viewing 15 posts - 91 through 105 (of 371 total)