SELECT
EditTime
, AppID
, AppName
, MajorUpgradeCost
, PlannedUpgradeYear
, UpgradeStrategy
, SoftwareVersion
, OldestVersionSupportedBySupplier
, EmployeeName
FROM EDIT_ApplicationDescription
WHERE ((datalength(SoftwareVersion)!=0) and ((SoftwareVersion != '') or (SoftwareVersion IS NOT NULL) or (SoftwareVersion <> '')))
or
((datalength(MajorUpgradeCost)!=0) and ((MajorUpgradeCost != '') or (MajorUpgradeCost IS NOT NULL) or (MajorUpgradeCost <> '')))
or
((datalength(PlannedUpgradeYear)!=0) and ((PlannedUpgradeYear != '') or (PlannedUpgradeYear IS NOT NULL) or (PlannedUpgradeYear <> '')))
or
((datalength(UpgradeStrategy)!=0) and ((UpgradeStrategy != '') or (UpgradeStrategy IS NOT NULL) or (UpgradeStrategy <> '')))
or
((datalength(OldestVersionSupportedBySupplier)!=0) and ((OldestVersionSupportedBySupplier != '') or (OldestVersionSupportedBySupplier IS NOT NULL)
or (OldestVersionSupportedBySupplier <> '')))
group by AppID, EditTime, AppName
, MajorUpgradeCost
, PlannedUpgradeYear
, UpgradeStrategy
, SoftwareVersion
, OldestVersionSupportedBySupplier
, EmployeeName
order by EditTime desc
ASKER
ASKER
ASKER
Microsoft SQL Server 2005 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. It includes support for managing XML data and allows a database server to be exposed over web services using Tabular Data Stream (TDS) packets encapsulated within SOAP (protocol) requests.
TRUSTED BY
Just a thought, I don't see any aggregate functions like SUM(), MIN(), MAX(), COUNT(), etc., so why are we grouping in the first place?
If you only want to return unique rows, change SELECT to SELECT DISTINCT.
If there's something else you need, spell it out in this question, specifically 'I want to do {x} with {all columns other than {"EditTime" and "AppID"}'