Falsetti: Had to break up your imaginary Risse at the right points
Botwin: Http://sqlfiddle.com/#!9/58e60
Adamson: That gives me “Table ‘db_9_58e60.infos’ doesn’t exist”
Swaim: Looks like a nice site, but its damn slow
Swanton: Worked for me. what do you want the query to return and why?
Mena: One moment, im getting it to work .
Blasing: Click build schema before run sql.
Schor: Http://sqlfiddle.com/#!9/85cfd/2
Krysiak: Every product has its sort defined in “infos”
Mcguirt: One moment, i still have it wrong.
Cafaro: Here we go: http://sqlfiddle.com/#!9/3b117/1
Handly: Water should be at position 2
Gartenhaus: Because there is no info for “water in drinks” so it should use the general position for water.
Chagnon: Not sure if there is an elegant way in sql to accomplish that. what are your thoughts?
Allgeier: So where do you want beer, the only one without and info?
Kalfa: Well, those could have a hardcoded sorting like 10 or something
Granstrom: ORDER BY coalesceI.sort,10
Willcox: Well, the categories have to be taken into account. let me make a better example.
Pusser: That tool would be awesome if it wasnt so slow.
Barut: Strangely, this magically gets it right:
Rayas: Http://sqlfiddle.com/#!9/34e0d/1
Guilfoos: Trying to build a version that shows the problem.
Montroy: Looks like it thinks NULL=anything but *prefers* a real match. is that do***ented behaviour?
Matz: Http://sqlfiddle.com/#!9/7207a/1
Kess: Water should be sorted at position 2
Subia: Is that possible in sql?
Lysher: The sort order of “water” should be 2. so it comes after soda.
Nowakowski: Wouldn’t cola be considered soda?
Bertoldo: Lets implement strong AI after we got the basic sorting right.
Deangelus: The only way I can think of to do it would be to ***ign weights or something where you could specify an order like you want to. I’m far from an SQL guru though so perhaps others have a better option.
Villaluazo: Or maybe position would be a better field name
Nevue: We need an sql guru here
Sitzman: I can use SELECT SUMf1 FROM t1 to get the sum of f1. but how do i get the sum of f1 and f2 from t1?
Weisenfluh: No_gravity: we need people asking questions to take less than 45mins to explain themself
Correl: Aias: SELECY SUMf1, SUMf2 FROM t1;
Correl: Wrksx: Be careful with that :
Correl: Wrksx: SUMf1+f2 can differ from SUMf1+SUMf2
Correl: Wrksx: Think about it and you will see why
Sitzler: I thought he needed the result for each row
Jaster: Therfore thought he didn’t need sum at all
Goethals: I need one result for all rows
Fulginiti: Aias, so salle answer is correct for ya as usual
Correl: Wrksx: Here we go: http://pastie.org/10428532
Prevette: Danblack: i think i have the sqlfiddle right now. this is the ouptut i am looking for: http://pastie.org/pastes/10428529/text
Correl: Aias: It will help if you explain what exactly you want to select
Kuhner: Salle, can’t see what the f is happening there
Exe: Seems so broken to me
Correl: Wrksx: Think : Hint: SUM is aggregate function
Correl: Wrksx: No this is correct behaviour
Hennard: Guessed it is, else you wouldn’t warn me that way
Correl: No_gravity: We have plenty of sql gurus here, but they are usually busy
Massar: Gotta love pastie’s legal page: “if anything bad happens or the stuff hits the fan, it’s your fault, not ours”