Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 611,608 points

Kidd J

Favorite Answers49%
Answers1,496
  • how would this query be wrong?

    select a.col1 as 'Column1', c.col2 as 'Column2', c.col3 as 'Column3',

    count(left(b.col4,2)) as 'Column4', sum(count(left(b.col4,2))*b.col5) as 'Column5'

    from t1 a, t2 b, t3 c

    where a.col6=b.col7 and left(b.col4,2)=c.col2

    and col8 between '2012-01-01' and '2012-01-31'

    and a.col9='1' group by a.col1, c.col2 order by a.col1;

    It's a MySQL 4.1 query and all I got is an error.

    Error Code : 1111

    Invalid use of group function

    I've tried removing the 'group by' but still receiving the same error. What's wrong with the query?

    3 AnswersProgramming & Design9 years ago
  • how to shorten this MySQL query?

    SELECT v1.* FROM (

    SELECT c1,c2,c3,c4

    FROM t1 WHERE left(c1,3)='200'

    and c2<>'20' and c3='005' group by c1

    ) v1 union all

    SELECT v1.* FROM (

    SELECT c1,c2,c3,c4

    FROM t1 WHERE left(c1,3)='200'

    and c2<>'20' and c3='006' group by c1

    ) v1 union all

    SELECT v1.* FROM (

    SELECT c1,c2,c3,c4

    FROM t1 WHERE left(c1,3)='200'

    and c2<>'20' and c3='007' group by c1

    ) v1 union all

    SELECT v1.* FROM (

    SELECT c1,c2,c3,c4

    FROM t1 WHERE left(c1,3)='200'

    and c2<>'20' and c3='008' group by c1

    ) v1;

    1 AnswerProgramming & Design9 years ago
  • Is this the correct query?

    SELECT COUNT(*),outlet_itembarcode.outletcode FROM outlet_itembarcode INNER JOIN outlet_itemproductcode

    ON outlet_itembarcode.itemcode = outlet_itemproductcode.itemcode GROUP BY outlet_itembarcode.outletcode;

    My intention is to join 2 table which have similar columns and count the total rows for certain code; in this case, the outletcode. I have 14 outletcode in both tables. I want to compare the results with my other temporary table which contain the exact total of rows for each outletcode. This 2 tables are a separation from the original temp table where one with barcode and another with productcode only. This should be accurate since the rule is if the data have the barcode it will not contain the productcode and vice versa. I did run this query but it seems that the results is not accurate. I'm using SQLyog on MySQL 4.1.

    1 AnswerProgramming & Design9 years ago
  • MySQL checksum query?

    How to make a checksum query using SQLyog?

    1 AnswerProgramming & Design9 years ago
  • SATA hard disk problem?

    I have two 3.5" SATA disk which I mounted in an external enclosure. One of it is WD blue 320GB and the other is Samsung 250GB. The problem is with the WD. Whenever I connect it to my TV, it takes forever to load things inside but my Samsung works just fine. The problem seems to start just a few days ago. I don't have this kind of problem before. Then I tried connecting it to my laptop and it does the same. Like always, the Samsung works just fine. What could probably caused this?

    1 AnswerOther - Hardware9 years ago
  • Where to find this Excel file?

    So, my boss asked me to do a comparison between two different set of codes and separate it but I can't seem to find the excel file in my server. Is it in 89 server or somewhere else? Or am I searching for the incorrect excel?

    1 AnswerOther - Computers9 years ago
  • My Girlfriend is cheating, what should I do?

    The story goes like this, last night I asked her what she will be wearing today on our date and she said 'Red' so I decided to wear red too but then when I meet with her this morning, she's wearing BLUE! That's called cheating right???? What should I do??

    7 AnswersSingles & Dating9 years ago
  • What's wrong with this SQL query?

    SELECT l.itemcode

    FROM mas_newitem l

    WHERE NOT EXISTS

    (SELECT r.productcode FROM hq_itemtemp r WHERE

    (select if(l.itemcode is not null, 1, 0)

    from mas_newitem l)

    and r.productcode=l.itemcode and r.outletcode='005');

    Error Code : 1242

    Subquery returns more than 1 row

    (16 ms taken)

    MySQL query using SQLyog

    3 AnswersProgramming & Design9 years ago
  • MySQL : Can't use FULL JOIN?

    I asked a question about how to find data that doesn't match from a two different table before and after doing some research myself, I found that some people are using the FULL JOIN statement in their script. I tried using the FULL JOIN thing but it doesn't work. Maybe it's not supported in MySQL or because my version is outdated. So, I tried using LEFT JOIN UNION ALL with RIGHT JOIN. Not sure if that's the correct way though. The results? The SQLyog is still running since yesterday! So tell me if this is correct or not and does it make a neverending loop?

    SELECT mas_newitem.itemcode,hq_itemtemp.longname,hq_itemtemp.productcode

    FROM mas_newitem

    LEFT JOIN hq_itemtemp

    ON mas_newitem.longname=hq_itemtemp.longname

    WHERE mas_newitem.itemcode <> hq_itemtemp.productcode

    and hq_itemtemp.outletcode='005'

    and hq_itemtemp.deptcode='05'

    UNION ALL

    SELECT mas_newitem.itemcode,hq_itemtemp.longname,hq_itemtemp.productcode

    FROM mas_newitem

    RIGHT JOIN hq_itemtemp

    ON mas_newitem.longname=hq_itemtemp.longname

    WHERE mas_newitem.itemcode <> hq_itemtemp.productcode

    and hq_itemtemp.outletcode='005'

    and hq_itemtemp.deptcode='05';

    Sorry, I'm new in this so.......

    2 AnswersProgramming & Design9 years ago
  • Question about SQL query?

    I'm doing a query using SQLyog from MySQL and the details are as followed.

    I have two different table and in both table, there are some column that has the same data. Both table comes from a two different database. I copied each table from both database and put it into a new local database that I create for testing purposes. What I want to do is, I want to find data that's not match with each other based on 2-3 columns. I've tried using INNER JOIN which I failed and most SQL statement that I use doesn't get result that I need. One of my colleague tell me that I need to put an IF statement in my script but I've been searching and couldn't find any that fit my description. I'm rather new in this SQL thingy so I don't really know how to write complicated scripts. I don't need the full statement, I just need something to guide me. Well, at least something that would make me understand how things work. So, help me?

    3 AnswersProgramming & Design9 years ago
  • I can't login to Facedook!!?

    What happen with Facedook? I created a profile with my friend yesterday and want to continue tweaking today but I can't seem to login!!?? Is Facedook.com is a fake???

    2 AnswersFacebook9 years ago
  • What do you hate in Timeline?

    I'm wondering why people don't like Timeline? In which part of Timeline you didn't like? Please specify

    2 AnswersFacebook9 years ago
  • I have a Hyundai Getz/Click 1.4 2005 and it smells petrol from inside the car. What could be the cause?

    My uncle got it checked last time but he said that the mechanic there didn't smell anything.

    1 AnswerMaintenance & Repairs10 years ago
  • Why is my Yahoo Messenger isn't working?

    I have a problem with my yahoo messenger and some other application in my pc. When I opened it, it suddenly close by itself. I've tried to re-install the program with some others that have the same problem but it still doing the same thing. Anyone can help me with this? Is it because of some of my pc settings that cause it or maybe a virus?

    1 AnswerOther - Yahoo Products1 decade ago
  • What is proxy?

    What is proxy and what is the benefit of using it? And how to use proxy?

    19 AnswersOther - Internet1 decade ago
  • Can anyone give me the complete tutorial for mIRC scripting?

    I'm quite active in mIRC chatting and want make my own script. I there's any tutorial regarding mIRC scripting that y'all know (whether it's for beginners or advance), please inform me.

    2 AnswersOther - Computers1 decade ago
  • Should I make out with a friend of my gf?

    Last night my gf was not at home but her friend is. Yes, most of my gf's friend always sleep at our house. She was a bit drunk and decided to crash at my place. We had like a little chat before we go to sleep. Well, I actually don't want to chat longer because I'm afraid I might end up making out with her. And I can see that she was ready to do it with me. Should I just just do it at that time or not? Part of me think I should, is that normal?

    6 AnswersSingles & Dating1 decade ago
  • Should I go meet her and apologize and ask her to take me back?

    Well, I break up with her because of something silly.. i think.. and I'm feeling guilty for what I did. What should I do?

    6 AnswersSingles & Dating1 decade ago
  • Can all of y'all give me the list of softwares you think is the best?

    It doesn't matter if it's anti-virus, media player, converter, burner, picture editing, music editing or any kind of software as long as you think it's the best.

    1 AnswerSoftware1 decade ago
  • Where can I download a variety of Manga for free?

    Manga like Gedoh the unidentified mysterious boy or Kyo Samurai Deeper etc.

    2 AnswersComics & Animation1 decade ago