I have written a query that gets data from 2 related tables the query is as follows :
and the result is :
and so on
the thing is that want to replace the type to 3 when the foramt is 0
I made this do far :
the type is in dbo.documentpro perty table and the format is in document table
but what do I have to update ? table ? query ?
help will be great
Code:
SELECT dbo.[Document].Id, dbo.[Document].Name, dbo.[Document].Format, dbo.DocumentProperty.FileId, dbo.DocumentProperty.Type FROM dbo.[Document] INNER JOIN dbo.DocumentProperty ON dbo.[Document].Id = dbo.DocumentProperty.FileId WHERE (dbo.[Document].Format = 0 )
Code:
id| Name |Format|Type 1 |1-1-2010.pdf| 0 |4 2 |2-1-1990.pdf| 0 |4
the thing is that want to replace the type to 3 when the foramt is 0
I made this do far :
Code:
set Type = replace(Type, '4' , '3' ) WHERE Format = 0
but what do I have to update ? table ? query ?
help will be great
Comment