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






Page: 1 2 3 4


Comments:
<FuIru> if you say that line one more time
<imorxrr> i think u dont get it.
<FuIru> you want 1 row from one table
<imorxrr> 2 query not enough.
<FuIru> and all rows that belong to that one row from another table
<FuIru> what don't I get?
<FuIru> perhaps I'm overestimating your VB skills? I'm not getting that you haven't a clue how to do what I'm suggesting?
<imorxrr> and all rows that belong to that one row from another table i just want a top.
<imorxrr> how do 2 query to break my proble ?
<FuIru> hmm, maybe it's your horrid grasp of the english language, but I'm pretty sure I just told you how to do that
<imorxrr> m
<FuIru> [22:28:34] <FuIru> open up a recordset for the first query, which gets you the top row
<FuIru> [22:28:45] <FuIru> and then use the values from that to create your second recordset
<FuIru> your second recordset, obviously, would retrieve the rows you want from your second table
<imorxrr> no no..... the final result can be more than 1 row..
<imorxrr> john,12-dec-2006



<FuIru> no ****, sherlock
<imorxrr> Susu,12-dec-2007
<imorxrr> if final result just 1 row. 2 query is enough
<imorxrr> there is sql syntax to group record and get top of each group ??
<imorxrr> id number
<imorxrr> 1 11
<imorxrr> 1 12
<imorxrr> 1 13
<imorxrr> 2 41
<imorxrr> 2 42
<imorxrr> show result is
<imorxrr> 1 13
<imorxrr> 2 42
<imorxrr> how do it ??
<lance_> does this look like #sql ?
<lance_> ;o
<FuIru> wow, amazing how what he just described is pretty much NOT what he described before
<Two-Bits> he also pretty much described the solution
<Two-Bits> selec id, top(fld1) from mytable group by id
<Two-Bits> select*
<FuIru> s/top/max/ I would think
<Two-Bits> oh
<FuIru> hmm
<Two-Bits> yeah, my bad
<Two-Bits> i just woke up
<FuIru> though, don't think that'd work
<Two-Bits> sure it would
<lance_> fld1?
<Two-Bits> it's damn near a textbook example
<FuIru> it's actually two tables still, I think
<Two-Bits> doesn't matter
<Two-Bits> lance_: clearly that's a placeholder for whatever field you want. "number" in this case
<Two-Bits> ack
<lance_> i figured.
<lance_> ;
<lance_> !@
<FuIru> i'd think if you had rows like 1,1 , 1,2 , and 2,3, you'd get 1,3, 1,3 and 2,3 back
<Two-Bits> er, for some reason i thought lance_ was asking the question. imorxrr: pay attention
<Two-Bits> FuIru: it's grouped by id, so you can only get one of each id from that
<FuIru> mm, ah yes
<Two-Bits> since id is a grouped field, you can return it's value straight forwardly. it's distinct to each group
<Two-Bits> all other fields cannot be obtained. but you can get a single value for a group by using the aggregate functions like max, sum, avg, etc
<Two-Bits> so it basically makes groups like 1, (2, 3); 2, (3)
<FuIru> guess that means it's time for me to go sleep, then
<Two-Bits> heh
<Two-Bits> shift change
<Two-Bits> i need mickey d's
<Re_Boot> eww mickey d's
<Re_Boot> I can tolerate thier breakfeast menu, lunch, no way.
<Two-Bits> i like teh dbl chz brgrs
<Two-Bits> and the chx smmchs
<Re_Boot> solent yellow
<Two-Bits> dear lord, it's made from asians!?
<Two-Bits> soylent*
<Re_Boot> without the mandrian
<Two-Bits> i'll just ask for extra agent orange special sauce
<Two-Bits> bbl
<Re_Boot> seriusly, I pull into the drive thru, place an order for cheeseburgers, they ask if I want anything else, I say no, pull up to the window and they tried to up sell me on some frys, I tell them as I point to the dog "It gives him gas"
<Two-Bits> hehe
<Re_Boot> ;)



