Viewing 15 posts - 1 through 15 (of 68 total)
SQL. The program is our ERP In the Item master users Do an "Add and Carry" What that does is it takes the current record and copies it to a...
May 19, 2023 at 1:42 pm
I would but the system that created the record updates the record based on the record it copied from (Add and Carry) instead of Add. So If I default a...
May 19, 2023 at 1:26 pm
It is actually varchar so I have to convert it. I am using stored procedure. How would I do it without the cursor?
December 15, 2022 at 3:32 pm
Got it.
Declare @table varchar(20)
set @table = 'SalesPerformance' + cast(year(current_Timestamp)-1 as varchar(4))
Declare @Sql varchar(max)
set @Sql = 'Select * into ' + @table + ' from SalesPerformance'
Exec (@Sql)
November 3, 2022 at 12:10 pm
That is very interesting. I did not know you could do WITH in TSQL. That opens up a new avenue. Thanks. Also DateFromParts is something I never knew too.
August 31, 2022 at 11:28 am
OK, New Code here for critique! Thanks to all. What else can I clean up?
Select cust.fcustno, fcompany, fcreated, cust.fsalespn, Sum(fnamount) as Sales,
Cast(sum(fnamount) *.05 as numeric(10,2)) as...
August 30, 2022 at 6:05 pm
Yes, I got the date issue when looking at it some more. But the problem is when selecting the data, for new customers its is easy but for the older...
August 29, 2022 at 7:03 pm
Point noted and you are correct.
August 29, 2022 at 6:08 pm
Would like to post the data but I have a solution now. This will run once a quarter at night so it is not a huge hit on processing. I...
August 29, 2022 at 11:37 am
I finally got it. Here is the select statement.
Select cust.fcustno, fcompany, fcreated, cust.fsalespn, Sum(fnamount) as Sales from slcdpmx cust
inner join (select fcustno, fnamount, finvdate
from armast where...
August 26, 2022 at 5:29 pm
OK, but I still can not figure this out. OR does not work. What I need to find out is to gather data for customers who had invoices before a...
August 26, 2022 at 4:26 pm
OR Crap, sorry, thanks.
August 26, 2022 at 3:38 pm
Ah, never thought of a trigger. That would work.
August 15, 2022 at 6:37 pm
To all, was out sick for a few days. thank you for all your insights, Truly was an education.
May 11, 2022 at 11:06 am
A little confused on the schema but will look up more reference on that. Understand on the creation of data. Everyone have a nice weekend. Nocking off for the day...
May 6, 2022 at 4:18 pm
Viewing 15 posts - 1 through 15 (of 68 total)