Visitors can check out the Forum FAQ by clicking this link. You have to register before you can post: click the REGISTER link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. View our Forum Privacy Policy.
Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!
You are not logged in or you do not have permission to access this page. This could be due to one of several reasons:
You are not logged in. If you are already registered, fill in the form below to log in, or follow the "Sign Up" link to register a new account.
You may not have sufficient privileges to access this page. Are you trying to edit someone else's post, access administrative features or some other privileged system?
If you are trying to post, the administrator may have disabled your account, or it may be awaiting activation.
Going well as it happens. Been offered an extension if I want one, Ive just put in for an EDS role instead near Slough for £400pd. So fingers crossed on that one as well.
Going well as it happens. Been offered an extension if I want one, Ive just put in for an EDS role instead near Slough for £400pd. So fingers crossed on that one as well.
As I am now a certified Trainer in CR as well as a Consultant anyone who would actually like training or training notes on how to use the thing properly as opposed to the hacking the rest of you do then drop me a line.
Yep. Gay for £400 a day thanks.
Well Interior designers earns lots of money too, but they're still gay. CR is a gay technology, full stop, not for real men.
As I am now a certified Trainer in CR as well as a Consultant anyone who would actually like training or training notes on how to use the thing properly as opposed to the hacking the rest of you do then drop me a line.
Ahem, are you sure you're really investing your talents in the leading edge here?
As I am now a certified Trainer in CR as well as a Consultant anyone who would actually like training or training notes on how to use the thing properly as opposed to the hacking the rest of you do then drop me a line.
only ever use cr if the client wants it used. used it a few weeks a go for similar crosstab and other queries but not my weapon of choice i have to say. lack of control over format etc etc
although i think a couple of the previous posts have covered it, here is my take
if the nr of possible events are know, ie yuo know there will be evt1,evt2 and evt3, you can do this quite simple using setbased (and standard) sql.
select person,
sum(case when event_id = 1 then 1 else 0 end) as cnt_event_1,
sum(case when event_id = 2 then 1 else 0 end) as cnt_event_2,
sum(case when event_id = 3 then 1 else 0 end) as cnt_event_3
from mytable
group by person
if it is not, and you are not using ms sql 2005 (which implements crosstab), or ms sql 2000 with an additional 3rd party crosstab xp, then you can either:
a) build a dynamic sql t obe executed via exec(@sql), or sp_executesql (ms specific). no need for cursors even, d oa coalesce with distinct to pick up the exact nr of events to match...
b) use a cursor (which almost always sucks, and tells you u probably did somethin wrong)
either way, the db will sort it out faster then taking the data out of there and process in some other language (i dont care what u guys say, datacentric processing win 9 out of 10 times).
Leave a comment: