| caotic | im 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 |
| jbalint | caotic: thats not mssql specific, it always has to be that way |
| bobnormal | jbalint: thats the only way? seems fugly... there is no (1,2,3,4) style syntax possible? |
| jbalint | not afaik |
| caotic | mm, i have done that same thing in the past in mysql |
| bobnormal | jbalint: ok, cheers muchly :) |
| jbalint | caotic: have a working example code? |
| caotic | sure 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; |
| jbalint | MySQL 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. :) |
| caotic | jbalint, im confused, are you agreen with me or not :P |
| jbalint | yes, i agree, you are right. |
| caotic | oh ok |
| jbalint | just 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. |
| caotic | crap oh well, even if i find a correct query ... this data still doesnt make sense, im better off going to the movies :P |
| jbalint | weird |
| caotic | fraking end users :( |
| helloRobot | possible to copy a table and table's data? |
| jbalint | friday night is better for movies anyways helloRobot: maybe insert into ... select |
| helloRobot | jbalint: can i do it from one schema to another? |
| caotic | ok, ill return in the wii hours of the morning |
| helloRobot | like schema1.table_blah to schema2.hello_table ? |
| caotic | c you around and thanks jbalint |
| jbalint | ok, take it easy |
| stephelton | i can't remember my password, how can i reset it? |
| helloRobot | jbalint: insert into schema2.tablename (select * from schema1.hellotablename) ? |
| jbalint | !tias argh just try it |
| helloRobot | jbalint: sorry, its just that would be 20,000+ rows i'm scared working on this huge database :( sorry i'm a newb. |