Viewing 15 posts - 11,626 through 11,640 (of 15,381 total)
You can't use a variable like that. You should look at the link in my signature for splitting a string.
--EDIT--
Hint -- your query would end up something like this.
select *...
June 18, 2012 at 10:48 am
To prove my point I altered my proc with yours above. Then to test the nested transactions is quite simple.
begin transaction
exec proc1
commit transaction
It doesn't work.
June 18, 2012 at 9:50 am
If you want some real help, again read the first article in my signature and post ddl, sample data and desired output.
June 18, 2012 at 9:45 am
thadeushuck (6/18/2012)
create table ProcTable1(
ProcID int identity,
ProcVal varchar(10)
)
go
...snip...
exec Proc1
select * from ProcTable1
You really should read the article I posted above. Nested transactions are lie, myth, whatever you want to call it....
June 18, 2012 at 9:41 am
If you can explain what you are trying to do we can probably help. Depending on your usage you might be able to use user defined types.
June 18, 2012 at 9:30 am
In reality nested transactions are a myth. http://sqlskills.com/BLOGS/PAUL/post/A-SQL-Server-DBA-myth-a-day-%282630%29-nested-transactions-are-real.aspx
June 18, 2012 at 9:20 am
You will have to modify your existing procs a little to handle this. Below is how you could modify my previous example to make this work. This will still execute...
June 18, 2012 at 9:18 am
Not sure I totally understand your question. Are you talking passwords stored in the database that are used for an application or the passwords used for sql logins?
SQL logins...
June 18, 2012 at 8:46 am
Wow this is confusing. It would help your case a LOT if you read the first article in my signature. I can't tell if you need the tally table, a...
June 18, 2012 at 8:41 am
Once you hit your rollback this will fail. Your catch inside one of the nested procs will cause the transaction to be rolled back. Your outer try catch will fail...
June 18, 2012 at 8:35 am
mark.sayer (6/18/2012)
The underlying problem was casting a varchar(max) into a decimal. If I change this to cast to a float the problem goes...
June 18, 2012 at 7:13 am
sathish463 (6/17/2012)
Can u please telll me which anser is correct....
I highly doubt that any single response was the "answer". There were several different things posted and it was most likely...
June 18, 2012 at 7:04 am
Connections are not made to tables, they are made to the database.
June 15, 2012 at 1:20 pm
Anatoly Ukhvanov (6/15/2012)
Could anyone explain to me, a ukrainian, what does it mean? Which meaning...
June 15, 2012 at 10:46 am
That is what that import tool does. It would be nearly impossible to convert the actual sql automatically. If you want to convert it to a view you will have...
June 15, 2012 at 8:56 am
Viewing 15 posts - 11,626 through 11,640 (of 15,381 total)