Quantcast
Channel: SQLServerCentral » Reporting Services » Reporting Services » Latest topics
Viewing all articles
Browse latest Browse all 2791

Set value from one to column to another where

$
0
0
Within the same table I need to take the ApplicationNumber value where the Type value = 54 and place it into the ProjectNumber value where the Type value = 72.Here's what I came up with but it's copying ApplicationNumber value from Type 72 to ProjectNumber value from Type 72.[code="SELECT ApplicationNumber FROM dbo.tblDataPermit WHERE Type = '54' UPDATE dbo.tblDataPermit SET ProjectNumber = ApplicationNumber WHERE Type = '72' AND RefNo = RefNo AND ApplicationType = 'Fire Inspection"] [/code]

Viewing all articles
Browse latest Browse all 2791

Trending Articles