16,022,752 members
Sign in
Sign in
Email
Password
Forgot your password?
Sign in with
home
articles
Browse Topics
>
Latest Articles
Top Articles
Posting/Update Guidelines
Article Help Forum
Submit an article or tip
Import GitHub Project
Import your Blog
quick answers
Q&A
Ask a Question
View Unanswered Questions
View All Questions
View C# questions
View C++ questions
View Visual Basic questions
View Javascript questions
View .NET questions
discussions
forums
CodeProject.AI Server
All Message Boards...
Application Lifecycle
>
Running a Business
Sales / Marketing
Collaboration / Beta Testing
Work Issues
Design and Architecture
Artificial Intelligence
ASP.NET
JavaScript
Internet of Things
C / C++ / MFC
>
ATL / WTL / STL
Managed C++/CLI
C#
Free Tools
Objective-C and Swift
Database
Hardware & Devices
>
System Admin
Hosting and Servers
Java
Linux Programming
Python
.NET (Core and Framework)
Android
iOS
Mobile
WPF
Visual Basic
Web Development
Site Bugs / Suggestions
Spam and Abuse Watch
features
features
Competitions
News
The Insider Newsletter
The Daily Build Newsletter
Newsletter archive
Surveys
CodeProject Stuff
community
lounge
Who's Who
Most Valuable Professionals
The Lounge
The CodeProject Blog
Where I Am: Member Photos
The Insider News
The Weird & The Wonderful
help
?
What is 'CodeProject'?
General FAQ
Ask a Question
Bugs and Suggestions
Article Help Forum
About Us
Search within:
Articles
Quick Answers
Messages
Comments by bolshie6 (Top 23 by date)
bolshie6
19-Nov-12 6:58am
View
Yeah :)
bolshie6
19-Nov-12 6:15am
View
i've used CTEs previously... i did not know about OVER clause. i googled it and learned. Thank u. :)
bolshie6
19-Nov-12 6:07am
View
Nd can u tell me how actually the select part inside the CTE works?
bolshie6
19-Nov-12 5:52am
View
Thanks. works.
bolshie6
19-Nov-12 5:22am
View
Thank u for the answer. but i need to do it with out using a %%physloc%%, or adding an IDcol..
bolshie6
19-Nov-12 5:20am
View
Deleted
Thank u.
bolshie6
30-Oct-12 1:48am
View
works. Thanks
bolshie6
12-Oct-12 1:36am
View
Informative. Thank you.
bolshie6
11-Oct-12 5:54am
View
Thank you, works.
bolshie6
10-Oct-12 9:15am
View
yes, a join can be used
bolshie6
9-Oct-12 7:53am
View
Thank you
bolshie6
9-Oct-12 7:52am
View
A similar one for delete. I need to Insert all the deleted rows (From AccountMaster) into AccountMasterHistory Table and Update the Balances Table so that the Sum(DebitAmount-CreditAmount) does not include the deleted rows for that particular AccCode
CREATE TRIGGER tri_DeleteAccountMaster ON AccountMaster
FOR DELETE
AS
DECLARE @AccountCode VARCHAR(100)
SELECT @AccountCode = [AccountCode]
FROM Deleted
DECLARE @BalanceAmount NUMERIC(19,4)
SELECT @BalanceAmount = SUM(DebitAmount - CreditAmount)
FROM Deleted
WHERE AccountCode = @AccountCode
BEGIN
INSERT INTO AccountMasterHistory (AccountCode, AccountDate, DebitAmount, CreditAmount, RowId)
SELECT AccountCode, AccountDate, DebitAmount, CreditAmount, RowId FROM Deleted
WHERE AccountCode = @AccountCode
UPDATE Balances SET BalanceAmount = @BalanceAmount
WHERE AccountCode = @AccountCode
END
bolshie6
9-Oct-12 7:48am
View
It works, Thank you.
bolshie6
9-Oct-12 4:16am
View
Thank you, I solved it myself. I've also done it in the same way.
bolshie6
9-Oct-12 1:50am
View
Deleted
i've got one more situation. I need to create a user defined function in which i'll be using values from a table. i'm not sure if its possible. i also need to pass a value from the table as parameter. how do i do that?
bolshie6
9-Oct-12 1:18am
View
Thank you, It works. I've noted that its 'RETURNS'.
bolshie6
9-Oct-12 1:10am
View
This is my UDF for finding Simple interest. Theres always an error near RETURN
CREATE FUNCTION ufn_SimpleInterest (@Principal NUMERIC(19,4), @TimePeriod NUMERIC(19,2), @Rate NUMERIC(19,9)
RETURN NUMERIC(19,4)
AS
BEGIN
DECLARE @SimpleInterest NUMERIC(19,4)
SELECT @SimpleInterest = ( @Principal * @TimePeriod * @Rate) / 100
RETURN @SimpleInterest
END
bolshie6
4-Oct-12 9:37am
View
Thank u :) Works :)
bolshie6
27-Sep-12 6:12am
View
Okey, got it. I actually thought COALESCE returns all the NON NULL values. But got it now, it returns only the first NON NULL value. Thanks again.
bolshie6
27-Sep-12 6:05am
View
Can u explain me how actually COALESCE helps doing this?
bolshie6
27-Sep-12 5:53am
View
Thanks a lot. It works
bolshie6
13-Sep-12 5:47am
View
how do i use a table from DB as a source for AutoComplete?
bolshie6
11-Sep-12 6:10am
View
Deleted
can i have a detailed answer that i can understand easily. because, dock doesnt help me.
Show More