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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Recent content by gregz0012

  1. gregz0012

    COUNT Complex SELECT

    dhookom:I'm not sure what you mean by that but any help on this would be appreciated.
  2. gregz0012

    COUNT Complex SELECT

    That query works to some degree but only displays 1 or 0 not the total sum of (StatusID = 6) etc. I don't think I can use the crosstab query wizard, I need this query to go into a program using ADO components.
  3. gregz0012

    COUNT Complex SELECT

    Hello, I am trying to get the results similar to the below with this... UserID | Exp1 | Exp2 | Exp3 | Exp4 ----------------------------------- 123 | 1 | 9 | 7 | 3 321 | 6 | 2 | 0 | 2 With the following: SELECT (SELECT COUNT(StatusID) FROM Callbacks WHERE StatusID =...
  4. gregz0012

    UPDATE with multiple JOINS

    DLookUp works great within Access however not by using ODBC Microsoft Access Driver / Jet. Any way around this issue or will I need to perform the select queries first and then put them into the update query?
  5. gregz0012

    UPDATE with multiple JOINS

    That looks much simpler ;) I get this however "Operation must use an updateable query." Though I think that is related to my database, yes?
  6. gregz0012

    UPDATE with multiple JOINS

    I have no idea how to do this so maybe some kind sole could help me out. I have been reading documentation and trying to get this to work for hours now :( Here's what I have. UPDATE Users SET Users.FirstName = 'Joe', Users.LastName = 'Bloggs', Users.Manager = Managers.Manager...
  7. gregz0012

    INSERT... SELECT...

    Fantastic. :) I don't understand how I and so many others didn't spot that one.
  8. gregz0012

    INSERT... SELECT...

    It asks me to enter data for Managers.FirstName and Managers.LastName (from the WHERE statement) however when valid and existing data for these columns is input the data is still not added to the users table.
  9. gregz0012

    INSERT... SELECT...

    If that line of programming was at fault I woul still not get 'Too few parameters. Expected 6' I would get the error before my program tried to execute the query 'parameter cannot be found'. I used a third party SQL debugger called SQLC to figure out the root of the problem so people might be...
  10. gregz0012

    INSERT... SELECT...

    ParamByName('manager').DataType := ftString;" Was a type when typing the code out to go in the post. This is not in the code for the program.
  11. gregz0012

    INSERT... SELECT...

    To simplify my problem: My database: ------------------ Users Table ------------------ Users.Personnel | Long Integer Users.FirstName | String Users.LastName | String Users.Manager | Long Integer Users.Location | Byte Users.Department | Byte...
  12. gregz0012

    INSERT... SELECT...

    May I reiterate, I am using the SQL query functionality within MS Access first to make sure all my SQL queries work before I use them in my program. Take my programming and Delphi completely out of the picture. The SQL query posted in my first post is what I am using. And it doesn't work. I...
  13. gregz0012

    INSERT... SELECT...

    No, the code as I said is not the problem. Using the ADOQuery component in Delphi allows parameters to be passed into an SQL query string symbolised by ':paramname'. The allows variables to be passed exactly as they are into the string ;) The code is perfect. The SQL query is the problem.
  14. gregz0012

    INSERT... SELECT...

    Here's the code anyway. It's written in Delphi and being run off the database using Jet. Might not make much sense if you don't speak Delphi. with TADOQuery.Create(Application) do begin ConnectionString := ConStr; DisableControls; Close; SQL.Clear; begin SQL.Text := 'INSERT...
  15. gregz0012

    INSERT... SELECT...

    Yes this is a coded SQL statement represented as pure SQL, however I am running all SQL code through MS Access first to ensure that the SQL syntax etc is correct. I can post the code but it would not really be relevant at this stage becase basically it's not the code messing things up.

Part and Inventory Search

Back
Top