Help with query

Jak82

Registered User.
Local time
Yesterday, 20:15
Joined
Jun 6, 2007
Messages
19
Hi All,

I have a query which checks a linked table for any records older than a year that havnt had a service.

I presume in the criteria field for org name I would put Not [dbo_flowitems].[name].["serviced"]

Is this correct? Also the line above does not work :banghead:

What would the correct syntax be?

Thanks

Jak
 
I presume in the criteria field for org name I would put Not [dbo_flowitems].[name].["serviced"]
Why would you assume that?
What have you tried to resolve this issue?


Have you tried Google?
Have you tried the search button at the top of the page?

How about posting the entire query?
 
Why would you assume that?

Its just what I think I have figured out, had a look at google, but admit I am a sales man not a database programmer.


What have you tried to resolve this issue?
When I enter the above criteria it says invalid

Have you tried Google?
I had a look at http://fontstuff.com/access/acctut06.htm which mentions to use NOT

Have you tried the search button at the top of the page?
Yes

How about posting the entire query?
SELECT dbo_flowitems.name, dbo_orgs.orgtype, dbo_orgs.orgname, dbo_people.firstname, dbo_people.lastname, dbo_people.role, dbo_people.email, [Year Reminder].[Emailed?], dbo_flows.flowdate, dbo_flows.flowtype
FROM [Year Reminder], (((dbo_orgs INNER JOIN dbo_calibrations ON dbo_orgs.id = dbo_calibrations.id) INNER JOIN dbo_people ON dbo_calibrations.id = dbo_people.id) INNER JOIN dbo_flows ON dbo_orgs.id = dbo_flows.orgid) INNER JOIN dbo_flowitems ON dbo_flows.id = dbo_flowitems.flowid
WHERE (((dbo_flows.flowtype)="Accounts Invoice") AND ((CDate(Format([flowdate],"dd/mm/yyyy")))<Date()-365));


Thanks
 
Anyone?

The error message I get is

ODBC call failed
[sqlserver] The datatypes text and varchar are incompatible in the equal to operator
 
What is "serviced"? Are you trying to put that as a text criteria or is that supposed to be the name of a field in your SQL Server database?
 

Users who are viewing this thread

Back
Top Bottom