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.
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 =...
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?
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...
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.
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...
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...
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.
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...
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.
The following Access SQL query returns the following error, and I cannot see why:
INSERT INTO
Users (Personnel, FirstName, LastName, Manager)
SELECT
666, 'joe', 'bloggs', Managers.Manager
FROM
Managers
WHERE
Manager.FirstName + ' ' + Manager.LastName = 'James Brown'
The query...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.