I am trying to create an If Else Update Script. This is what I have put together so far:
IF (SELECT [FileType1]
FROM Document
WHERE ([FileType1] LIKE 'E-mail' OR [FileType1] LIKE 'outlook'))
UPDATE Document
SET [FilePath] = [Full Path]
ELSE ((SELECT [FileType1]
FROM Document
WHERE ([FileType1] NOT LIKE 'E-mail' OR [FileType1] NOT LIKE 'outlook'))
UPDATE Document
SET [Path] = [Full Path]
What I am I doing wrong? Basically, if E-mail or outlook is found in one statement, I want the filepath column to equal the full path column.
If non-E-mails are found, I want the path column equal to the full path column.
IF ELSEhere; what is preventing you to write conditions onUPDATE