it works with the query below but i will loose info if field over 8000 long
SELECT
[JobRecords].[JobID],
[JobRecords].[DateTimeCreated],
[ContractType].[ContractTypeName],
[CustomerContracts].[CompanyName],
[CustomerContracts].[UnitsRemaining],
[CoveredSites].[SiteName]...
the error i keep getting is
Server: Msg 306, Level 16, State 2, Line 1
The text, ntext, and image data types cannot be compared or sorted, except when using IS NULL or LIKE operator.
Not sure why it is throwing up error but a bit rusty on my sql
code is
SELECT
[JobRecords].[JobID]...
hi steve
that query returns the same results as b4 ..
the cust id is a variable that i have to pass in via an asp page so it will change, and the recordset must return only job records for a specific customer. the problem is that i need to see all the categories in the recordset .. what is...
SELECT ProblemCategory.ProblemCategory,
IIf(IsNull(Count(JobRecords.JobID)),0,Count(JobRecords.JobID) ) AS JobsInCat
FROM CustomerContracts INNER JOIN (CoveredSites INNER JOIN (ProblemCategory right JOIN JobRecords ON ProblemCategory.ProbCatID = JobRecords.ProbCatID) ON CoveredSites.SiteID...
I am getting this error when i run the following code
SELECT ProblemCategory.ProblemCategory, IIf(IsNull(Count(JobRecords.JobID),0, Count(JobRecords.JobID) )) AS JobsInCat
FROM CustomerContracts INNER JOIN (CoveredSites INNER JOIN (ProblemCategory right JOIN JobRecords ON...
Thanks blom
Thats got that working .. i split it into 2 querys
QRY:
SELECT format(JobRecords.DateTimeCreated, "yyyy/mm") AS Mnth, count(JobRecords.DateTimeCreated) AS Tot
FROM ProblemCategory INNER JOIN (CustomerContracts INNER JOIN (CoveredSites INNER JOIN JobRecords ON...
hi blom
the JobRecords.DateTimeCreated field is date and time so without having the month table full of every date and time in each year i dont think this would work .. thanks for your help though..
i posted a cut down version of the query the full one is here
SELECT...
I need to display the count of jobs logged by month but include zeros where no jobs have been logged in a mth
SELECT format(DateTimeCreated, "yyyy/mm") As Mnth , count(JobRecords.DateTimeCreated) AS Tot
FROM JobRecords
GROUP BY format(DateTimeCreated, "yyyy/mm");
this...
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.