Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

MS SQL Error

Participant ,
May 07, 2012 May 07, 2012

I am getting a mssql error,  below is the sql statement:

SELECT Products.Brief, (param 1) AS Cat, Max(IIf([Ext5] = 1 and [CFM] Not Like '%HD%',[Image],'00000')) AS FirstOfImage,

Count(Products.Seq) AS Qty

FROM Products WHERE ( ((Price)>0) AND ((Products.Cfm) Like '%Bath%') )

GROUP BY Products.Brief ORDER BY Products.Brief, Min(Products.Title)

The error is am getting:

Error Occurred While Processing Request

Error Executing Database Query.

[Macromedia][SQLServer JDBC Driver][SQLServer]Incorrect syntax near '='.

Any help with my query would be great.

Anthony

544
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Community Expert , May 07, 2012 May 07, 2012

Wouldn't it be an idea to start with something like this?

SELECT Brief, (param 1) AS Cat, MAX(image) AS FirstOfImage, COUNT(Seq) AS Qty

FROM Products

WHERE Price > 0 AND Cfm Like '%Bath%' AND Ext5 = 1

GROUP BY Brief

ORDER BY Brief, Min(Title)

Translate
Community Expert ,
May 07, 2012 May 07, 2012
LATEST

Wouldn't it be an idea to start with something like this?

SELECT Brief, (param 1) AS Cat, MAX(image) AS FirstOfImage, COUNT(Seq) AS Qty

FROM Products

WHERE Price > 0 AND Cfm Like '%Bath%' AND Ext5 = 1

GROUP BY Brief

ORDER BY Brief, Min(Title)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources