Viewing 15 posts - 1,066 through 1,080 (of 2,894 total)
Henrico Bekker (10/15/2012)
select criteria from yourtable where datecolumn < dateadd(dd, 30, '20110420')
What do you mean by "within"?
Is it within 30 days before the day?
WHERE datecolumn BETWEEN '20110420' AND...
October 15, 2012 at 2:33 am
I'm a bit confused with OP last requirements. Looks like expected outcome doesn't corresponds to:
That means we need to display first Enrollment date for first test date for particular Year.
May...
October 11, 2012 at 8:52 am
That may win a bit:
SELECT td.dtStartDate
,Max(dtRunDate)
FROM #TestDates td
LEFT JOIN #EnrollmentDates ed
ON ed.dtRunDate <= td.dtStartDate
group by td.dtStartDate
October 11, 2012 at 8:37 am
Dhirju (10/11/2012)
which is better for performance wise,function or join?
thanks
What is the healthier Apples or Oranges? 😉
October 11, 2012 at 8:27 am
Your trigger has one major flow.
When INSERT operation is performed the TRIGGER is fired for an operation, not for every inserted record.
The way your trigger is written it will...
October 11, 2012 at 2:42 am
Float is a very bad choice for monetary values as it's approximate numeric.
I would recommend Decimal which is precise (exact numeric).
You can use Money too, if you brave enough, but...
October 11, 2012 at 2:32 am
...
The purpose for using a Cursor is because i need to run an Update not for one "referencia" = Article, but for more and less 170000...
That your line is the...
October 10, 2012 at 3:41 am
Sorry mate, it's 20 past midnight in my place. You will need to wait for someone in US to pick up this thread.
I can give you some ideas how...
October 9, 2012 at 5:22 pm
First of all, your current code in your cursor has some bugs:
-you never set @tam-2 variable,
-if no records found in SGT table, @tam-2 will be NULL and your...
October 9, 2012 at 5:12 pm
Arthur Kirchner (10/9/2012)
Just FMI:has anyone of you ever used global temp tables?
I definitely didn't^^
I did.
Great tool for some one-off & ad hoc tasks.
But also, can be used in more advanced...
October 9, 2012 at 6:13 am
Phil Parkin (10/9/2012)
Steve Jones - SSC Editor (7/28/2008)
October 9, 2012 at 4:49 am
Or with using DISTINCT instead of GROUP BY:
INSERT INTO #Sampledata (USERID, CLIENTID, PROJECTID)
SELECT DISTINCT 'YYY', CLIENTID, PROJECTID
FROM #Sampledata
Actually your data model doesn't look right.
If for every user, you...
October 9, 2012 at 4:33 am
Jason-299789 (10/9/2012)
October 9, 2012 at 4:28 am
Jason-299789 (10/9/2012)
yuvipoy (10/9/2012)
## is a Global temporary tables
Local Temp table is valid only for that processor id(@@SPID) alone where as Global Temp table is valid...
October 9, 2012 at 3:46 am
Try:
Select *
From dbo.Events
Where EventID = '{31AB0164-6BC9-448D-BC3E-53FEA210365E}'
October 8, 2012 at 10:26 am
Viewing 15 posts - 1,066 through 1,080 (of 2,894 total)