Viewing 15 posts - 61 through 75 (of 137 total)
Thanks for the encouragement Jeff! Frankly, this is why I've been trying to spend time on the forums lately...it seems almost every time I try to help someone, I learn...
November 21, 2011 at 7:47 am
GilaMonster (11/20/2011)
$order = " ORDER BY user_id DESC LIMIT 1";
to this
$order = " ORDER BY logindate DESC LIMIT...
November 20, 2011 at 7:14 am
I knew there had to be a better way than my original attempt! Looking forward to spending some time later today digging in and understanding how these solutions work...
November 20, 2011 at 6:39 am
Dev, the variable values are in the previous section of code the OP posted:
//i tried using the command below to retrive the last login date, but it returns the first...
November 20, 2011 at 6:27 am
mister.magoo (11/19/2011)
If you use JonFox' sample data...
SELECT RecordSeq, Account, ActivityDate, Rep,dense_rank() OVER(PARTITION BY Account ORDER BY rep)
from #Cases
If I'm understanding the OP correctly, that's not quite what he's looking for....
November 19, 2011 at 7:08 pm
MySQL probably has a MAX() function, or something similar. It looks like you want to SELECT MAX(logindate), which would return the most recent value of the logindate column that matches...
November 19, 2011 at 6:45 pm
OK, you really don't want to use my previous code on a large set of data. The total number of seeks generated is roughly equal to the square of the...
November 19, 2011 at 10:54 am
OK, here's my first stab at it. This is pretty tricky without using a cursor. Hopefully someone else with more experience with similar problems will chime in; this works (with...
November 19, 2011 at 10:12 am
How large is "large"? How many rows? Also, is this something that will only need to be done once (so performance isn't as much of an issue) or something that...
November 19, 2011 at 9:01 am
yingchai (11/17/2011)
Just tried the scripts and it works...many thanks!
Great! Make sure to do some serious testing before putting this into production though, recursive CTEs can really get away from you...I...
November 17, 2011 at 11:28 am
Well I'm always happy to help in that case. 🙂 Let me know how it works for you. Are you utilizing Analysis Services by any chance? I believe SSAS has...
November 17, 2011 at 4:45 am
If you already have at least one connection active in a query window or in Object Explorer, opening a new query window defaults to the currently active connection. You should...
November 16, 2011 at 12:59 pm
chandan_jha18 (11/16/2011)
Thanks for your reply.Can you please suggest in more detail about what you mentioned about the filter predicate
Actually, the link that was provided is a really good place...
November 16, 2011 at 5:17 am
Hah, turns out I had seen the other post, but didn't make the mental connection to this one. Yep, that's a lot more complex than I initially realized from reading...
November 13, 2011 at 7:47 am
Ninja's_RGR'us (11/13/2011)
That code never finished in a cursor and it probably won't this time either. (Yes I know you didn't know...
November 13, 2011 at 7:41 am
Viewing 15 posts - 61 through 75 (of 137 total)