Stueber: Is there a way to use if inside query?
Thoreson: How can I run a query using regex for numbers? select * from service_status where client = ‘myhostname-###’;
Bellido: Such as SELECT i.*, COUNTsmthg AS blah, likes/10+comments*3 AS scoretpm, iftime_sent 86400 score = scorex * 1.5 AS finalscore FROM status i WHERE .
Reitler: OnceMe: See http://dev.mysql.com/doc/refman/5.6/en/control-flow-functions.html#function_if
Groebner: So I must to use IF in the beginning of SELECT?
Richmond: I cant do like I showed?
Visconti: Frederick: stop repeating yourself
Hoekman: Salle:can you maybe rewrite my query to correct Niedzwiedzki?
Scarpaci: I cant use IF in the beginning of SELECT, because I’m using constant for my formulae
Clyatt: OnceMe: Your query doesn’t make any sense to me so don’t ask me to rewrite it
Sthill: SELECT i.*, COUNTsmthg AS blah, likes/10+comments*3 AS score, FROM status i WHERE
Atwater: That works fine, but I need to tweak score to add if time_sent of posts is less than 86000, if it is, then on current score add *1.5
Clyatt: OnceMe: * and COUNT in same SELECT and you claim it works fine?
Csubak: COUNT is in subquery 😀
Clyatt: OnceMe: Doesn’t matter
Clyatt: OnceMe: COUNT is aggregate function to be used with GROUP BY. * never makes sense with GROUP BY
Mokriski: Ok disregard that count
Doeden: I still need somehow to do if statemenet
Veldkamp: Any regex gurus present?
Mo: I have a big .sql file with around 250.000 inserts.
Meyerson: Do i have to format this file in a correct way
Marchand: Or INSERT INTO . on each line is enough ?
Szwejbka: I do not know maybe transaction ?
Peyer: Because i am seeing it is slow
Duensing: Is it possible to run subtractions in the queries?
Zmijewski: I want to do “WHERE time 12345121 – 100”
Greiner: Would this check 12345021?
Kewal: Can I use a python module in leui of an odbc driver on linux?
Sark: OS error code 2: No such file or directory
Santoriella: Is there anything wrong with this: UPDATE company SET ‘name’ = ”Test Company” WHERE id = 1
Trudell: Relipse: Use around identifiers database/table/column/alias names and ‘ around strings and dates. MySQL does allow ” for strings, but ANSI standard uses ” for identifiers which you can enable with ANSI QUOTES option.
Hovick: Snoyes, are you saying that ‘name’ should be name or are you saying ”Test Company” should be ‘Test Company’ ?
Mccalop: Relipse: two single quotes together does not form a string delimiter. you use double single quotes to put a single quote inside a string that’s already delimited by single quotes, like this: ‘this string”s quoted’
Steinbrink: I’ve attempted to use XAMPP and WAMP, but connecting to mysql locally isn’t working at all. it’s like the p***words just won’t work. am i missing something? using the wrong stack? trying to dev locally on win
Ilardi: Its been a while since I created indexes
Decoux: Scott0_: the indexes miss you.
Thuesen: If I have and index on a table for column a,b,c and I have a query that needs a,b,d
Cucuta: Do I create a new index, or can I add a column to the index?
Tung: Which is the most efficient
Decoux: Scott0_: indexes are evaluated from left to right.
Decoux: Scott0_: well, composite indexes, that is
Reinhold: So if it doesn’t search by c, then I need a new index?
Gorenberg: That’s pretty expensive
Braley: And the alternative to not create a new index would use the first index and then have to create a temporary table to search those rtesults for column d?
Tofolla: Which would take longer, but not take up as much disk?