Viewing 15 posts - 2,641 through 2,655 (of 5,394 total)
Mahesh Bote (9/23/2011)
try this ...
Begin Try
Begin Tran
Insert Into TableName Values (99, 'ZZZ');
Update TableName
SetColName = 'XXX'
Where ColName = 99;
Commit Tran
End Try
Begin Catch
If @@Error <> 0
Begin
RollBack Tran
End
End Catch
If you fall into the...
September 23, 2011 at 5:47 am
Server side cursors are less memory demanding for the client, but need an extra round trip to the server avery time you need to fetch a row. If you have...
September 23, 2011 at 3:48 am
HowardW (9/23/2011)
Have a question about this code:
IF @localTran = 1 AND XACT_STATE() = 1
ROLLBACK TRAN
Once you're in the catch block, wouldn't you want to roll back the...
September 23, 2011 at 3:18 am
This should help:
SELECT sc.name AS schema_name,
dbp.name AS owning_database_principal_name,
srp.name AS owning_server_principal_name
FROM sys.schemas AS sc
INNER JOIN sys.database_principals AS dbp
ON sc.principal_id = dbp.principal_id
INNER JOIN sys.server_principals AS srp
ON srp.sid = dbp.sid
September 23, 2011 at 2:41 am
You can use my stored procedure code template[/url] if you like it.
It should do what you ask for.
Regards
Gianluca
September 23, 2011 at 2:32 am
You're not giving enough information to get sensible advice.
First of all, give yourself a chance to get an answer and format the code you post. You can make it more...
September 23, 2011 at 2:29 am
I think it's a duplicate post to this one: http://www.sqlservercentral.com/Forums/FindPost1179871.aspx
Or are you asking a different question?
September 23, 2011 at 2:10 am
I don't think I understand your question.
If the stored procedure accepts a float parameter, you will pass float values.
If you try to pass anything else, it will be converted explicitly...
September 23, 2011 at 2:06 am
Given that both queries return exactly one row, you have two options:
1) Use variables:
DECLARE @PreviousNAV decimal(21,6)
DECLARE @TodaysNAV decimal(21,6)
SELECT @PreviousNAV = ISNULL(@PreviousNAV,0) PreviousNAV
FROM Fireball..NAV
WHERE Date = @StartDate and PortfolioId = @PortfolioId
SELECT...
September 23, 2011 at 2:01 am
montyismobile (9/22/2011)
Thank you very much for your asistance with this, and so quickly too.
I must thank you for an elegant looking solution. I am looking forward to...
September 22, 2011 at 9:46 am
montyismobile (9/22/2011)
September 22, 2011 at 9:43 am
OK, I think this should solve your issue:
PLEASE read the code and try to understand it. If you don't understand it, DON'T use it, come back here and ask for...
September 22, 2011 at 7:59 am
I'm sure there's a detailed installation guide shipped with SAP. Have you checked that?
As far as the db_creator role, in SSMS, expand security/logins, right click the user and select "properties"....
September 22, 2011 at 6:27 am
forsqlserver (9/22/2011)
I am not getting your reply, are u in my favor?
I'm sorry, I see that my reply is confusing.
I wanted to say that I have tried stopping/starting the...
September 22, 2011 at 6:05 am
I agree that this table should probably be re-designed.
However, you can achieve what you're after by using a trigger INSTEAD OF INSERT, that could turn INSERTs into UPSERTs using the...
September 22, 2011 at 6:00 am
Viewing 15 posts - 2,641 through 2,655 (of 5,394 total)