Viewing 15 posts - 31 through 45 (of 402 total)
Agreed, I would be interested in seeing that as well!
July 1, 2013 at 4:09 am
Hi
It could be re-written like this:
SELECT TOP (1000)
jp.labor_type,
jp.revision,
jp.seeker_name,
available.availablecount,
hired.hiredcount
FROM
dbo.task_posting jp(nolock)
INNER JOIN dbo.task_distribution jpd(nolock) ON jp.task_id = jpd.task_id
LEFT JOIN
(SELECT
COUNT(*) availablecount
,task_id
FROM
dbo.task_seek js(nolock)
WHERE
js.status IN (1,7,8) AND js.worker_code = 'ADO'
GROUP BY
task_id
) AS available
ON jp.task_id...
June 27, 2013 at 6:36 am
Hi
SELECT
learner
, model
FROM
tablename
WHERE
learner in (SELECT Learner FROM tablename WHERE MODEL IN (21,20,30,99))
Edit: oops didn't twig this may be homework!
Andy
June 26, 2013 at 9:10 am
Something like this at all?
Details are pretty vague!
DECLARE @id INT = 1234567890
SELECT LEFT(stuff(@id,2,3,''),2)
Andy
June 26, 2013 at 5:21 am
Something like this?
WITH CTE
AS
(
SELECT Date
FROM
Table1
UNION ALL
SELECT date
FROM
Table2
)
SELECT MAX(Date)
FROM
CTE
Andy
June 25, 2013 at 3:13 am
Shadab Shah (6/25/2013)
I search for Date functions for finding the max of the 2 dates. But such function does not exits.Is there any easy way to do it.
Thanks in advance.
this...
June 25, 2013 at 2:49 am
kgeeel240 (6/21/2013)
June 21, 2013 at 4:50 am
mickyT (6/18/2013)
Oracle765 (6/18/2013)
yes i agree, i am not sure about the left out join thats what has confused me a bit.
would this query provide the same results?
SELECT distinct a1.Netbios_Name0,...
June 19, 2013 at 1:52 am
Hi
What don't you understand about it?
Looks like the GROUP BY is not needed (Unless its in an effort to eliminate duplicates)
Andy
June 18, 2013 at 2:26 am
Bobby Glover (6/14/2013)
In SQL 2012, if your primary drops offline or the cluster loses quorum, the readable replica databases drop...
June 14, 2013 at 9:49 am
Gail, Thanks you were spot on with that excellent article.
Bookmarked for future reference 😀
Cheers
Andy
May 14, 2013 at 7:38 am
Eugene Elutin (5/14/2013)
that classical question was answered long ago ;-):http://sqlinthewild.co.za/index.php/2009/03/19/catch-all-queries/
Hi Eugene
Thanks for taking the time to have a look.
I may be being a little obtuse here so my apologies if...
May 14, 2013 at 7:29 am
ssmith 29602 (5/10/2013)
If trying to write this
Case Oppo_stage When 'Bus_Written' Then (oppo_closed is null or Oppo_Closed >= GETDATE() -7)
but...
May 10, 2013 at 9:52 am
Viewing 15 posts - 31 through 45 (of 402 total)