Results 1 to 5 of 5

Thread: i`m a newbie, help!

  1. #1
    Join Date
    Apr 2008
    Posts
    1

    i`m a newbie, help!

    i have started with the basics of SQL.
    i am at lesson 3, how to select tables.
    now when i give a command as given as in the example and submit the query, i get an message stating invalid charachter used in command, where as i have tried 100 times.
    for example in lesson 3:
    select first, last, city from empinfo where first LIKE `Er%`;
    submit
    it gives invalid command whereas the statement goes this way in the same example i`ve typed,
    select first, last, city
    from empinfo
    where first LIKE `Er%`;
    submit
    it gives results.
    where am i going wrong?
    is it that i need to divide the statements and give spaces and use 3-4 different lines as shown in example? also some statements work, but most of the time it says invalid charachter, only when i copy paste, it gives a result display of the table. i`ve also copy pasted and writtent the statements as it is, also tried writting ``from`` and ``where`` as it is placed and shown in example,
    please if anyone of you can guide me, where am i going wrong?
    regards
    robbie
    Last edited by robbierocker; 04-12-2008 at 11:06 AM.

  2. #2
    Join Date
    May 2008
    Posts
    5
    I dnt think if you put them in 3 or 4 lines will make any difference.

    However, if it works in that way, so just go with multi lines way

    Good luck

  3. #3
    Join Date
    Mar 2007
    Posts
    1
    wriring the query in a single line or two - three lines doesn't make any difference unless it is terminated by semicolon.

  4. #4
    Join Date
    May 2008
    Posts
    2
    Customer
    (C-No, Name, City, Balance, Age)
    010 Ali ISB 1000 30
    0120 Akbar LHR 2000 35
    030 John LHR 1500 40
    040 Khan PSR 5000 28
    050 manji LRH 500 45
    Write SQL queries for the following
    List out those customers whose balance is greater than 2000.
    List names of Lahore-based customers
    List out the customers whose balance is less than 2000 and not living in Islamabad.

  5. #5
    Join Date
    May 2008
    Posts
    2
    CUSTOMER(Customer-ID, Customer-Name,Customer_Address)
    ORDER(Order-Id, Order-Date, Customer-Id)
    Whereas the association name between the above entities is submits

Posting Permissions

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