I GUESS WITH ALIAS

Dúvidas, dicas e truques de SQL, Select, Update, Delete, cláusulas, operações com joins, Funções em SQLs, etc
  

Poston Mon, 10 Dec 2007 11:12 am

WELL I HAVE A DOUBT THAT ALWAYS CATCHES ME BY HEEL EX: HAVE THE FOLLOWING TABLES VLPAGAMENTO AND VLACRESCENTADO SO I DID A SO VLPAGAMENTO + VLACRESCENTADO VALUE,--GAVE THE ALIAS FOR HIM NOW I WOULD LIKE TO KNOW IF YOU HAVE TO DECREASE THE RESULT ALLOCATED TO VALUE (ALIAS)-VLPAGAMENTO?
carlos12
Location: rio

Poston Mon, 10 Dec 2007 11:16 am

NOTE: I TOLD YOU SO: BEING THAT THE VLPAGAMENTO VALUE WAS ADDED USING THE PL/SQL THOSE OPTIONS YOU HAVE IN LAYOUT
carlos12
Location: rio

Poston Mon, 10 Dec 2007 12:35 pm

Hey Carlos, beauty?

man, I couldn't understand straight, you would like to subtratir the outcome \"value\" the value corresponding to another field in your select?

[] 's
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP

Poston Mon, 10 Dec 2007 12:44 pm

MAN I'M UPDATING THE PAGE ALL THE TIME, LOL I'M REALLY NEEDED IT.

O I HAVE PLANNED IN PL/SQL A SELECT THAT BRINGS A NUMBER OF TITLES THE TABLE NAME IS VLTITULOS OKAY?

SO I TOOK and RODE with the ROUND FUNCTION: ROUND (p. VLTITULO/1.3496 * 1.0889, 2) ESTIMATE--and GAVE an ALIAS for HER with the name I ASSUME BEING that on the PL/SQL LAYOUT I'M calculating ´ VLTITULO TABLE.


I WONDER IF YOU HAVE AS I GET THE TOTAL CALCULATION TABLE P. VLTITULO AND DECREASE BY THE OUTCOME OF THE ALIAS CALCULATION
carlos12
Location: rio

Poston Mon, 10 Dec 2007 1:55 pm

Well, let's see if I understand you right, you set up a query in VLTITULOS table, that table you do a read row by row, and each record you have the value for the calculation ROUND ..., however you want to apportion inside that loop the sum of all the records in the VLTITULOS table, and use this value in a total calculation along with the value of each record.
would that be??

[] 's
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP

Poston Mon, 10 Dec 2007 2:19 pm

The table is that
Code: Select all
Nrdocumento  |                      valor  |            Vltitulo  |
     1014                          555,64                 555,64 
     32                            555,64                 555,64 
     0512                          448,31                 421,32
at the end of the select by Layout of PL/SQL is done the sum of the columns there looks like this:
Code: Select all
Nrdocumento  |                       valor  |            Vltitulo  |
     1014                           555,64                 555,64 
       23                           555,64                 555,64 
     0512                           448,31                 421,32
                                    ______              _________
                                   1059,58                1532,60
good over there ok report oracle brings that way then I did a column love that looked like this:
Code: Select all
Nrdocumento  |        valor  |            Vltitulo  |        calculo
     1014            555,64                 555,64           112,80
       23            555,64                 555,64           112,80
     0512            448,31                 421,32           etc...
                     ______              _________      ___________
                    1059,58                1532,60   aqui está a soma
ok the sum I made also by the PL/SQL with the break option and sum ok!

This last column I did with an alias called calculus and I was wondering how could diminuiir ex a sum in the table VLTITULLO-I suppose it was a table taking a percentage of each select done in the vltitulo because I had to do a percentage of each value her there the end result I want to detract from the vltitulo table.


I know that this time was a little tricky because as I'm esplicando suddenly would be easier but the problem is that I shouldn't be expressing myself well
carlos12
Location: rio

Poston Mon, 10 Dec 2007 2:20 pm

putz guy did right but in time to send out here I think chumped now you won't get read, rs
carlos12
Location: rio

Poston Tue, 11 Dec 2007 7:21 am

Hey Carlos, beauty?

man, I don't know reports, let's wait for someone who knows a bit more so I can help ...

[] 's
Tineks
Location: Araraquara - SP

Cristiano (Tineks)
Araraquara - SP



Return to SQL

Who is online

Users browsing this forum: Bing [Bot] and 2 guests