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,543 of 19,505   
   Bob Barrows to Apsteinberg   
   Re: is there a way to put a table into a   
   21 Dec 11 14:08:33   
   
   fb7f0081   
   From: reb01501@NOyahooSPAM.com   
      
   Apsteinberg wrote:   
   > Hi,   
   >   
   > I am new to sql, been working in SAS for many years and my mind still   
   > is in the SAS thinking.  I have a table with NDC codes called   
   > interested_ndccodes and it looks like this (way to many values to   
   > code)   
   >   
   > ndc ndc_coding   
   > 123 ndc like '123%'   
   > 456 or ndc like '456%'   
   > 789 or ndc like '789%'   
   >   
   > Now I want to look for those ndc values in another table.  So if it   
   > was an ideal world the statement would be something simple like this,   
   > but its not:   
   > select * from pharm where(select * from interested_ndccodes)   
   >   
   > I know how I would handle it in SAS, but am coming up blank with   
   > google searches.   
   > Thanks for the help...I know I need to learn the basics which would   
   > give me the tools to know how to do this.   
      
   select * from pharm where fieldname in (select fieldname from   
   interested_ndccodes)   
      
   --- 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