User Profile

Collapse

Profile Sidebar

Collapse
gdrop
gdrop
Last Activity: Aug 14 '14, 10:39 AM
Joined: Aug 8 '14
Location: Belgium
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • gdrop
    replied to SQL: join and exists are combined
    The latest SQL that I posted, was the SQL adapted to your suggestion. That's the last version that I tested with. I'm not sure what VBA code you are referring to. The SQL is just a String that I wrote myself for my Java program (Eclipse IDE), the language is Dutch, in case you're wondering :-). I've only just graduated as a bachelor in software development, and sometimes I still seem to struggle with writing SQL statements...
    See more | Go to post

    Leave a comment:


  • gdrop
    replied to SQL: join and exists are combined
    Code:
    "SELECT Post.PostNaam, SUM(PostBoeking.Bedrag) " +
    			"FROM " +
    				"(PostBoeking " + 
    				"INNER JOIN LeverancierBoeking " +
    				"ON PostBoeking.LeverancierBoeking_id = LeverancierBoeking.ID) " +
    			"INNER JOIN Post " +
    				" ON PostBoeking.Post_id = Post.ID " +
    			"WHERE LeverancierBoeking.Actief = 1  " +
    			"AND
    ...
    See more | Go to post

    Leave a comment:


  • gdrop
    replied to SQL: join and exists are combined
    Hello NeoPa,
    Your reply is very helpful to improve my insight in normalisation. Unfortunately the outcome of the query fails to the same error... (Note that I need to group by [ItemsName], not by [User], [ItemsName].)
    See more | Go to post

    Leave a comment:


  • gdrop
    replied to SQL: join and exists are combined
    Actually my real query mentions "PostNaam" instead of "Name". For reasons of simplicity and translation I changed the orginal query a bit. Apologies for the misunderstandin g. I updated my question accordingly.
    See more | Go to post

    Leave a comment:


  • gdrop
    started a topic SQL: join and exists are combined

    SQL: join and exists are combined

    I've got 3 tables. The irrelevant columns are omitted.
    Table1:Items
    ID ItemsName
    1 Food
    2 Beverage
    Table2:Invoice
    ID User Amount
    1 1 20
    2 1 30
    Table3:Invoice_ details
    ID Invoice_id Items_id DetailsAmount
    1 1 1 10
    2 1 2 10
    3 2 ...
    See more | Go to post
No activity results to display
Show More
Working...