|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
Query runs but won't save as View
The following query will run just fine:
SELECT name, COUNT(name) AS unindexes, MIN( case when var6 <> '' then 7 when var5 <> '' then 6 when var4 <> '' then 5 when var3 <> '' then 4 when var2 <> '' then 3 when var1 <> '' then 2 else 1 end) AS nfields FROM syitabs WHERE dupef = 0 GROUP BY name But when I try to save it as a view, I get the error: "View definition includes no output columns or includes no items in the FROM clause." But I do have output columns, and the table 'syitabs' in the from clause is correct. Like I say, I can run the query and get back results!I know I have saved a view before with a case statement, so I don't think that is it. Anyone have any ideas? |
![]() |
| Viewing: Dev Shed Forums > Databases > MS SQL Development > Query runs but won't save as View |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|