![]() |
|
|
|||||||
| Petri.co.il is happy to award auglan the title of Most Valuable Member !!! |
| Register | Calendar |
Search |
Today's Posts |
Mark Forums Read |
| Notices |
|
|
Create View with a Case Statementthis thread has 1 replies and has been viewed 1685 times
|
![]() |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
||||||||
|
||||||||
|
I am trying to create a view that has a case statement.
Quote:
|
|
#2
|
||||||||||
|
||||||||||
|
What database software is this in please?
You appear to be missing the END keyword when the case has finished, i,e. immediately above the FROM line Also missing a close quote after RCQTY in the first line Here is an example of a working CASE Statement: Code:
SELECT Top 1000 TOa, CC, "TestCase" = CASE WHEN RFC822_size > 20000 THEN BACKUP_date ELSE PP4_MAILBACKUP_ID END FROM PP4_MAILBACKUP
__________________
Tom Jones MCT, MCSE (2000:Security & 2003), MCSA:Security & Messaging, MCDBA, MCDST, MCITP(EA, EMA, SA, EDA, ES, CS), MCTS, MCP, Sec+ PhD, MSc, FIAP, MIITT IT Trainer / Consultant Ossian Ltd Scotland ** Remember to give credit where credit is due and leave reputation points where appropriate ** Last edited by Ossian; 14th July 2012 at 10:01.. |
![]() |
| Thread Tools | Search this Thread |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| .bat If Then statement | jmituzas | DOS Command Shell | 3 | 19th September 2010 03:01 |
| If statement to run for more than 1 person | epanzeter | General Scripting | 2 | 7th August 2008 18:33 |
| Need help using Or in an If Statement | wullieb1 | General Scripting | 10 | 31st August 2007 23:22 |
| create a new log view in event viewer | tomer_wall | Misc | 1 | 30th May 2007 15:24 |
| Misbehaving If Then statement. | JamesNesbitt | General Scripting | 0 | 10th October 2005 07:29 |