<Re_Boot> I wont eat there
<Re_Boot> I will order a egg/bacon/biscuit no and then
<Two-Bits> honestly, it's healthier (or can be) than a lot of the processed noise in grocery stores
<Re_Boot> now and then even
<Two-Bits> bah, it's mcmuffin or bust
<Two-Bits> or that steak bagel thing.. that's yummy too
<Re_Boot> butter pecan ice cream YAY!
<Two-Bits> ok.. really bbl this time
<Re_Boot> heh
<imorxrr> two bits : with -->selec id, top(fld1) from mytable group by id ?? as fulru say, <FuIru> i'd think if you had rows like 1,1 , 1,2 , and 2,3, you'd get 1,3, 1,3 and 2,3 back
<Two-Bits> imorxrr: as he also said, i meant Max() not Top()
<imorxrr> wait a moment...
<imorxrr> Column 'table1.id' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
<Two-Bits> what does your entire sql look like?
<Two-Bits> the id in the select list should be the same as the id in the group by
<imorxrr> and if i group it be : Column 'table1.id' is invalid in the select list because it is not contained in an aggregate function and there is no GROUP BY clause.
<imorxrr> select id,max(nomor) from table1 group by nomor,id
<Two-Bits> dont group by both fields
<Two-Bits> just the id
<Two-Bits> otherwise there's no real way to get a max from the other field. and you're basically doing a distinct
<imorxrr> yup . work!!!! :)
<imorxrr> top make me fail.
<Two-Bits> hrm?
<imorxrr> Syntax top. before i always thinking using Top...thanks bro. i will be back again.
<Two-Bits> top is for limitting the number of results you get back. like getting the top 5 records
<Two-Bits> ok.. so the maybe the ms script control is NOT as neat as i hoped it would be
<kickstand> OMG bow to the allmighty two-bats
<kickstand> elnino.
<kickstand> i said ELNINO CUNT.
<lance_> oh nnues
<kickstand> heh
<lance_> i feel elightly drunkish
<lance_> i've been eatingt jelly made with a vodka ;/
<kickstand> i stayed sober tonight. two-bits sucks bare testicles.
<Two-Bits> who knew he was just a retarded sober as he is drunk?
<Meekys^Away> or i sometimes wish that were the case
<Two-Bits> [04:35:41] <kickstand> i'll be seeing you shortly.
<lance_> HAHAHAHJ ****ERS
<Two-Bits> and that's the sort of retarded psuedo-threatening pm's i subsequently get
<Kaverin> well I'm not unbanning him anymore, and I'll just ignore any pms
<lance_> ;o
<Re_Boot> hmmm...I missed it....saturaday night at the fights, In this corner we have lean mean heaveyweight Two-Bits and in the other corner we have a contender mean and nasty, drunk or sober, the challanger kickstand!
<Re_Boot> he's now msg me......sigh
<Two-Bits> are you calling me fat?
<Re_Boot> not all cheeky
<imorxr> re_boot is fat ?
<Re_Boot> merely an observation of op status, have to admit, th'kids got balls
<Meekys^Away> not me tho this time
<Two-Bits> perhaps i'll compile all the pm's and harrassment from other channels for general amusement some time
<Re_Boot> heh
<Re_Boot> lotsa crap gets said, not worth the printout inho
<Re_Boot> Id never walk into a knife fight without my gun...
<Re_Boot> I also have 2 ciggs left....
<Re_Boot> dam I need to quit these
<Two-Bits> what, the patches?
<Re_Boot> no the ciggs silly
<Re_Boot> I need the patches to easy the withdrawls, Im a wreck when I try cold turkey
<Two-Bits> chain smoke 5 packs in a day, you'll not want to touch them for at least a few days. after that, it shouldn't be too hard not to pick them up
<Re_Boot> not to mention I get real nasty with clients when I go cold turkey
<Two-Bits> i never get withdrawl. i just got the whole habit thing. i get bored and desperately try to figure out what normal people do when i'm normally smoking
<Meekys^Away> sleep
<sennyv> hii
<sennyv> i don't know which one to use... ADO, DAO and RDO ? any opinion ?
<Re_Boot> ADO
<Meekys^Away> ado
<sennyv> why?
<Two-Bits> ado
<Meekys^Away> ado replaces dao
<Two-Bits> because the survey says so
<Re_Boot> dao is nolonger supported
<Two-Bits> and that's adodb not adodc
<sennyv> okay,thanks


Name:

Comments:

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






Return to #vb
or
Go to some related logs:

ubuntu edgy cmi8330
linux
ethupia