Dear All,
Trans_type comes from account_detail and is not null.
I have tried both NoCoolHandle and SQLDenis' suggestions and they both work GREAT. I got the right answer. However I still DON'T quite understand why. Do you have any good articles or books which you will recommend on this...
I have a table, customer. The following is the sql statement and its output:
select C.ID, C.FNAME, C.LNAME, C.DATE
FROM CUSTOMER C
WHERE C.ID = 1007
3 John Smith 2005-10-05 00:00:00.000
4 Mary Brown NULL
5 Bill White NULL
And another table, account_detail, with about 30 records in there...
I have a stored procedure like the following (in between the two ----- lines):
------------------------------------
CREATE PROCEDURE abc
@V1 int,
@V2 money,
@V3 int output
AS
……...
……...
Begin tran
Insert or Update data Statement-1
IF (@@ERROR...
Dear DaOtH, SQLSister and TysonLPrice,
Thank you for all the quick and helpful responses from you all. I am sorry that I could not reply earlier because I was tied up by another project.
I was playing around with NorthWind sample database while waiting for help. I was surprised to find that...
I was trying to use the Transact-SQL Debugger.
I went to Object Browser, found my stored procedure, right clicked and chosed "Debug".
The "Debug Procedure" window came up. I entered values for all variables and clicked on the Execute button. I didn't see anything happen. I could not add...
SQLSister,
Thank you for your kind compliments and suggestion. I felt so honored. I have just posted my original question to FAQ's. Hope it would help.
Tom
I recently posted a question to the forum. Several people said it was a good example to ask a question this way and suggested I could add it to the FAQÆs. I was so honored. Here I post my original question hoping it would contribute a bit to the forum.
---
/*...
Karl (donutman),
I ordered two books, The Guru's Guide to Transact-SQL and The Guru's Guide to SQL Server Stored Procedures, XML, and HTML based my search in Amazon.com before I saw your message. I am glad that these two books are in your list. I did make right choices. Thanks a lot.
Tom...
Dear Donutman,
First of all, I have to thank you for your quick response and kind remarks. I always try to make my question clear to everyone.
Your two solutions work great. They both produce the right answer instantly. Because I have only small testing data, I can’t tell which way is...
/* =====================================================================================
--
-- In the following sample database, there are three tables: VENDOR, PRODUCT and
-- PRODUCT_PICTURE...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.