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 SkipVought 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. geopat

    MODIFYING TABLE PROBLEM

    It is kind of strange that you want a field as "Blank". However, you may try: Update T Set Name = '' From TableName T Join (Select Name, minNumber = Min(Number) from TableName Group By Name) as T1 on T.Name = T1.Name Where T.Number > T1.minNumber
  2. geopat

    Generating SQL string - Please help!!

    I found one problem in your sql statement. You should use WHERE instead of HAVING. strSQL = "SELECT Contact_Table.RESPCODE FROM Contact_Table WHERE (((Contact_Table.RESPCODE) Like '" & criteria & "' GROUP BY Contact_Table.RESPCODE ));"
  3. geopat

    Select ... where ... Not in for 2 values

    You may use LEFT JOIN. Select Customer, Seminar from .... (long from clause involving 4 tables) LEFT JOIN (Select Customer, Seminar from ..... (lots of joins, 4 tables, brings back the ones I want to exclude) AS RESULT1 ON TABLEA.CUSTOMER = RESULT1.CUSTOMER AND TABLEA.SEMINAR =...
  4. geopat

    Magic Select Statement....

    No, not in Access. However, if you just need DeptNo, then you can use UNION Select DeptNo from TableA Union Select DeptNo from TableB
  5. geopat

    Need help ASAP-update query with sum

    You should use HAVING instead of WHERE, if you want to use aggregrate values as a condition. Also, HAVING has to be put after GROUP BY. UPDATE VarFields SET VarFields.PlanYear = 2002 WHERE (((VarFields.InitiativeNo) In (select [VarFields].[InitiativeNo] FROM VarFields GROUP BY...
  6. geopat

    How to Update using an Aggregate statement??

    update TabAAA set A.col_777 = (Select sum(B.Salary) from TabBBB B where (A.col_1 = B.col_1) and (A.col_2 = B.col_2))

Part and Inventory Search

Back
Top