Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. chipboard

    Parameters in Subqueries - Visual C# 2008 EE

    Hi Jason, thanks for the suggestion - I tried that but it didn't give any different results. Anyway, I've found a different way to structure the query using GROUP BY clauses. It's giving the right results but just doesn't seem as elegant as a sub-query! Thanks for your help,
  2. chipboard

    Parameters in Subqueries - Visual C# 2008 EE

    Thanks for the reply Jason - code is as follows: SELECT Table1.Field1, Table1.Field2, Table2Derived.Field3 FROM (SELECT Table2.Field1, SUM(Table2.Field4) AS Field3 FROM Table2 WHERE Table2.Field6 IN (?,?,?,?) GROUP BY Table2.Field1) Table2Derived INNER JOIN Table1 ON...
  3. chipboard

    Parameters in Subqueries - Visual C# 2008 EE

    Hi all, I am writing a SQL query in the TableAdapter Query Configuration Wizard and it includes a Subquery. I have some parameters in my main query, and would like to have a parameter in the Subquery also. My query works up until the point where I add a parameter to the Subquery, when it stops...
  4. chipboard

    SQL: Joining different look-up IDs in a record to the same secondary t

    Hi drlex, it worked fine and I'm getting the results I need. I didn't really know about aliases before so I can see now that they are pretty useful! Thanks for your help,
  5. chipboard

    SQL: Joining different look-up IDs in a record to the same secondary t

    It does - thanks, I'll try it and let you know how I get on.
  6. chipboard

    SQL: Joining different look-up IDs in a record to the same secondary t

    Hi Drlex, thanks for your response. I think I understand what you are getting at but here are some examples to make sure we are on the same page: So for example my Second table could have the following data: SecondTableId SecondTableText 1 Days 2 Years 3...
  7. chipboard

    SQL: Joining different look-up IDs in a record to the same secondary t

    Hi all, So I'm familiar with the technique of using SQL to return the text values in an external table which are linked to my main table using Lookup fields as follows: SELECT MainTable.RecordId, SecondTable.RecordName FROM MainTable INNER JOIN SecondTable ON MainTable.SecondTableId =...
  8. chipboard

    Combining SQL SELECT statements

    Thanks Lespaul, I had seen the page you linked before but I couldn't see a close enough example to what I was trying to do to figure it out. With the way you wrote my code I have tried that and it is working fine so thanks for that. I was trying to make it more complicated than it is and I can...
  9. chipboard

    Combining SQL SELECT statements

    In case it helps, I am writing this query in Microsoft Query for the purposes of pulling data from MS Access into MS Excel...
  10. chipboard

    Combining SQL SELECT statements

    Hi all - first post and I hope I have the right section of the forum... I have 3 seperate SELECT statements that I would like to combine into one. I have four Tables called "Client", "Letters", "Agreement" and "Rate", which are linked in that order via ID values. Rate also links to a number of...

Part and Inventory Search

Back
Top