WHERE with CASE colums?

2003-12-04 Thread Scott Turnbull
I have a table called 'Journal_Info' containing titles of various journals When searching and listing them I want to remove any preceeding 'The ', 'An ', or 'A ' that occurs in the title and I also want to be able to search it. The case statement as follows seems to work fine: SELECT CASE

Re: WHERE with CASE colums?

2003-12-04 Thread Martijn Tonies
Hi Scott, === When searching and listing them I want to remove any preceeding 'The ', 'An ', or 'A ' that occurs in the title and I also want to be able to search it. The case statement as follows seems to work fine: SELECT CASE WHEN title LIKE 'The %' THEN RIGHT( title, length( title ) -4 )

Re: WHERE with CASE colums?

2003-12-04 Thread Yves Goergen
On Thursday, December 04, 2003 6:22 PM CET, Martijn Tonies wrote: Cause the WHERE clause only works on columns. If you want to do a match on the result of the CASE, you have to do your case thingy again: WHERE ( case ...yourstuff... end ) = 'something' Wouldn't HAVING help here? -- Yves