Viewing 15 posts - 166 through 180 (of 429 total)
You can identify the empids of the problem records, by grouping by empid and then counting distinct values of DOB.
Something like this:
SELECT
EmpID
FROM
Emp
WHERE
EmpID IN ('12335', '23456', '545432','231245')
GROUP BY...
March 17, 2014 at 12:36 pm
OCTom (3/14/2014)
Koen Verbeeck (3/14/2014)
Richard Warr (3/14/2014)
Stewart "Arturius" Campbell (3/14/2014)
Interesting question, thanks Steve.Misread the question, thought it meant the highest level that a single command can be used...
ah well...
Same here :doze:
+1
Didn't...
March 14, 2014 at 6:59 am
Based on the answers, I'm guessing it was intended that the SELECT statement was a simple one containing only one table. If the query contained more than one table,...
March 11, 2014 at 6:55 am
Argh, you got me. Good question!
Yet another reason to add to my list for always prefixing table names or aliases.
March 4, 2014 at 6:17 am
You can still allow ad-hoc querying, if access is restricted to views that incorporate your row level access framework.
February 21, 2014 at 11:17 am
The answer choices are a bit ambiguous I think.
I ran it and it started snowing.
February 11, 2014 at 7:42 am
SELECT DATEPART(hh, PDates) FROM #mydates
January 23, 2014 at 8:34 am
I see what you are doing now.
Thanks both of you.
January 15, 2014 at 12:12 pm
Sorry, I think I'm still missing something. :unsure:
If they are contiguous groupings, shouldn't the first group in your test case for owner 22 be 4 A 5 A, since...
January 15, 2014 at 11:53 am
What are you grouping by, other than lot_OwnerID?
January 10, 2014 at 2:55 pm
Your first query returns 0 rows because of the null email addresses in tableb.
IN is essentially a shorthand for a series of equality clauses, so
WHERE A NOT IN (1,2,3)
becomes...
January 10, 2014 at 1:43 pm
Like Sean said, there's no need to store the missing rows, since the query you use to generate them could be used to query the table. If you search...
January 7, 2014 at 1:54 pm
Good question!
This little idiosyncrasy drove me nuts when I first ran into it.
December 26, 2013 at 7:08 am
Argh, found information on the internet that is wrong!! Can you believe it? :crazy: :hehe:
December 24, 2013 at 6:58 am
LAG works for a fixed number of rows before the current row.
For all the rows prior to the current row, wouldn't you use something like ROWS BETWEEN UNBOUNDED PRECEDING AND...
December 20, 2013 at 7:22 am
Viewing 15 posts - 166 through 180 (of 429 total)