mikeydk
asked on
SQL Query rename/update
Hey
I have this query (SQL)
Select PackageID, Name, Version, Manufacturer, Language, Description,
PkgSourcePath , LastRefreshTime,
(SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [No of DP]
FROM v_Package
WHERE
PackageID NOT IN (SELECT PackageID FROM v_Advertisement) AND
PackageID NOT IN (SELECT ReferencePackageID FROM v_TaskSequenceReferencesIn fo) AND
PackageType = 0 AND
ORDER BY Name
....
How to I make the query rename all "Name" in the result to "OLD_Name"? (add "OLD_" to the record).
Thanks in advance.
Mike
I have this query (SQL)
Select PackageID, Name, Version, Manufacturer, Language, Description,
PkgSourcePath , LastRefreshTime,
(SELECT COUNT(PkgID) FROM vPkgStatusSummaryDistPts WHERE PkgID = v_Package.PackageID) AS [No of DP]
FROM v_Package
WHERE
PackageID NOT IN (SELECT PackageID FROM v_Advertisement) AND
PackageID NOT IN (SELECT ReferencePackageID FROM v_TaskSequenceReferencesIn
PackageType = 0 AND
ORDER BY Name
....
How to I make the query rename all "Name" in the result to "OLD_Name"? (add "OLD_" to the record).
Thanks in advance.
Mike
ASKER CERTIFIED SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
SOLUTION
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
Select
PackageID
, Name AS OLD_Name
, Version, Manufacturer, Language, Description,
PkgSourcePath , LastRefreshTime, ...