#mysql - Sat 31 Mar 2007 between 01:46 and 01:59

caoticim tring to get a sum for some table attribute plus some others , and grup it by some attribute, aparently mssql requires all the attributes in the query to be grouped in order to funciton
jbalintcaotic: thats not mssql specific, it always has to be that way
bobnormaljbalint: thats the only way? seems fugly... there is no (1,2,3,4) style syntax possible?
jbalintnot afaik
caoticmm, i have done that same thing in the past in mysql
bobnormaljbalint: ok, cheers muchly :)
jbalintcaotic: have a working example code?
caoticsure let me find it
jbalint, here is a generic dupee query
jbalint, select count(lastname) as qty, id , lastname, lastname2, name from client group by lastname, lastname2, name having qty >1 order by qty DESC;
jbalintMySQL extends the use of GROUP BY so that you can use non-aggregated columns or calculations in the SELECT list that do not appear in the GROUP BY clause.
I see, sorry. :)
caoticjbalint, im confused, are you agreen with me or not
jbalintyes, i agree, you are right.
caoticoh ok
jbalintjust hadnt come across it before
The server is free to return any value from the group, so the results are indeterminate unless all values are the same.
caoticcrap oh well, even if i find a correct query ... this data still doesnt make sense, im better off going to the movies :P
caoticfraking end users :(
helloRobotpossible to copy a table and table's data?
jbalintfriday night is better for movies anyways
helloRobot: maybe insert into ... select
helloRobotjbalint: can i do it from one schema to another?
caoticok, ill return in the wii hours of the morning
helloRobotlike schema1.table_blah to schema2.hello_table
caoticc you around and thanks jbalint
jbalintok, take it easy
stepheltoni can't remember my password, how can i reset it?
helloRobotjbalint: insert into schema2.tablename (select * from schema1.hellotablename)
just try it
helloRobotjbalint: sorry, its just that would be 20,000+ rows
i'm scared working on this huge database
sorry i'm a newb.

Page: 2 9 16 23 30