Viewing 15 posts - 46 through 60 (of 85 total)
aren't you equating varchar to float in the dynamic query ?
Is data conversion the actual error ?
October 13, 2011 at 1:28 pm
Remove TGT. from Merge statement inside when matched.
Thanks
October 13, 2011 at 1:23 pm
2) place them into a temporary table and rank them using the code a fragment of which i posted,
3) insert into base table all the records with rank (rNum)=1
My only...
October 13, 2011 at 10:50 am
Velkry Was it helpful ?
October 13, 2011 at 3:16 am
CREATE PROCEDURE EXAMPLE (@parameter)
---- To illustrate how I intend to Use Execption Handling inside my Cursor
AS
BEGIN
BEGIN TRY
DECLARE @TABLENAME VARCHAR (10)
DECLARE DROPTABLE CURSOR
FOR SELECT NAME...
October 13, 2011 at 12:14 am
derekr 43208 (10/12/2011)
That should do itRemember though, this is predicated on the fact that you have no constraints on the tables you want to delete. Foreign Keys etc...
Exactly , in...
October 13, 2011 at 12:05 am
SQL_By_Chance (10/12/2011)
What do you mean "error on cursor"? An error that occurs within the loop? Nested transactions?Expand a bit and I'll try to help.
Yeah the dynamic sql that is generated...
October 12, 2011 at 1:58 pm
October 12, 2011 at 1:57 pm
I don't think this will help here since both rows need to be merged (to combine the IND the first one and OUTD of the second one)
I would merge each...
October 12, 2011 at 1:48 pm
Gianluca Sartori (9/23/2011)
You can use my stored procedure code template[/url] if you like it.It should do what you ask for.
Regards
Gianluca
Gina, Can you please post me a Template for handling...
October 12, 2011 at 1:34 pm
DECLARE @TABLENAME VARCHAR (10)
DECLARE DROPTABLE CURSOR
FOR SELECT NAME FROM INFORMATION_SCHEMA.TABLES -- OR SYSTABLES
WHERE NAME LIKE '%SHI%'
OPEN DROP TABLE
FETCH NEXT FROM DROPTABLE
INTO @TABLENAME
WHILE (@@FETCH_STATUS...
October 12, 2011 at 1:25 pm
Try using CTE with ROW_NUMBER() . Delete from CTE where rowNUM > 1
October 12, 2011 at 1:18 pm
am-244616 (10/11/2011)
I am trying to setup merge replication between two 600 table database, is there a generic script to reset the identity increment on one database to have even numbers...
October 12, 2011 at 11:02 am
Gianluca's solution would work just as well.
Thanks CheeseHead.Completely Agree. 🙂
October 12, 2011 at 11:00 am
Thanks Gianluca,
Does this mean : [tempdb.sp_executsql @sql ] would get executed in Temp DB ?
October 12, 2011 at 10:10 am
Viewing 15 posts - 46 through 60 (of 85 total)