15,860,943 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 Javascript questions
View Visual Basic questions
View Python 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 Member 14173753 (Top 7 by date)
Member 14173753
8-Mar-19 5:24am
View
I use below quey, it final return 91 record (it's ok), but in form if user choose some condition as the date from x to y, and name is Jack... I can't apply fillter to MAIN WHERE, as:
query += " AND (R.TheDate between @fromdate and @todate) AND (P.TheDate between @fromdate and @todate) ";
query += " AND C.Name LIKE '%' + @TheName + '%'";
if user choose date then ERROR: Invalid colum name thedate
THIS IS MY QUERY:
Query= "select c.name,
case when
isnull(p.pmoney,0) - ISNULL(r.rmoney,0)>0
then isnull(p.pmoney,0) - ISNULL(r.rmoney,0)
else null end
debitBanance,
case when
ISNULL(r.rmoney,0)-isnull(p.pmoney,0) >0
then ISNULL(r.rmoney,0)-isnull(p.pmoney,0)
else null end incredit
from
customer c left join
(select sum(money) rmoney,id_customer from receipt group by id_customer ) as r
on c.id_customer=r.id_customer
left join
(select sum(money) pmoney, id_customer from payment group by id_customer) as p
on c.id_customer=p.id_customer
where r.rmoney is not null or p.pmoney is not null" //here I Add to where clause
Member 14173753
8-Mar-19 2:44am
View
CHIII60, I posted my query below, but it running very slow. if you have time, please me!
Member 14173753
7-Mar-19 5:19am
View
Thanks CHiLl60 vere very much, I will check and please notice to you.
Thanks you.
Member 14173753
7-Mar-19 4:02am
View
Thanks you CHil60 very Much, and I'm sorry when say urgent. I hope that you can help me. again thanks for. I waiting you.
Member 14173753
7-Mar-19 3:43am
View
anybody can help me!
Member 14173753
7-Mar-19 2:41am
View
I apply with the Your query but result not TRUE, returt all customers in table customer (about 1.000 rows, in that a lot of customer havn't Receipt OR payment) and DebitBalance,Incredit value don't map with DebitBalance and INcredit colums.
Can you improve my Query that I Tried.
please help me, urgent! Thank you.
Member 14173753
6-Mar-19 23:33pm
View
anyone can help me?
Show More