Viewing 15 posts - 31 through 45 (of 70 total)
Hi,
Try:
with CTE_B as
(
select IDA from B
group by IDA
having count(Status) = count(case when Status = 'Closed' then Status end)
)
select...
February 27, 2013 at 7:00 am
Can you post a sample of data of this table and its expected result?
January 23, 2013 at 5:58 pm
Hi,
Try:
With CTE AS
(
Select
userid,
web_survey_date,
...
January 23, 2013 at 4:17 pm
Hi,
Try:
SELECT
t1.OtherVisaID,
t1.Name,
t1.Company,
STUFF( (SELECT ';' + t3.Description
...
January 16, 2013 at 3:33 am
Hi,
Try:
with CTE_R as
(
select
t.*,
ROW_NUMBER() OVER(PARTITION BY UserID ORDER BY LOGTIME) as...
January 1, 2013 at 6:03 am
Hi,
Try:
with CTE as
(
select
bookid,
ROW_NUMBER() OVER(PARTITION BY Location ORDER BY bookid...
December 7, 2012 at 9:43 am
Hi,
Try:
select
empid,
deptid,
salary,
AVG(salary) OVER() as median
from MyTable
and
select
empid,
...
December 3, 2012 at 11:06 am
Here is my suggestion with the adaptation (Distinct):
with
CTE_T as
(
select COUNT(*) as TotIsStaffTask
...
November 14, 2012 at 9:31 am
There may be more than one row in Table2 with the same DID and AID?
If may be necessary to adapt the script I suggested.
If not, I think the script I...
November 14, 2012 at 9:15 am
Hi,
Try:
with
CTE_T as
(
select COUNT(*) as TotIsStaffTask
from...
November 13, 2012 at 4:28 pm
Try something like this:
select
pa.pNo,
coalesce(tf.cDate, lr.lDate) as lDate,
coalesce(tf.cIn, lr.LStart) as lStart,
coalesce(tf.cOut, lr.lStop) as lStop
from...
November 4, 2012 at 1:14 pm
Hi,
Try:
select
a.SNo,
a.Date,
a.Cat as Cat_A,
a.Value as Value_A,
b.Cat as Cat_B,
...
November 4, 2012 at 6:04 am
Try something like this:
select Groups from companyGroups CG
where @Egroups = 'False' or
exists(select 1 from Egroups EG where CG.id = EG.id)
Hope it's useful.
October 24, 2012 at 4:56 pm
Try:
select [Day], AVG([Value] as Avg_Value
from [MyTable]
group by [Day]
Hope this helps.
October 15, 2012 at 10:18 pm
Hi,
Try:
declare @fromdate date = '2012-10-7', @todate date = '2012-10-20';
with CTE as
(
select
@fromdate as Sunday,
...
October 11, 2012 at 12:20 pm
Viewing 15 posts - 31 through 45 (of 70 total)