I Don't Know If I Can Divide Values Like This -
(select Sum(importe) From Costos, Homolodamaster
-
Where Costos.cuenta=homologamaster.cuenta
-
And Fecha='24-07-2007') / (select Sum(ponderacion*noenvios)
-
From Noenvios1, Homologadet, Homologamaster
-
Where Noenvios1.origendestino=homologader.origendestino
-
And Homologadet.idruta=homologamaster.idruta)
-
The First Select Returns 129299 And The Second Returns1821623 And I Need To Divide This Two Values, How Can I Do
Regards
4 1828
I Don't Know If I Can Divide Values Like This -
(select Sum(importe) From Costos, Homolodamaster
-
Where Costos.cuenta=homologamaster.cuenta
-
And Fecha='24-07-2007') / (select Sum(ponderacion*noenvios)
-
From Noenvios1, Homologadet, Homologamaster
-
Where Noenvios1.origendestino=homologader.origendestino
-
And Homologadet.idruta=homologamaster.idruta)
-
The First Select Returns 129299 And The Second Returns1821623 And I Need To Divide This Two Values, How Can I Do
Regards
why don't you use variable?
why don't you use variable?
i don't know how to use that?
chk ths....... -
-
declare @numerator numeric(18,9)
-
declare @denominator numeric(18,9)
-
select @numerator = Sum(importe) From Costos, Homolodamaster
-
Where Costos.cuenta=homologamaster.cuenta
-
And Fecha='24-07-2007'
-
-
select @denominator = Sum(ponderacion*noenvios)
-
From Noenvios1, Homologadet, Homologamaster
-
Where Noenvios1.origendestino=homologader.origendestino
-
And Homologadet.idruta=homologamaster.idruta
-
-
declare @res numeric(18,9)
-
set @res = @numerator /@denominator
-
chk ths....... -
-
declare @numerator numeric(18,9)
-
declare @denominator numeric(18,9)
-
select @numerator = Sum(importe) From Costos, Homolodamaster
-
Where Costos.cuenta=homologamaster.cuenta
-
And Fecha='24-07-2007'
-
-
select @denominator = Sum(ponderacion*noenvios)
-
From Noenvios1, Homologadet, Homologamaster
-
Where Noenvios1.origendestino=homologader.origendestino
-
And Homologadet.idruta=homologamaster.idruta
-
-
declare @res numeric(18,9)
-
set @res = @numerator /@denominator
-
Thank for your help.
Sign in to post your reply or Sign up for a free account.
Similar topics
by: Jack Smith |
last post by:
Hello,
I am working on the following problem. I need a divide and conquer
algorithm to solve the following problem. Any help is appreciated.
I have a set of coordinates (x,y) and each...
|
by: atse |
last post by:
Hi,
I have a string:
mystring="1234,5678,985,21544,55524,11264, ... ,"
How can I divide this string into
1234
5678
985
....
11264
|
by: Nobody |
last post by:
I have some code that I am trying to optimize for speed...
trying to squeeze every last CPU cycle out... I remembered an old trick
where dividing & multiplying can be sped up by using bitshifts...
|
by: Mike Leahy |
last post by:
All...
I have a query that calculates various using variables from a survey
database. As with any survey, there are many instantces of null values. I'm
wondering if there is any way to escape...
|
by: Gary Carson |
last post by:
Can anyone tell why the query below would throw a divide-by-zero
error? The only reason I can see for the error happening would be if
SUM() came out to be zero, but this never happens with the...
|
by: Johs |
last post by:
I have:
int a = 1;
int b = 2;
double c = a/b;
Is it somehow possible to divide these two integers and get the result
as a double 0.5? Or do they both have to be declared as doubles?
|
by: Spiros Bousbouras |
last post by:
Do you have an example of an implementation where
sizeof(short int) does not divide sizeof(int) or
sizeof(int) does not divide sizeof(long int) or
sizeof(long int) does not divide sizeof(long long...
|
by: JenavaS |
last post by:
Hi all,
I have a query:
SELECT Data.Region, Data.Dept, Data.Year, Data.Month, Data.Week, Data.Elapsed, Data. AS WpComp, Data. AS CpComp, IIf(=53 And ="JAN,WK4",/2,) AS AdjLyComp,...
|
by: Default User |
last post by:
Hi,
If I have three 64 bit integers and I want to do this operation on them:
x*y/z
Lets say that what we are multiplying by (y) is offset by what we are
dividing by (z) so that the final...
|
by: Charles Arthur |
last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
|
by: ryjfgjl |
last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
|
by: ryjfgjl |
last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
|
by: BarryA |
last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
|
by: Sonnysonu |
last post by:
This is the data of csv file
1 2 3
1 2 3
1 2 3
1 2 3
2 3
2 3
3
the lengths should be different i have to store the data by column-wise with in the specific length.
suppose the i have to...
|
by: Hystou |
last post by:
There are some requirements for setting up RAID:
1. The motherboard and BIOS support RAID configuration.
2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
|
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: jinu1996 |
last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
| |