The code below give an error of - Msg 170, Level 15, State 1, Line 5
-
Line 5: Incorrect syntax near '='.
-
Msg 170, Level 15, State 1, Line 8
-
Line 8: Incorrect syntax near '='.
I Am not sure why. Plz advize. Thank you in advance. - SELECT xxx.reviews.id, xxx.reviews.techCompany, xxx.reviews.jobSummary, xxx.reviews.inspectionDate, xxx.callTypeReview.reviewId, xxx.callTypeReview.callType,
-
xxx.findingsComments.reviewId, xxx.findingsComments.meetsSpec,xxx.findingsComments.findingType,
-
(SELECT COUNT(DISTINCT xxx.reviews.id) AS DP FROM xxx.reviews AS Expr1 WHERE
-
EXISTS(SELECT COUNT(reviewId) AS ReviewCnt1
-
FROM xxx.callTypeReview AS Expr2 WHERE Expr2.callType = 'Digital Phone' AND Expr2.callType IN ("HSD Install/Upgrade", "Commercial HSD", "Commercial Video", "Install: Video", "restart/reconnect: Video")) AND Expr1.jobSummary = 'Pass')= 2),
-
(SELECT COUNT(DISTINCT xxx.reviews.id) AS DP FROM xxx.reviews AS Expr2 WHERE
-
EXISTS(SELECT COUNT(reviewId) AS ReviewCnt2
-
FROM xxx.callTypeReview AS Expr3 WHERE Expr3.callType = 'Digital Phone' AND Expr3.callType IN ("HSD Install/Upgrade", "Commercial HSD", "Commercial Video", "Install: Video", "restart/reconnect: Video")) AND Expr2.jobSummary = 'Pass')= 3)
-
FROM xxx.callTypeReview INNER JOIN
-
xxx.findingsComments ON xxx.callTypeReview.reviewId = xxx.findingsComments.reviewId INNER JOIN
-
xxx.reviews ON xxx.findingsComments.reviewId = xxx.reviews.id
-
WHERE (DATEDIFF(d, xxx.reviews.inspectionDate, GETDATE()) BETWEEN 0 AND 5) AND (DATEDIFF(m, xxx.reviews.inspectionDate, GETDATE()) = 0) AND
-
(DATEDIFF(y, xxx.reviews.inspectionDate, GETDATE()) = 0) AND (DATEPART(dw, xxx.reviews.inspectionDate) BETWEEN 2 AND 6) AND
-
(xxx.reviews.techCompany LIKE '"%"@region')
-
GROUP BY xxx.reviews.techCompany, dbo.reviews.id
-
ORDER BY xxx.reviews.inspectionDate DESC
0 2645 Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Forgone Conclusion |
last post by:
Hi,
I have a View that groups and sums up totals.
This View is then nested within in another View and used (it needs to
be done like this). What i need to do is to be able to vary the
records...
|
by: WGW |
last post by:
Though I am a novice to MS SQL server (2000 I believe), I can do almost!
everything I need. Maybe not efficiently, but usefully. However, I have
a problem -- a complex query problem...
I can...
|
by: Jeff Lanfield |
last post by:
First of all, I apologize if coalescing is not the right term to
describe my problem. I have a tree where each node has the same set of
attributes (is the same entity) but child nodes should...
|
by: Matt |
last post by:
I am working in a project where the business model is complex enough
that many common retrieval functions become difficult to develop and
maintain in single query statements or functions.
I have...
|
by: jbm05 |
last post by:
Hi,
I'm curious about the computational complexity of a query I have. The
query contains multiple nested self left joins, starting with a simple
select, then doing a self left join with the...
| |
by: ahokdac-sql |
last post by:
Hi,
I'm adapting access queries to sql server and I have difficulties with
the following pattern :
query1 : SELECT * FROM Query2 WHERE A=@param1
query 2: SELECT * FROM Table2 WHERE B=@param2
...
|
by: Anthony Robinson |
last post by:
Have been encountering an odd issue. Every now and again, certain
packages of stored procedures just become invalid. I'm aware that
dropping or altering an underlying table would render a package...
|
by: Tcs |
last post by:
My backend is DB2 on our AS/400. While I do HAVE DB2 PE for my PC, I haven't
loaded it yet. I'm still using MS Access. And no, I don't believe this is an
Access question. (But who knows? I...
|
by: Frank Swarbrick |
last post by:
I was just messing around trying to learn things and attempted the
following:
select brch_nbr
, sum(case when post_flag != 'P' then amount else 0 end) as sum_amount
from film.film_transactions...
|
by: nanoman |
last post by:
Hello,
I've got a Nested Set structure in MySQL 4 here with
- id
- lft
- rgt
- parent_id
- root_id
I wrote some test scripts and i discovered that the Nested Set (the
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: 6302768590 |
last post by:
Hai team
i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |