Posted by Helmut Woess on 10/02/32 11:45
Am 19 Apr 2006 07:07:47 -0700 schrieb Igor:
> BEGIN
> IF @OPTION = 1
> SELECT id FROM projects WHERE title LIKE @KEYWORD OR description LIKE
> @KEYWORD
> ELSE
> SELECT id FROM projects WHERE title LIKE @KEYWORD
> END
can be done this way:
SELECT id FROM projects WHERE title LIKE @KEYWORD OR
(@OPTION = 1 AND description LIKE @KEYWORD)
bye, Helmut
Navigation:
[Reply to this message]
|