Viewing 15 posts - 1,966 through 1,980 (of 3,957 total)
mpdillon (2/12/2013)
Thank you for the reference. I had actually seen that before. I used it as best I could. But since it didn't use the lookup table, I...
February 12, 2013 at 5:02 am
Something like this then:
;WITH Trans (ID, TransactionAmt) AS (
SELECT '1',20000 UNION ALL
SELECT '1',30000 UNION ALL
SELECT '2',40000 UNION ALL
SELECT '2',20000 UNION ALL
SELECT '2',20000 UNION ALL
SELECT...
February 12, 2013 at 1:29 am
Note that I posted the query plan in my previous post in case someone wants to take a shot at that analysis.
February 11, 2013 at 11:17 pm
Steven Willis (2/11/2013)
Steven Willis (2/11/2013)
...I can't guess what effect this would have on performance of the function.I was wondering about that! Thanks for doing the proof testing.
I would love...
February 11, 2013 at 9:27 pm
Apparently changing the language from english to spanish changes the @@DATEFIRST value from 7 to 1.
I didn't realize that side-effect. Interesting...
It also accounts for why I didn't see it...
February 11, 2013 at 7:05 pm
ChrisM@Work (2/11/2013)
DROP TABLE #mytable
CREATE TABLE #mytable
(P_KEY INT IDENTITY(1,1) PRIMARY KEY CLUSTERED,
LAST_DAY_OF_MONTH...
February 11, 2013 at 6:47 pm
Another shot in the dark. Maybe the OP wants the minimum amount from unique transactions for each ID?
;WITH Trans (ID, TransactionAmt) AS (
SELECT '1',20000 UNION ALL
SELECT '1',30000...
February 11, 2013 at 6:27 pm
Lynn Pettis (2/11/2013)
briancampbellmcad (2/11/2013)
UPDATE [tblTransactions] SET [AllocatedDate] = ........Basically I need to set AllocatedDate to "Today" using something like "Now" or "Now()"... any ideas? Thanks!
UPDATE [tblTransactions] SET [AllocatedDate] =...
February 11, 2013 at 6:12 pm
p.ramchander (2/11/2013)
dwain.c (2/11/2013)
No idea because I don't know what Day 01, Day 02, etc. are supposed to represent.
;WITH Punches AS (
SELECT *
...
February 11, 2013 at 6:02 pm
Sean Lange (2/11/2013)
ahpitre (2/11/2013)
February 11, 2013 at 5:57 pm
Michael Valentine Jones (2/11/2013)
dwain.c (2/11/2013)
select
a.DT,
LastDayofMonth = dateadd(mm,datediff(mm,-1,a.DT),-1),
LastSundayofMonth =
dateadd(dd,(datediff(dd,'17530107',dateadd(mm,datediff(mm,-1,a.DT),-1))/7)*7,'17530107'),
DwainsWay =
...
February 11, 2013 at 5:35 pm
No idea because I don't know what Day 01, Day 02, etc. are supposed to represent.
February 11, 2013 at 7:01 am
MAX(day_value)-DATEDIFF(minute,MIN(punchTime), MAX(punchTime))/60.
February 11, 2013 at 5:23 am
p.ramchander (2/11/2013)
Now, I created a table...
February 11, 2013 at 4:37 am
kevin 20860 (2/11/2013)
I'll check it...
February 11, 2013 at 3:02 am
Viewing 15 posts - 1,966 through 1,980 (of 3,957 total)