Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.databases.ms-sqlserver > #877

is there a way to put a table into a parameter

From Apsteinberg <apsteinberg@hotmail.com>
Newsgroups comp.databases.ms-sqlserver
Subject is there a way to put a table into a parameter
Date 2011-12-21 10:47 -0800
Organization http://groups.google.com
Message-ID <7aa6e91d-24ac-4416-8d12-36cfcf89f8bb@i6g2000vbe.googlegroups.com> (permalink)

Show all headers | View raw


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.

Back to comp.databases.ms-sqlserver | Previous | NextNext in thread | Find similar


Thread

is there a way to put a table into a parameter Apsteinberg <apsteinberg@hotmail.com> - 2011-12-21 10:47 -0800
  Re: is there a way to put a table into a parameter "Bob Barrows" <reb01501@NOyahooSPAM.com> - 2011-12-21 14:08 -0500
    Re: is there a way to put a table into a parameter Erland Sommarskog <esquel@sommarskog.se> - 2011-12-21 23:34 +0100

csiph-web