Results 1 to 12 of 12

Thread: Customer Table

  1. #1
    Join Date
    Apr 2010
    Posts
    20

    Unanswered: Customer Table

    Hello to every one
    I need some Help
    I Have a customer and he asked me to Modify the customers
    table in the database , it's a litle bit tricky all he wants to do
    is The table customer to link to more than one contact details.
    he is actually the Supplier and supllies other companies with
    welding stuff, all he wants is to contact to those companies
    with more than one person , I am try to figure out how to go about this
    and my head stack.
    I tried To link to another seperate table called contacts and then add
    another table cont1 cont2 cont 3 but this way limits the contacts to 3
    How to go about this any one help please.

  2. #2
    Join Date
    Apr 2010
    Posts
    20

    Please help with query

    Mate I just asked for a litle help not to solve the mystery diamond

  3. #3
    Join Date
    Aug 2009
    Posts
    262
    post DDL and sample data ... and every body will help ...

  4. #4
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    yeah you might need a contact table with a companyid foriegn key.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

  5. #5
    Join Date
    Apr 2008
    Location
    Along the shores of Lake Michigan
    Posts
    242
    Quote Originally Posted by anthitis View Post
    Mate I just asked for a litle help not to solve the mystery diamond

    In addition to posting the DDL and some sample data, use a little patience. No response in an hour does not give you the right to become cheeky. Many of us have jobs of our own that require attention before we can lurk through the forums to see who or if we can help.

  6. #6
    Join Date
    Apr 2010
    Posts
    20

    Okey I will post a screen shot

    Okey all i want to do is to list of all orders that were sent out this month as well as all
    orders that were sent out in this month from exactly one year ago
    Attached Thumbnails Attached Thumbnails Image.bmp  

  7. #7
    Join Date
    Dec 2007
    Location
    Richmond, VA
    Posts
    1,328
    Provided Answers: 5
    try something like month of your date field = the month you want and the year of your date field in (this year and this year - 1 year) you can look up the syntax
    dave

  8. #8
    Join Date
    Apr 2010
    Posts
    20

    Thanks for your response

    Thanks everyone

    The following works great it just does what i want gets all orders
    filled on 2010 as well as 1 year ago some month


    SELECT * FROM Trancactions
    WHERE DateDiff(m, Date_Filled, '2010-03-01 00:00:00') IN (0, 12)

  9. #9
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    Quote Originally Posted by tosscrosby View Post
    No response in an hour does not give you the right to become cheeky.
    you may not be aware, tosscrosby, but that post was not a bump, it was in response to a completely ludicrous spam post just before it, which has since been removed

    unfortunately the moderator that removed the spam post failed to see the significance of leaving the reply in place

    so anthitis is actually innocent of any cheekiness
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  10. #10
    Join Date
    Apr 2010
    Location
    Texas
    Posts
    6
    Well you misspelled "Transactions" but I can't help you on the coding part, sorry.

  11. #11
    Join Date
    Aug 2009
    Posts
    262
    Quote Originally Posted by anthitis View Post
    Hello to every one
    I Have a customer and he asked me to Modify the customers
    table in the database , it's a litle bit tricky all he wants to do
    is The table customer to link to more than one contact details.
    he is actually the Supplier and supllies other companies with
    welding stuff, all he wants is to contact to those companies
    with more than one person , I am try to figure out how to go about this
    and my head stack.
    I tried To link to another seperate table called contacts and then add
    another table cont1 cont2 cont 3 but this way limits the contacts to 3
    How to go about this any one help please.


    i see
    tracection id ( of what)
    total price ( of what)
    profit made ( irs might be interested but doesnt make any sense to me)
    date filled ( filled ?? of what ... and WHAT)



    "all he wants is to contact to those companies
    with more than one person , "

    how do we determine that ?
    or you mean more then 1 beautiful receptionist? he is greedy


    "I tried To link to another seperate table called contacts and then add
    another table cont1 cont2 cont 3 but this way limits the contacts to 3"


    bro .. give us the other table and i think some of us will link it to each other ourselves ............

  12. #12
    Join Date
    Apr 2008
    Location
    Along the shores of Lake Michigan
    Posts
    242
    Quote Originally Posted by r937 View Post
    you may not be aware, tosscrosby, but that post was not a bump, it was in response to a completely ludicrous spam post just before it, which has since been removed

    unfortunately the moderator that removed the spam post failed to see the significance of leaving the reply in place

    so anthitis is actually innocent of any cheekiness
    I then sincerely apologize for jumping to conclusions!

Posting Permissions

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