webponce rants

things less interesting than a pigeon walking in a circle.


i spent all day writing just this:

realChartQ = "select top 50 max(datediff(d,date_created,getdate())), votes.vote_for, max(flyers.rating) as rating, max(flyers.title) as title, (count(votes.vote) * (sum(votes.vote)* convert(integer,((max(datediff(d,date_created,getdate()))*ceiling((floor(convert(float,8)/1+convert(float,max(datediff(d,date_created,getdate()))))/8))) + (8*(ceiling(floor(convert(float,max(datediff(d,date_created,getdate())))/1+convert(float,8))/1+max(datediff(d,date_created,getdate()))))))))) as sumvote from technics_sflyervotes votes LEFT JOIN technics_sflyers flyers ON votes.vote_for = flyers.id WHERE votes.voted_on > '"&d1&"' AND votes.voted_on <= '"&d2&"' GROUP BY votes.vote_for ORDER BY sumvote DESC, rating DESC"

it might not look much.. but hell for my tiny brain to work out.. oh the pain of it all
and its slow.. !!! i've been looking at stored procedures and everything.. might have to convert some of it to SPs to make it faster.