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
>
>