Viewing 15 posts - 5,986 through 6,000 (of 6,036 total)
GROUP BY (Number_of_the_week - 1)/3
GROUP BY (Number_of_the_week - 1)/6
May 5, 2005 at 8:28 am
result_date - DATEPART (dw, result_date) + 1
This is made for @@DATEFIRST = 1 (Monday is first day of the week)
Check your server settings.
May 4, 2005 at 11:15 pm
groub by DATEDIFF(ww, result_date, getdate())
getdate() may be replaced with any given date. For example, '1900-01-01 00:00'.
Anyway difference in weeks between that date and dates for all same week tasks will...
May 4, 2005 at 10:16 pm
I forgot to change alias in GROUP BY for nested query.
This must work:
SELECT MAX(l.clrec_sysid), l.cons_entity_id, lm.Max_event_date
FROM tblclinical_record_master l
INNER JOIN tblcase c ON l.case_sysid = c.case_sysid
INNER JOIN (SELECT l1.cons_entity_id,MAX(l1.event_date) as Max_event_date
FROM...
May 4, 2005 at 9:16 am
If createddttm is datetime then it is not in any format.
Format is used only for date representation.
The strict rule is:
Put clustered index on the column you most often use...
May 4, 2005 at 4:14 am
Lets say that your column data type is varchar(50).
In such case it gonna be:
ORDER BY case when ISNUMERIC(ColumnName) = 1 then REPLICATE ('0', 50 - LEN(LTRIM(ColumnName))) + LTRIM(ColumnName) else ColumnName...
May 4, 2005 at 4:06 am
Column doc.CreatedDtTm participates in multiple joins "between ... and ..."
Is there clustered index on this column? It should be.
May 4, 2005 at 3:35 am
SELECT MAX(l.clrec_sysid), l.cons_entity_id, lm.Max_event_date
FROM tblclinical_record_master l
INNER JOIN tblcase c ON l.case_sysid = c.case_sysid
INNER JOIN (SELECT l1.cons_entity_id,MAX(l1.event_date) as Max_event_date
FROM tblclinical_record_master l1
GROUP BY l.cons_entity_id) lm on l.cons_entity_id = lm.cons_entity_id
and l.event_date = Max_event_date
WHERE...
May 3, 2005 at 11:12 pm
I don't remember now where I've read it. It was not only source.
But I know that optimizer takes column name from query and searches all tables mentioned in the query...
May 2, 2005 at 8:10 am
Strange error.
Probably you forgot about quotes.
declare @StartTime dateTime
set @StartTime = '20:30'
works absolutely fine.
May 1, 2005 at 11:00 pm
Using table name in column name does not make any sence.
If you want to which table this column belongs to you can write TableName.ColumnName instead of TableNameColumnName.
First option makes optimizer...
May 1, 2005 at 6:10 pm
INSTEAD OF DELETE trigger is good idea.
You can also create dummy table with FK relation to PK of your table. This will block any attempt to delete rows from the...
April 27, 2005 at 10:09 pm
Freaky Dutch English...
But if you have any SELECT statement in your application???
Dynamic SQL is your choice???
I've forgotten somebody uses access data by "SELECT...
April 27, 2005 at 5:46 pm
Try this:
select DT.Thedate, DT.Value, DT.Value - T3.Value as Delta
FROM (Select t1.thedate, T1.Value, max(t2.thedate) as PrevDate
from MyTable T1
left join MyTable T2 on t1.thedate > t2.thedate
group by t1.thedate, T1.Value)...
April 27, 2005 at 2:52 am
Viewing 15 posts - 5,986 through 6,000 (of 6,036 total)