15,896,207 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 Alexis Gaitan (Top 13 by date)
Alexis Gaitan
31-May-21 10:47am
View
need to get something like this, i need to subtract 6757.26 - 90.29
accountcode DocEntry PaymentCode OtherPaymentAmount CashAmount TotalAmount sapcreditcard FileName BPA_ProcessStatus ERP_PaymentProcessed
CWM 332 1 NULL 6,666.97 6,666.97 NULL TX.1_20210515.xml N N
CWM 332 6 8989.97 NULL 8989.97 1 TX.1_20210515.xml N N
CWM 332 7 4514.5 NULL 4514.5 2 TX.1_20210515.xml N N
Alexis Gaitan
26-May-21 12:46pm
View
accountcode DocEntry PaymentCode OtherPaymentAmount CashAmount creditnoteamount TotalAmount sapcreditcard FileName BPA_ProcessStatus ERP_PaymentProcessed
CWM 332 1 NULL 6757.26 NULL 6757.26 NULL TX.1_20210515.xml N N
CWM 332 11 90.29 NULL 90.29 90.29 28 TX.1_20210515.xml N N
CWM 332 6 8989.97 NULL NULL 8989.97 1 TX.1_20210515.xml N N
CWM 332 7 4514.50 NULL NULL 4514.50 2 TX.1_20210515.xml N N
i need to subtract the column cashamount with record paymentcode =1 and column creditnoteamount paymentcode = 11 and combine it in to one record
Alexis Gaitan
7-May-21 8:43am
View
nevermind i just got it from your query i made some modifications and works perfect, thank you very much
Alexis Gaitan
7-May-21 8:27am
View
I modified my question, as now i need yes or yes a cashamount and otherpayment columns, in order to integrate later with my systems.
Alexis Gaitan
7-May-21 8:13am
View
at least im needing this:
accountcode DocEntry PaymentCode OtherPaymentAmount CashAmount sapcreditcard BPA_ProcessStatus ERP_PaymentProcessed
CWM 238 1 NULL 0.29 NULL N N
CWM 238 1 NULL 29.00 NULL N N
CWM 238 1 NULL 29.58 NULL N N
CWM 238 9 18.00 NULL 4 N N
i edited my question so to show this expected result:
accountcode DocEntry PaymentCode OtherPaymentAmount CashAmount sapcreditcard BPA_ProcessStatus ERP_PaymentProcessed
CWM 238 1 NULL 58.87 NULL N N
CWM 238 9 18.00 NULL 4 N N
Alexis Gaitan
7-May-21 8:12am
View
what about im interested in other columns? like Paymentcode and StoreID
Alexis Gaitan
6-May-21 11:49am
View
thank you so much
Alexis Gaitan
24-Apr-21 16:09pm
View
works perfect, thank you
Alexis Gaitan
24-Apr-21 15:14pm
View
thank you, one question as im using this at the beginning
DECLARE @NumInSale int
SELECT @NumInSale = NumInSale FROM OITM t1 WHERE t1.ItemCode='CID-11418272385'
IF (@NumInSale > 1)
and im using ELSE too should i add that code after ELSE statement ? and leave the other as is?
Alexis Gaitan
24-Apr-21 14:43pm
View
this is the part that doesnt works
(SELECT T5.[ItemCode], T6.[U_NAME] as 'User that created Item', t5.updatedate
FROM AITM T5 inner join OUSR T6 on t5.usersign = t6.internal_K
WHERE T5.[ItemCode] = 'CID-11418272385'
group by T5.[ItemCode], T6.[U_NAME], t5.loginstanc, t5.updatedate
having t5.loginstanc = (select min(loginstanc) from AITM where itemcode = 'CID-11418272385')),
Alexis Gaitan
24-Apr-21 14:43pm
View
after the ELSE statement theres a subquery just after this line
case when t1.NumInSale > 1 THEN '1' END as uom_group_id,
--------- subquery starts
(SELECT T5.[ItemCode], T6.[U_NAME] as 'User that created Item', t5.updatedate
FROM AITM T5 inner join OUSR T6 on t5.usersign = t6.internal_K
Alexis Gaitan
24-Apr-21 14:40pm
View
i just post it in What I have tried section on main post. thank you
Alexis Gaitan
24-Apr-21 14:34pm
View
can you show me some example or part of it? thank you
Show More