473,441 Members | 2,044 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

PROBLEM WITH REPEATED (Null) VALUE IN MULTIPLE QUERY

Hi,

I'm having trouble with the following:
I have a portfolio table with a field called "Bid/Offer" which is filled in by selecting Bid or Offer from a combo box.
Now I need to create a query that separates the bids in one field and the offers in another one (plus many other fields). I have created 2 queries, one that shows all the bids for all portfolios and another one that shows all the offers.
The problem comes when I try to create the third and last query, so it can show me all the bids and offers for each portfolio (I need it to be separate because each bid an offer have respective fields called price, that show the bid price and the offer price for a particular portfolio). There are some times when a portfolio has 4 bids, but only 1 offer, so when I run the query, the bid values are correct, but the offer ones are not because it fills the null values with the last it filled in.
For example here are the bids and offers of the same portfolio in different dates.

Date ClientB Bid Price Price Offer ClientO
03-04-07 DR Bid 34 45 Offer GD
05-03-07 ER Bid 14 (no offer on this date)
07-09-07 AF Bid 45 89 Offer KL

My problem is that the fields that are supposed to turn out in blank because they are null, repeat the info from the last cell. For example, for 05-03-07, on the Price field it will say 45 and then Offer, like in the previous date.

how can I change this so it leaves the field blank or at least puts a zero or something?

Thank you very much for your help!
Aug 31 '07 #1
1 1382
Scott Price
1,384 Expert 1GB
Hi,

I'm having trouble with the following:
I have a portfolio table with a field called "Bid/Offer" which is filled in by selecting Bid or Offer from a combo box.
Now I need to create a query that separates the bids in one field and the offers in another one (plus many other fields). I have created 2 queries, one that shows all the bids for all portfolios and another one that shows all the offers.
The problem comes when I try to create the third and last query, so it can show me all the bids and offers for each portfolio (I need it to be separate because each bid an offer have respective fields called price, that show the bid price and the offer price for a particular portfolio). There are some times when a portfolio has 4 bids, but only 1 offer, so when I run the query, the bid values are correct, but the offer ones are not because it fills the null values with the last it filled in.
For example here are the bids and offers of the same portfolio in different dates.

Date ClientB Bid Price Price Offer ClientO
03-04-07 DR Bid 34 45 Offer GD
05-03-07 ER Bid 14 (no offer on this date)
07-09-07 AF Bid 45 89 Offer KL

My problem is that the fields that are supposed to turn out in blank because they are null, repeat the info from the last cell. For example, for 05-03-07, on the Price field it will say 45 and then Offer, like in the previous date.

how can I change this so it leaves the field blank or at least puts a zero or something?

Thank you very much for your help!

Shall we take a peek at the SQL for your third query? Just copy and paste it in here, then wrap it in the code tags by selecting it all, clicking on the # button on the top of this reply window. Then you can modify the first code tag to read like this: [code=sql] just like that!

Thanks,
Regards,
Scott
Aug 31 '07 #2

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

Similar topics

3
by: DarthMacgyver | last post by:
Hello, I recently wrote a survey application. Each question is very similar. The first questions gives me a problem when there are multiple people taking the survey (The Database connection...
10
by: JMorrell | last post by:
First post to this community so am not sure if this is the correct place. Here goes. I have a MS Access db that keeps track of employees sick and annual leave balances. In it, I have a report,...
2
by: Giulio | last post by:
I make an import of a huge file txt table with headers at each page and date format as "20.12.2004" in order to use the data I first qo a query that exclude all line representing the headers...
3
by: dskillingstad | last post by:
I'd appreciate any help I can get. I'm not sure what I'm doing wrong, but.... I've searched these groups for some solutions but no luck. I have an unbound form (frmSearch), with several unbound...
0
by: Lokkju | last post by:
I am pretty much lost here - I am trying to create a managed c++ wrapper for this dll, so that I can use it from c#/vb.net, however, it does not conform to any standard style of coding I have seen....
17
by: John | last post by:
Hi I have a datadapter with the following SQL; SELECT ID, Company, Status, CompanyType FROM Companies WHERE (@Status IS NULL or @Status = Status) When I try to fill like...
0
by: deacon57 | last post by:
FYI - If you are a computer scientist (or geek), this post may be for you. I wanted to log any search keywords, etc that are used on my site. I created a simple program that logs search terms...
10
by: amitabh.mehra | last post by:
Hi I havent used MQT before. Read the online tips and tutorials but none seems to give any hint for my problem. I have a base table (base_table) as: st varchar(25) default...
7
by: kirkgilbert | last post by:
I am trying to do an onchange event in a form using a text field. The form is tied to a record set that is part of a repeated region. One the first record when I edit the data it works perfectly. ...
1
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...
0
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...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
jinu1996
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...
1
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...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...

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.