Viewing 15 posts - 1 through 15 (of 240 total)
Hello again
I found the solution fo my problem like that:
SELECT TOP(1)
main.*
from
( SELECT ref ,cmdesc, adoc,cm,datalc,
qtt
,sum(case when (cm < 50 OR sl.cm =...
April 18, 2023 at 9:34 pm
Hi Tom,
I rewrite my query like that, but i have the same problem. Maybe i´am missing something !
SELECT main.*
FROM
(SELECT ref ,cmdesc, adoc,cm,datalc, qtt
,sum(case...
April 18, 2023 at 11:04 am
Hello again,
I changed my query like this but the result of RunnigTotal are wrog:
SELECT main.*
FROM (SELECT ref
,datalc,cmdesc, adoc
,sum(case when (cm < 50 OR sl.cm...
April 18, 2023 at 10:28 am
Hi DesNorton,
Thanks for your reply, also i changed my query following your Advise :
SELECT main.*
FROM
(SELECT ref ,cmdesc, adoc,cm,datalc, qtt
,sum(case when (cm < 50...
April 18, 2023 at 9:06 am
Hello ZZartin,
Thanks for your reply.
I solve my problem like this and they work great.
DECLARE @temptable TABLE( i int identity(1,1) primary key,dostamp varchar(25), dilno numeric(10,0), Saldo Numeric(18,2) )
INSERT...
April 14, 2021 at 10:29 pm
Hi Dixie and ZZartin,
I know that using this script is much faster, I use this technique many times, but i this particulary case i need to make several validations before...
April 14, 2021 at 8:56 pm
Hi, ZZartin,
I don´t want just a list of records.
I want the list of records to use for making an INSERT (New line) on the Table ML that is the line...
April 14, 2021 at 4:02 pm
Hi Scott,
I´am to slow today 🙂
My changes for the Whole While query is this:
DECLARE @iterator int
DECLARE @MaxIterator int
DECLARE @dostamp varchar(25)
DECLARE @dilno int
DECLARE @dinome varchar(30)
declare @rn int
SELECT @MaxIterator...
April 14, 2021 at 3:21 pm
Hi,
The return values are:
dostampdilnorow_num
ADM20031364447,005225399 20000991
ADM20031365571,851071416 20001002
ADM20040634771,728659519 30000703
ADM20040635306,695939080 30000724
FG20013034216,630189892 10000325
FG20013034217,706720187 10000336
FG20013034219,422088797 10000347
FG20020342241,504588145 10000468
FG20020433591,736201415 20000019
FG20020457560,244096324 100004310
FG20020644327,006253430 100005411
FG20021034272,112384239 100005012
FG20021034612,489579070 100005113
FG20021034759,285493011 ...
April 14, 2021 at 3:17 pm
Hello ZZartin,
The primary key of my table DO is : DOSTAMP varchar(25)
Best regards,
LS
April 14, 2021 at 3:10 pm
Hy Scott,
Thanks for your reply and useful advises, but what kind of filter i must put in the Where condition inside the Begin ?
i think that the field dostamp (Primary...
April 14, 2021 at 2:27 pm
Sorry, i forget to mencioned, this query above return for each row_num different dostamp and this is correct:
SELECT
Distinct dostamp ,dilno,dinome
FROM DO
where datepart(yy,do.data) = 2020 --and...
April 14, 2021 at 2:19 pm
Hello Jeff,
Thanks for your reply!
If I use the initial union query and put everything in a CTE, can I do an Update and then SELECT all fields?
I need a union...
April 12, 2021 at 8:47 am
Hello Scott,
Thanks again for your explanation about my issue.
Best regards,
Luis
March 23, 2021 at 6:17 pm
Hi Scott,
Many thanks for your reply, i made some changes to return only 1 value.
Can you explain to me in a very simple way why my query does not return...
March 23, 2021 at 4:48 pm
Viewing 15 posts - 1 through 15 (of 240 total)