473,394 Members | 1,887 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,394 software developers and data experts.

Append query help

So i have an append query that takes a bunch of data from different tables in the db and generates a quote in a new table called "Quote". In this Quote table there are many columns (Customer,SKU,QTY,Cost per SKU,SUm Cost,Date, Quote Id). I want to be able to generate this quote in table form for a customer, however, i want the Customer, Sum cost, Date, and Quote ID to only be listed once in this table. However, these fields get repeated for each SKU that is in each order. The customer is a text data type, the sum cost is currency data type, date is a date and time data type but it also set as a default value of Now(), and the quote Id is a autonumber data type.

I am still very new to access and dont know to much about VBA but im willing to try anthing to see if i can get a quote presentable to a customer and easily stored in a database.
Sep 3 '10 #1
3 1149
NeoPa
32,556 Expert Mod 16PB
Kent, I'm afraid that again you provide far too little information to be able to make sense of what you're trying to ask. remember, anything you don't tell us, we're unlikely to know or understand.
Sep 7 '10 #2
I have an append query that appends to a table called “Quote”. In this table the columns are as follows: (Customer,SKU,QTY,Cost per SKU,SUm Cost,Date, Quote Id). The customer field is a text data type, the sum cost field is currency data type, date field is a date and time data type but it also set as a default value of Now(), and the quote Id field is an autonumber data type.
When I run the query, for example the query returns 3 rows because 3 different SKU’s were found. So it would look like this:
(CSTMR) (SKU) (QTY) (cost) (Sum Cost) (Date) (Quote ID)
ABC 5GH 1 $10 $10 Sep 7 1
BCD 2I7 4 $5 $20 Sep 7 2
EFG GH9 2 $4 $8 Sep 7 3

What I want is for the Quote ID to only be listed once. The quote ID is listed as many times as there are SKU's. Since this is all on the same quote i only want a 1 instead of it being listed as 1,2,3. Is there a way to make it so this quote ID is only listed once?

Let me know if this is clear enough. I would also wish for the Date to only be listed one as well.
Sep 7 '10 #3
NeoPa
32,556 Expert Mod 16PB
Kent, this is not about your query. It's about your design.

As you have it, it will not support what you want. You need to take a step back and consider what is appropriate for each of your tables (Yes. You need to store this data in separate tables. It doen't fit properly in a single table).

When you have the design sorted out you can look at queries to handle your requirements. Frankly though, when the design is right it should all be a lot easier to work with. The complication here is down to the lack of a match between the design and the data.
Sep 9 '10 #4

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

Similar topics

2
by: Eric Kincl | last post by:
Hello, I have an array of data in PHP. I would like to insert each member of the array into it's own row in SQL. The array is of variable length, so it would have to be dynamic code. How would...
0
by: Costa Lino | last post by:
Hi All, I have a DataSet with xml file and I want to make a querry like this DataView dv = new DataView(mytable); dv.RowFilter = " Impression < ( MaxImpressions) "; Impression et...
2
by: John | last post by:
Hi - I am trying to perform a simple append query, with no luck. I have a table (MktPrices) that has the following fields: BondID, PriceDate, Price. The objective is to allow the user to input a...
3
by: samearle | last post by:
Help me write this for MS access, I'm used to Oracle - SELECT Users.*, group_1, group_2, group_3 from (select UserInGroup.UserID, max(decode(GroupID, 1, GroupID, null)) as group_1,
5
by: Clownfish | last post by:
OK, I'm having a brain freeze. I have a table like this: Office Name Phone ---------------------------------- SG Larry 555-1212 SG Moe 553-4444 SG Curly ...
0
by: jon | last post by:
Hi there, I'm brand new to Access and may be trying to do too much too soon, but I wanted to get some expert advice on how the best way to go about what I am trying to accomplish would be. I...
2
by: franciscodg | last post by:
hi group: I have the following code: ....... ....... #MENU menuFile = wx.Menu() menuFile.Append(14, "E&xit","Sale del programa")
3
by: Neekos | last post by:
i have code that loops through a recordset and checks to see if a condition is true. If it's true, i want to send that record to a different table, but im having trouble doing so. i have: if x...
0
by: getmeidea | last post by:
I have the following tables, 1> employee_master(emp_id int primary key, emp_name varchar(100)); 2> employee_salary_payment(salary_rid int primary key, emp_id int, sal_date date, paid_amt int); ...
2
by: dipalichavan82 | last post by:
i came across a article, where it was mentioned if we want a dynamic querry to fire then use parameterized querry e.g. string inputcity=textbox.text; SqlCommand cmd = new SqlCommand("select * from...
0
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...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
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...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
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...

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.