473,320 Members | 2,110 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,320 software developers and data experts.

NEED URGENT HELP: Sum Value in Query Doesn't Work

121 100+
I AM AT THE WIRE AND DESPERATELY NEED SOME HELP!


I have a query that checks that when the user submits data to me, it checks that their total is correct.

The SQL looks like this:
Expand|Select|Wrap|Line Numbers
  1. UPDATE ETL_TBL SET ETL_TBL.ERR_CD = "805"
  2. WHERE (((ETL_TBL.OTHR_TOTL_AMT)<>([FOOD_TOTL_AMT]+[ADO_VSL_TOTL_AMT]+[MTG_ROOM_TOTL_AMT]+[GRNT_TOTL_AMT]+[OTHR_EXP_AMT]+[MGMT_FEE_TOTL_AMT])) AND ((ETL_TBL.OVRD_VALDN_IND)=No) AND ((ETL_TBL.VALD_STA_IND)=No));
The query worked fine when the number formats were set to "Long Integer", but then I had a change that meant we were collecting values other than Integers (not whole dollar values), so I had to change them to "Double".

Ever since that change, the code doesn't work, but it worked fine when they were Long Integer.


Thanks to anyone that can help
May 2 '07 #1
3 1889
MMcCarthy
14,534 Expert Mod 8TB
Check that all the following fields have been changed to double. You will find that something is not. Either change that to a double or if for any reason you can't let me know.

These fields all have to be double:
ETL_TBL.OTHR_TOTL_AMT
[FOOD_TOTL_AMT]
[ADO_VSL_TOTL_AMT]
[MTG_ROOM_TOTL_AMT]
[GRNT_TOTL_AMT]
[OTHR_EXP_AMT]
[MGMT_FEE_TOTL_AMT]
May 2 '07 #2
JHNielson
121 100+
Check that all the following fields have been changed to double. You will find that something is not. Either change that to a double or if for any reason you can't let me know.

These fields all have to be double:
ETL_TBL.OTHR_TOTL_AMT
[FOOD_TOTL_AMT]
[ADO_VSL_TOTL_AMT]
[MTG_ROOM_TOTL_AMT]
[GRNT_TOTL_AMT]
[OTHR_EXP_AMT]
[MGMT_FEE_TOTL_AMT]

You're right! I caught one that was still integer.

Thanks so much! In the stress of it all, I knew I was overlooking something
May 2 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
You're right! I caught one that was still integer.

Thanks so much! In the stress of it all, I knew I was overlooking something
You're welcome.
May 2 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

9
by: netpurpose | last post by:
I need to extract data from this table to find the lowest prices of each product as of today. The product will be listed/grouped by the name only, discarding the product code - I use...
1
by: Jenny | last post by:
Need urgent help for an unsolved problem. In our ASP web application, we creat a Back button and if user click on this button, it execute history.go(-1) to go back to the previous page. All our...
3
by: google | last post by:
I have a database with four table. In one of the tables, I use about five lookup fields to get populate their dropdown list. I have read that lookup fields are really bad and may cause problems...
11
by: my-wings | last post by:
I think I've painted myself into a corner, and I'm hoping someone can help me out. I have a table of books (tblBooks), which includes a field (strPubName) for Publisher Name and another field...
15
by: Cheryl Langdon | last post by:
Hello everyone, This is my first attempt at getting help in this manner. Please forgive me if this is an inappropriate request. I suddenly find myself in urgent need of instruction on how to...
2
by: TKB | last post by:
The following code takes the values from the db and echos them inside a list. Then when the user selects a value from the list, the value must be stored to the db, but this doesn't work. Could anyone...
1
by: write2ashokkumar | last post by:
hi... i have the table like this, Table Name : sample Total Records : 500000 (Consider like this) Sample Records: id ------------ name
1
by: veerunrt | last post by:
Hi All, one column is having no of values separated by comma in the table that any one value should match with some other column of another table one value how to join in oracle I need result...
5
by: Justin | last post by:
Here's my XML: <?xml version="1.0" ?> <AppMode Type="Network"> <CurrentFolder Path="c:\tabs"> <Tabs> <FilePath>tabs\Justin.tab</FilePath> <FilePath>tabs\Julie.tab</FilePath> *****There could...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
0
by: Defcon1945 | last post by:
I'm trying to learn Python using Pycharm but import shutil doesn't work
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.