Java linux HTML qmail C++ PHP Debian MySQL ASP JavaScript perl Delphi NetBSD Solaris etc etc etc [...]






Page: 1 2 3


Comments:
<Darken|> hey moz
<Arrakis> hi Darken|
<Darken|> hi
<eirikjd> How can I easily increase an integer value by UPDATE?
<Arrakis> update tablename set column = column + incrememnt
<eirikjd> thanks
<Arrakis> np
<phargle> woot 4 days 300 miles from work
<Jarett_> im pushing like 48 hours of working straight :P
<Jarett_> then my boss called and said he wanted me to do a report of all the problems ive had with the systems over the last 2 days. the problem is they are old and slow numnuts.
<Quant> or because you made them ****ty
<Quant> instead of focusing on design you were memorizing the bible ;)
<Jarett_> my job is to clean up other peoples messes. I make crappy things perfect
<phargle> lol
<phargle> 2 weeks of app rollouts and hardware failures, im ready for a break
<Quant> what about anal bleeding?



<phargle> ive had none of that
<Pegazus> how to compare 2 strings in sql?
<CoJoNEs> where 'string' = 'string' ?
<Pegazus> mmm
<Pegazus> is this valid? SELECT (SomeThing = '+'), Other FROM MyTable?
<CoJoNEs> no
<CoJoNEs> @ learnsql
<Pegazus> hehe
<CoJoNEs> select something, other from table where something = '+' is probably what you want
<Pegazus> nonon
<Pegazus> i want to get the result comparison of (SomeThing = '+')
<Pegazus> i would get something like: true, 4; false, 9; true, 10; etc...
<CoJoNEs> case
<CoJoNEs> sql doesnt really have boolean, although some database support it
<Pegazus> mine does i think :p
<CoJoNEs> or an inline if (iif)
<Pegazus> SELECT CASE WHEN (SomeThing = '+') THEN "True" ELSE "False" END, Other FROM MyTable?
<Pegazus> will that work?
<Pegazus> (it returns a string i know)
<Pegazus> and it is '' :p not ""
<Pegazus> but well
<Quant> pega
<Quant> select case something when '+' then plus when 'something' then something
<Pegazus> thanks
<d2d_h0me> hello there good evening
<AImtyBob> I have a table (in DB2) listing time clock records for employees. Fields: Name, Time (as an int, eg. 20051231115959), and a PayType field that's either 1, 4, or 5
<AImtyBob> I need a query to make a list of each employee (one row each) with the PayType from their most recent punch
<AImtyBob> and I can't figure out how to do it with MAX()
<AImtyBob> anyone have any ideas?
<AImtyBob> I can think of an ass-complicated way with a subquery but I figure there must be a better way
<d2d_h0me> i say that you lay out all the possible scenarios and make queries and compare them :)
<AImtyBob> I only have one possibility and I'm trying it now, not sure it will even work 8/
<AImtyBob> can I use aggregate functions in a where clause?
<AImtyBob> like WHERE time = max(time)?
<d2d_zZzz> you use "having"
<AImtyBob> oh neat, forgot about having
<d2d_zZzz> wtf i am supposed to asleep
<d2d_zZzz> s/asleep/be asleep
<d2d_zZzz> hell you all. i am going to bed
<AImtyBob> k hell you all, thanks
<AImtyBob> err you too
<AImtyBob> err k, anothe rquestion, can you mix having and where?
<AImtyBob> or can you throw normal where stuff into a having?
<d2d_zZzz> sure
<d2d_zZzz> god dammit!
<AImtyBob> http://sql-servers.com/nopaste/?show=138
<Quant> having lets you filter grouped stuff, where lets you filter each record
<AImtyBob> it's complaining that an expression isn't valid in my SELECT
<Quant> no
<Quant> put the 2nd filter in the where
<AImtyBob> k
<Quant> yo bob
<Quant> aren't you from casino?
<AImtyBob> http://sql-servers.com/nopaste/?show=138
<AImtyBob> yah
<AImtyBob> err
<Quant> you pasted the same thing
<AImtyBob> oops misspaste
<Quant> so did you get promoted and stuff?
<Quant> you need to group by titcod also



<AImtyBob> nah
<AImtyBob> stilldoing scheduling
<AImtyBob> no paste is acting funky on me
<AImtyBob> not giving me an url after I paste
<Quant> anywya
<AImtyBob> http://sql-servers.com/nopaste/?show=139
<Quant> put the 2nd filter from having into where
<Arrakis> its called ur address bar moron
<Arrakis> lmao
<Quant> and you need to group by all fields unless you aggregate them
<Arrakis> ITS NOT HIDING FROM U
<AImtyBob> it's called I KNOW it wasn't submitting properly
<Quant> arrakizzzz
<AImtyBob> since I did it four times after #138 andi tjust now gave me 139 kthx
<Arrakis> quaiiiinnt
<Quant> dude
<Arrakis> hi my name is bob and i am learning how to clickie buttons
<Quant> you can't do that
<Quant> SELECT tiempn, MAX(tirtim) as pTime, titcod FROM clocfile00.cktimefl WHERE
<Quant> tisec3 = '0SOBM0' GROUP BY tiempn HAVING MAX(tirtim) = tirtim
<Arrakis> what?
<Quant> bob
<Arrakis> thats his name - try not to wear it out or make fun of it
<Quant> max(tirtim) = tirtim?
<Arrakis> lol
<AImtyBob> yah, tirtim is time of punch
<Quant> dude
<AImtyBob> trying to restrict it just the PayCode (titcod) from the very latest punch
<Quant> just think about it
<Quant> aimity
<Quant> select top 1 tirtim, titcod from table order by tirtim desc
<AImtyBob> for all employees?
<Quant> no
<Quant> i thought you just need 1
<AImtyBob> no, I need a list of every employee 8/
<AImtyBob> and their code from the latest punch
<Quant> so just do
<Quant> select empid, max(time) from table group by empid
<Quant> what's the problem?
<AImtyBob> k running
<AImtyBob> slooooowly (big table)
<AImtyBob> oh ****
<Quant> need index0rs
<Quant> is this ms access?
<AImtyBob> because I just did it for the entire casino of 3,000 people
<AImtyBob> no, db2
<AImtyBob> instead of just my dept
<AImtyBob> oops
<AImtyBob> and yah, I don't think any of their **** is indexed
<AImtyBob> since my newly restricted query is taking just as long
<AImtyBob> awesome
<Quant> 3000 people should be less then a second :)
<AImtyBob> 2.5 million records
<Quant> dude
<Quant> still man
<Quant> put some indexes
<AImtyBob> hahaha
<Quant> although max() i dunno
<AImtyBob> not my db
<Quant> see if there are indexes on the time field
<AImtyBob> in fact I shouldn't be in it whatsoever
<AImtyBob> the only access I have to their db is through OLE/ODBC
<AImtyBob> I found a backdoor in our time editing software that gave me table/field names
<AImtyBob> and just started playing from there
<Quant> oh
<Quant> you are haxing sorta?
<AImtyBob> basically
<AImtyBob> low rent hack
<Quant> how
<AImtyBob> well I wont exactly be winning any awards, but
<AImtyBob> we have kronos installed
<AImtyBob> it's a front end for our green screen time sheet editor
<AImtyBob> but I hate it so I just use green screen, and found that I could back out of one of the menus


Name:

Comments:

Please enter the result of the sum 63 + 46 (to avoid spam):






Return to #sql
or
Go to some related logs:

source:current gov of nyc
vmware
winxp
openbsd
windows
politics
get heighest depth flash 8
is viotek psu any good?
politics