Wrox Home  
Search P2P Archive for: Go

  Return to Index  

sql_language thread: Query with sp


Message #1 by Aruna Koya <aruna.koya@d...> on Tue, 17 Apr 2001 10:25:31 +0100
Hi Aruna,

You need to assign require value in one string then
you need to call following system sp to get the result
value
Try this one. 
*-----------*
declare @sqlstring varchar(8000)
set @sqlstring='....'

EXECUTE sp_executesql @sqlString

*---------*
Good Luck

Urvish Panchal
SQL SERVER DBA
CA,USA

--- Aruna Koya <aruna.koya@d...> wrote:
> Hello,
> 
> I am trying to select all the tables in the database
> beginning with OC 
> and fields with company or company name
> That's the basic string I need to use - how do I
> amend the query to 
> look for fields called company AND company name?
> 
> 
> StrSQL="sp_columns @table_name='OC%',
> @COLUMN_NAME='company'"
> 
> Thanks in advance
> 
> Aruna
> 
> 

  Return to Index