Viewing 12 posts - 1 through 12 (of 12 total)
Please run this query:
Declare @Results Table
(
DBName nvarchar(256),
LinkedServer nvarchar(256),
SPName nvarchar(256)
)
declare @DBName nvarchar(256)
declare @LinkedServer nvarchar(256)
Declare @Qry nvarchar(1024)
DECLARE LServerCursor CURSOR FOR
SELECT Name
FROM sys.servers
WHERE server_id > 0
OPEN LserverCursor
FETCH NEXT FROM LServerCursor INTO @LinkedServer
WHILE...
June 11, 2008 at 3:46 pm
To be on the safer side the first approach will be a better option.
June 10, 2008 at 12:48 pm
If you change the SQLTYPE to varchar the query will run but it will not give you the desired results.
It will return
(/PurchaseOrder/MemberNo)[1]
Therefore when you change the datatype to int...
June 10, 2008 at 11:20 am
It seems that your are calling the SP in a loop for mulitple inserts.
Calling SP again and again has its cost.
Try calling the insert SP once even for mutiple inserts....
June 10, 2008 at 10:26 am
There is no noticable difference between these two queries.
If you look at the execution plan you will notice that both techniques have the same cost.
It doesn't matter if you...
June 10, 2008 at 10:15 am
Please follow these steps:
-Right click on Flat file connection manager and select properties
-From the property window expand Expressions
-Select connectionstring in property list box and expand expression
-In the expression editor drag...
June 9, 2008 at 5:42 pm
I guess you are using a conventional DB connection string in your CLR function. If yes replace it with
SqlConnection connection = new SqlConnection("context connection=true")
This will use the connection of the...
June 9, 2008 at 5:23 pm
I presume that the date in DB is in string format.
Please refer to the following code:
Declare @FromDate Varchar(10)
Declare @ToDate Varchar(10)
Set @FromDate = '1/5/2008'
Set @ToDate = '31/7/2008'
Create table #TT
(
ID Int,
Date Varchar(20)
)
Insert...
June 9, 2008 at 10:25 am
Please change
Delete From #Temp Where Lower(IsNull(FileName, '')) Not Like '%.bat'
to
Delete From #Temp Where Lower(IsNull(FileName, '')) Not Like '%.sql'
and
Set @Cmd = '"' + @FilePath + '"'
to
Set @Cmd = 'osql -S....
June 9, 2008 at 8:52 am
Just copy the script in SQL task and change the folder name to point to your DIR
Declare @Folder Varchar(255)
Declare @Cmd Varchar(1000)
Declare @FilePath Varchar(1000)
Declare @Ret Int
If Object_ID('TempDB..#Temp') Is Not Null
Begin
Drop Table...
June 8, 2008 at 6:46 am
The insert into table has only three columns specified.
Your select however has four columns selected
June 8, 2008 at 6:02 am
Viewing 12 posts - 1 through 12 (of 12 total)