Viewing 15 posts - 1 through 15 (of 27 total)
remove one of schemas, use dbo or sys.
Tehran.Sys.[function_name]
Or
Tehran.dbo.[function_name]
May 29, 2012 at 7:10 am
October 22, 2010 at 8:20 am
Try below updated query;
I Just added a set option (FMTONLY) before procedure execution
[Code="sql"]
select A.*
FROM
OPENROWSET ('SQLNCLI10','server=ABCD;trusted_connection=yes',
'SET FMTONLY OFF EXEC [SP_SQL_Database_Details_STASQL1_ToReport]')as A
[/code]
October 22, 2010 at 7:49 am
another way:
EXEC SP_EXECUTESQL @d
October 21, 2010 at 7:51 am
I tested it on my end, it worked fine. now share your output with me by executing below code.
Declare @Query varchar(Max)
SELECT @Query = ISNULL(@Query,'') +
'UPDATE a
SET club_status...
October 21, 2010 at 7:34 am
can you share its output? i just added a where clause in dynamic sql.
Declare @Query varchar(Max)
SELECT @Query = ISNULL(@Query,'') +
'UPDATE a
SET club_status = (Select * from Openquery(LNK_NETFORUM_DEV,
''select...
October 21, 2010 at 3:01 am
you can Try Table Valued Functions as:
CREATE FUNCTION dbo.fn_table(@Siteid int,@ProductID int)
Returns @tempTable Table (SiteID] [int] ,
[ProductID] [int] ,
[ProductDesc] [varchar](50) ,
[isDefault] [bit])
AS
IF exists (Select 1 From TestTable Where SiteID=@SiteID...
October 20, 2010 at 2:14 pm
try below code:
select t2.id,t1.meat
from table2 t2
cross join table1 t1
Where (case when t1.meat like '%'+t2.type+'%' then 1 else 0 end) = 1
order by t1.meat
October 20, 2010 at 1:41 pm
You are right, you can not access a function directly through link server. like
Select [LinkServer].[database].[schema].[function] ()
but you can access function by pass-through queries. as given below:
Select OpenQuery([LinkServer],'Select...
October 20, 2010 at 1:17 pm
Try this code, and let me know the output.
Declare @Query varchar(Max)
SELECT @Query = ISNULL(@Query,'') +
'UPDATE a
SET club_status = (Select * from Openquery(LNK_NETFORUM_DEV,
''select netFORUMDB_INCMDEV.dbo.client_ri_org_status_by_date(' + convert(varchar,club_cst_key) + ',ISNULL('''...
October 20, 2010 at 1:03 pm
You dont need to write a function to split string values into rows, there is a row constructor available in SQL Server 2008.
Please see below link for a sample:
http://mssqlsolutions.blogspot.com/2010/10/enhanced-values-clause-sql-server-2008.html...
October 20, 2010 at 12:40 pm
by keeping in view table structure and max. utilization, you would need to have more space to insert these new rows in the existing table, because by using table structure...
April 23, 2009 at 2:37 pm
CH&HU,
I just mentioned only one statement to correct, you have to see other statements as well that are using the same logic to build object name.
Thanks
March 13, 2009 at 9:31 am
check your below statement in proc, i think you have to eliminate your square brackets or use them as i provided updated statement,
SELECT @execstr = 'USE ' + @DatabaseName...
March 12, 2009 at 8:42 am
Viewing 15 posts - 1 through 15 (of 27 total)