Viewing 15 posts - 1 through 15 (of 21 total)
Thank you so much for the help Lowell 🙂
I am using that stored procedure in a cursor and the code is as following:
It gives an error saying " Could not...
July 13, 2011 at 2:49 pm
Procedure that is called inside the cursor is as following:
CREATE PROCEDURE [dbo].[sp_dependency3]
-- Add the parameters for the stored procedure here
@tableName nvarchar(50)
AS
BEGIN
-- SET NOCOUNT ON added to prevent extra...
July 13, 2011 at 2:20 pm
@bagofbirds-767347: Procedure is run only in the above script. and It is in my current T1DB. It does not matter whether its a temp table or not..it gives...
July 13, 2011 at 1:13 pm
@bagofbirds-767347: Procedure is run only in the above script. and It is in my current T1DB. It does not matter whether its a temp table or not..it gives...
July 13, 2011 at 1:13 pm
Lowell's solution worked. Thank you!
I am creating a table in a stored procedure I have written. But when I call it from the above query, it returns an error saying...
July 13, 2011 at 10:55 am
Thank you James.
But my cursor depends on different table suppose (main_table). and I want to find dependency of table read from main_table. And I am storing it into another table....
July 12, 2011 at 2:40 pm
I get the same error when run the following query:
FETCH name_cur INTO @dbName, @tableName
WHILE @@Fetch_Status = 0
BEGIN
SET @sql -....
insert into [dbo].[Table1] (obj_name, obj_type)
...
July 12, 2011 at 9:34 am
For me its giving the value of @tablename as %ticker%
July 8, 2011 at 2:36 pm
I did not understand this. Could you please explain?
and above did not work. error was "A severe error occurred on the current command."
July 8, 2011 at 1:52 pm
No. I want the delimiters before and after % like '%AOC_CompanyCode%'
July 8, 2011 at 1:38 pm
Still gives an error "Incorrect syntax near 'go'"
July 7, 2011 at 1:54 pm
It says " Incorrect syntax near the keyword 'USE'."
July 7, 2011 at 1:30 pm
@lowell: Thank you!! It worked 🙂
I am trying the same for sp_depends. Do you think following would work?
SET @sql = 'insert into [dbo].[Table_Dependency]([nam],[type]) EXECUTE USE '+@db_name+'...
July 7, 2011 at 12:59 pm
I have declared variables, just missed in the post. Table1 has two columns, Database name & Object name.
I tried putting insert statement in @sql variable. But that gives...
July 7, 2011 at 12:33 pm
Viewing 15 posts - 1 through 15 (of 21 total)