Enjoy an Ads-Free Jets Insider - Become a Jets Insider VIP!
Page 1 of 2 12 LastLast
Results 1 to 20 of 36

Thread: Help! I need some Help! Anybody!

  1. #1
    All Pro
    Join Date
    Apr 2003
    Location
    Fr:NYC to Mid Ga.
    Posts
    8,838
    Post Thanks / Like

    Help! I need some Help! Anybody!

    With MYSQL structured query Language; Every time I write the functions
    like this;

    USE PREMIERE;
    Select Customer_num, Customer_name
    From Customer
    where Orders = "Gas Range"
    and Customer_num Not IN
    (Select Customer_num
    From Orders) ;

    I get an error message; What am I doin wrong here?

  2. #2
    Hall Of Fame
    Join Date
    Nov 2011
    Posts
    14,325
    Post Thanks / Like
    > has programming problem
    > runs to a football message board for help

    u wot m8

  3. #3
    Hall Of Fame
    Join Date
    Nov 2011
    Posts
    14,325
    Post Thanks / Like
    Since I've only ever coded in C++, I wouldn't know much about why you're getting that error. But, my best guess would be a syntax error.

  4. #4
    Jets Insider VIP
    Board Moderator

    Join Date
    Jun 2004
    Posts
    27,121
    Post Thanks / Like
    Delete System32

  5. #5
    Rookie
    Join Date
    Oct 2011
    Posts
    548
    Post Thanks / Like
    String literals in SQL should have single, not double quotes around them. So 'gas range'.

  6. #6
    Rookie
    Join Date
    Feb 2006
    Posts
    867
    Post Thanks / Like
    Way to put a title that would get peoples attention in the middle of all the hell and tragedy all around us for some geek question nobody gives a rats ass about !!!....FREAKIN LOSER !!!

  7. #7
    JetsInsider.com Legend
    Join Date
    Mar 2005
    Posts
    49,680
    Post Thanks / Like
    You need more RAM.

  8. #8
    All League
    Join Date
    Jul 2005
    Posts
    3,206
    Post Thanks / Like
    How far are you sitting away from the screen?


    BTW, Who is this 'General Failure' character and why is he always trying to ready my hard drive?

    Have you tried running 'Scandisk' ? Is your cursor flashing or solid?
    Last edited by frostlich; 11-02-2012 at 06:35 PM.

  9. #9
    All Pro
    Join Date
    Apr 2007
    Location
    Boynton Beach, FL
    Posts
    8,897
    Post Thanks / Like
    Unplg ur computer. Then plug it back in.

  10. #10
    Board Moderator
    Jets Insider VIP

    Join Date
    Oct 2005
    Location
    SF via Strong Island
    Posts
    29,354
    Post Thanks / Like
    String up liberals?

    now hold on

  11. #11
    Hall Of Fame
    Join Date
    Nov 2011
    Posts
    14,325
    Post Thanks / Like
    Quote Originally Posted by FF2 View Post
    You need more RAM.
    You'll need a PS1 memory card.

  12. #12
    Hall Of Fame
    Join Date
    Nov 2011
    Posts
    14,325
    Post Thanks / Like
    Quote Originally Posted by WestCoastOffensive View Post
    String up liberals?

    now hold on

  13. #13
    All League
    Join Date
    Aug 2007
    Posts
    3,069
    Post Thanks / Like
    Quote Originally Posted by TechJet View Post
    With MYSQL structured query Language; Every time I write the functions
    like this;

    USE PREMIERE;
    Select Customer_num, Customer_name
    From Customer
    where Orders = "Gas Range"
    and Customer_num Not IN
    (Select Customer_num
    From Orders) ;

    I get an error message; What am I doin wrong here?
    I assume the "Orders" field is from the "Orders" table and not the Customer Table since that makes sense to me.

    If the Orders field is in the Customer table, then that's okay.

    The way your SQL reads is that you only want to select customers who don't have any orders and who have the orders field of the Customer table that doesn't == Gas Range.


    Tell me what your tables look like and what you want to do and I'll give you the SQL.

  14. #14
    Hall Of Fame
    Join Date
    Sep 2005
    Location
    New York, NY
    Posts
    13,317
    Post Thanks / Like
    Hey, you know what's cool?

    In the aftermath of the tri-state area's worst natural disaster, when people with limited means of communication are in need of real help, starting a thread called "Help! I need some Help! Anybody!"

    To address some nerd issue.

    Keep on truckin'

  15. #15
    Rookie
    Join Date
    Oct 2011
    Posts
    548
    Post Thanks / Like
    Quote Originally Posted by CleatMarks View Post
    I assume the "Orders" field is from the "Orders" table and not the Customer Table since that makes sense to me.

    If the Orders field is in the Customer table, then that's okay.

    The way your SQL reads is that you only want to select customers who don't have any orders and who have the orders field of the Customer table that doesn't == Gas Range.


    Tell me what your tables look like and what you want to do and I'll give you the SQL.
    The Orders field would have to come from the Customer table because an outer query can't see a subquery's fields. You're right that it wouldn't really make sense in the Customers table, so I'm thinking this isn't a real problem but is just TechJet being a dork. Nonetheless, double quotes in SQL surround an identifier like a table or field name while single quotes surround string literals.

  16. #16
    All League
    Join Date
    Aug 2007
    Posts
    3,069
    Post Thanks / Like
    Quote Originally Posted by EternalChampion View Post
    The Orders field would have to come from the Customer table because an outer query can't see a subquery's fields. You're right that it wouldn't really make sense in the Customers table, so I'm thinking this isn't a real problem but is just TechJet being a dork. Nonetheless, double quotes in SQL surround an identifier like a table or field name while single quotes surround string literals.
    That's why if I have the tables and what he wants to do, I can give him the SQL.

    It can probably be done with a simple inner join from what I'm guessing.

    I imagine he just wants to select customers who do or don't have "Gas Range" orders but I can't tell from the way it's written.

  17. #17
    All Pro
    Join Date
    Jul 2009
    Posts
    9,397
    Post Thanks / Like
    SELECT * FROM People
    WHERE clue = 0


    That query returned http://www.jetsinsider.com/forums/sh...d.php?t=250336
    Last edited by southside; 11-02-2012 at 07:07 PM.

  18. #18
    All League
    Join Date
    Aug 2007
    Posts
    3,069
    Post Thanks / Like
    Quote Originally Posted by southside View Post
    SELECT * FROM People
    WHERE clue = 0


    That query returned http://www.jetsinsider.com/forums/sh...03#post4672203

    Hey!

  19. #19
    Rookie
    Join Date
    Oct 2011
    Posts
    548
    Post Thanks / Like
    Quote Originally Posted by CleatMarks View Post
    That's why if I have the tables and what he wants to do, I can give him the SQL.
    Uhh, what I think he wants to do is post a stupid question he doesn't care about the answer to, with a catchy title to get peoples' attention. That's a disturbed, attention-starved individual, there ain't no SQL for that.

  20. #20
    All Pro
    Join Date
    Jul 2009
    Posts
    9,397
    Post Thanks / Like
    Quote Originally Posted by CleatMarks View Post
    Hey!
    LOL... that wasn't actually supposed to be directed at your post. Stupid internet!

    I fixed it.
    Last edited by southside; 11-02-2012 at 07:07 PM.

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  

Follow Us