home bbs files messages ]

Forums before death by AOL, social media and spammers... "We can't have nice things"

   comp.databases.ms-sqlserver      Notorious Rube Goldberg contraption      19,505 messages   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]

   Message 18,071 of 19,505   
   Bob Barrows to emanning   
   Re: Return results from view with an ext   
   14 Jan 11 10:59:42   
   
   f4c7901b   
   From: reb01501@NOyahooSPAM.com   
      
   emanning wrote:   
   > I have a view that returns rows from a table and would like to add an   
   > extra row to the result set, but don't want to add that row in the   
   > table.  How do I do this?   
   >   
   > My view returns:   
   >   
   >      Mickey   
   >      Minnie   
   >      Donald   
   >   
   > I'd like the view to return but don't want "NA" added to the table:   
   >   
   >      Mickey   
   >      Minnie   
   >      Donald   
   >      NA   
   >   
   It's called a "union" query:   
      
   select disneycharactername from disneycharacters   
   union all   
   select top 1 'NA' from disneycharacters   
      
   This has to be entered in SQL View.   
      
   --- SoupGate-Win32 v1.05   
    * Origin: you cannot sedate... all the things you hate (1:229/2)   

[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]


(c) 1994,  bbs@darkrealms.ca