Splitting A Row In A Table Into 2 Or More Rows?

Apr 5, 2012

I am working on a project that requires to calculate interest on the amount. There are 2 tables, 1 with Interest rate for a product for different and periods and another is product table with amounts in different period.

Table 1 (Rates table)

Product From To Rate
1111 1/1/2012 1/20/2012 .75
1111 1/20/2012 1/28/2012 .50
1111 1/28/2012 4/6/2012 .40

Table 2 (Product table)
Product From To Amount
1111 1/1/2012 1/17/2012 10000
1111 1/17/2012 1/24/2012 15000
1111 1/24/2012 2/25/2012 20000

What i need to do is to calculate interset based on the above 2 table and insert into another table (Interest). However, the problem is with identifying correct rates for the periods in Table 2.

Eg.

for period 1/1 to 1/17: applicable rate would be .75

for period 1/17 to 1/24: From 1/17 to 1/20 the rate would be .75 and from 1/20 to 1/24 it would be .50

this is what i want to achieve, basically to split the period between 1/17 to 1/24 into 2 so that appropriate rate can be applied.

View Replies


ADVERTISEMENT

Splitting A Field Into Many Rows

Feb 1, 2006

Hi all,

I have a problem this is part of my database

ID NAME DATARANGE ck1 ck2
1 dave 23-Jan-06,24-Jan-06,30-May-06 dataprojector s/table
2 John 23-Feb-06,24-Mar-06,30-Apr-06 s/table

What i would like to do is to run an maketable / updatetable query that splits out the daterange dates into seperate rows and also if there is a value in ck1 or ck2 replace the current value with either a 1 or 0.

So the above table would look like this.

ID NAME DATARANGE ck1 ck2
1 dave 23-Jan-06 1 1
2 dave 24-Jan-06 1 1
.
.
.
?? John 23-Feb-06 0 1
John 24-Mar-06 0 1

ETC

is this possible any help would be greatful

Thanks

Dave

View 3 Replies View Related

General :: Splitting Quantity Into Separate Rows

Mar 5, 2013

I have a query that holds info for a WORK ORDER FORM. E.G The work order requests 3 staff member.

Is there a way to have a separate table or query split this quantity into three rows so i can assign an employee to each request?

I sometimes get requests for 20-30 staff and dont really want to add lines manually.

View 1 Replies View Related

Splitting A Table

Sep 7, 2006

Hi, i have a table that has contact information in.

It has contact name, number etc and company.

Quite alot have the same company. I was hoping to split the table into two, a company and contact table which are linked. I've been thinking about this and not too sure how to go about it.

Anyone have any ideas?

Matt

View 1 Replies View Related

Need Help Splitting A Table

Oct 11, 2006

hi!

i got a table containing info of 2 different products. and now i would like to split it so that each table only for 1 product.

but there is query based on the original table, the question is after splitting, and updating the query, the form doesn't work properly any longer...

a bigger problem is the form created based on that query has loads of vb code doing quotation, so it is costly to remake it...

thanks in advance

View 1 Replies View Related

Splitting A Table For Security

Jun 19, 2006

I'm on a project to build a database for the stores in our area. Things like managers, banks, and partners obviously should be in seperate tables. Most of the information though, seems to belong directly in a table of stores. Basically each record is a store and there will be very many attributes per record (about 30+). Some attributes only relate to certain departments and only someone from that department should see that info. If I broke up the big table into smaller tables it would be the same information but every table would have to have the store number to link it all back together. From a design standpoint this is bad because the store number is redundant.

So my question is, is it a good idea to split up the table for security purposes?

My main concern is security, I can take a hit on performance or storage.

View 1 Replies View Related

Splitting Data In A Table

Oct 11, 2006

I have one table with the following fieldsName, Address1, Address2, Postcodewhen data has been imported from Excel I have found error in the data entryie the excel spreadsheet contain Name, but the address has been entered into the Address1 field now I need to split into Address1 and Address 2. Please Help:confused:. I am beginner to access have never used VBA only some queries. So sorry but I will need to know exactly how to do it. Thanks so very much for your help. Sometimes a comma seperates the address but sometimes just a space

View 4 Replies View Related

Splitting A Large Table Into Many Smaller Ones

Mar 17, 2005

Hi,

To avoid the mind-numbing tedium of have to use make-table queries loads of times, is there a quick (probably VBA-related) way to split a large Access table, of about 350000 records, down into 93 smaller tables, based on a key code field that identifies each group of records e.g. GBW102, GBE999, etc?

Any help much appreciated.

thanks,

Alex

View 7 Replies View Related

Tables :: Splitting Attachment Field From Table

Jul 4, 2013

I have a database composed of personal statistics. (name, age, height, wt, etc). I have two attachment fields. Photos and Videos. Each of these fields can contain more that one file. The size of the video attachments is starting to get me up close to the 2 GB database limit. If each attachment field contained only one file, I would convert the fields over to a path link. I'm stumped on how to move the files out of the main database to control the size, but maintain the multi-file link to my forms. How to restructure this?

View 4 Replies View Related

Splitting Table Into Related Table

Jan 14, 2008

okay, last question. I promise. You all have been so helpful, though...

I have been given the assignment of splitting down a table into two more tables(three in total). My question is this: Could I use the Table analyzer? If so, what are the shortcomings? I would like to have the other tables referenced by the key of the original table instead of a lookup field, whioch I'm not sure if I can do in the analyzer. What attracts me to the analyzer is that it would make the needed queries to join the new tables. If I don't use the analyzer, would I use a make table query to accomplish it? If so, would I have to change every existing query in the database that used that old table?

I know it's a lot, but any help in pointing me in the right direction would be much appreciated

View 1 Replies View Related

Tables :: Splitting Table Into Multiple Sets Based On Row Count

Oct 5, 2012

I want to split a table into multiple sets based on rowcount. Suppose I have a table having 10,000 records. I want different sets which should have values based on rowcount. Suppose if I select set 1 then the table should populate records from 1-2500. If I select set 2 then the table should automatically give the records from 2501-5000. If i select set3 then the table should have values from 5001-7500 and so on.

View 3 Replies View Related

Modules & VBA :: Split Table Record Into Multiple Records / Rows In A New Table

Nov 10, 2014

In a situation where I imported an excel file with so many columns and split them into two temp tables and they are linked using a key.

the data has a fixed part lets say

Field1....Field2.....Filed3.....Field4...then Field5.....Field6.....Field7....Field8 is the same data range as Field9...Field10...Field11...Field12. I would want to split this data into multiple rows like this

Field 1 Field2 Field3 Field4 Field5 Field6 Field7 Field8
Field 1 Field2 Field3 Field4 Field9 field10 field11 field12 and so own...

What is the best approach?

View 3 Replies View Related

Modules & VBA :: Add Rows To Table Based On Record Count Of Another Table

Mar 10, 2015

I am trying to assign teams to players. I have an import table with all of the players information listed. What I want to do is determine the count of players in a given city. For every 9 players I want to add a new record to the Team table and assign the team number (auto incremented for each team created). Then I want to add the players to the Players table with the Team Number that was created.

View 8 Replies View Related

Delete All Rows In Master Table If Identical In Second Table - SQL

Jan 13, 2006

A SELECT works:

SELECT *
from mastertable
INNER JOIN secondarytable
ON mastertable.Identicalfield = secondarytable.Identicalfield

But none of these do:

DELETE
FROM mastertable
INNER JOIN secondarytable
ON mastertable.Identicalfield = secondarytable.Identicalfield
**Incorrect syntax near the keyword 'INNER'.**

DELETE
FROM mastertable JOIN secondarytable
ON (mastertable.Identicalfield = secondarytable.Identicalfield)
**Incorrect syntax near the keyword 'JOIN'.**

DELETE
FROM mastertable
WHERE (mastertable.Identicalfield = secondarytable.Identicalfield)
**The column prefix 'secondarytable' does not match with a table name or alias name used in the query.**

DELETE
FROM mastertable
WHERE IN (SELECT *
FROM secondarytable)
**Incorrect syntax near the keyword 'IN'.**

Can anyone help? This should be easy, shouldn't it?!
Thank you.

View 2 Replies View Related

Adding Rows From A Similar Table To Preexisting Table

Sep 19, 2013

I'd like to learn how to do them quickly and effectively in Access. One of those things seems like it would be an incredibly simple, intuitive operation, but it's not, at least not to me.Say I have some data that really should only be on one table, but it's currently on two tables in Access: "List Main" and "List September Adds." They both have the following fields: "Full Name" "Email" "Address" "City" "State" "ZIP" "Phone."

The first table is my main list of contacts. The second contains new info, consisting of 1. a few new contacts, and 2. updated info for a few of the contacts already in table "List Main."

I would simply like to put all the new contacts from "List September Adds" into my "List Main" table, and I'd also like to fill in a few missing e-mails in "List Main" with newly gathered e-mails for those contacts, info that is in my table "List September Adds."I'm sure there is built-in functionality to do something as basic as essentially turning two pages of the same spreadsheet into one. In fact, I know I could import data from an Excel file and have it "append" to a preexisting table if the fields are all the same.

However, I'd like to know how to do it when the tables are already in Access (without having to learn any SQL, mostly because I'm fairly certain I don't need to know SQL to do something like this). I've heard of Append and Update Queries and given their names, it sounds like they'd be useful, maybe with use of "Totals" and "Group By" to get rid of duplicates; however, I can't seem to get any of this to work right.

Mostly, when I think I am doing an Append correctly, it doesn't add new data at the bottom of a table; it just wipes out all the data that was there, and replaces it with data from the source. For instance, when I've been running an Append Query to get my "List September Adds" rows into my "Main List" table, what I end up with is only the "List September Adds" rows, and all the "Main List" rows gone.

View 7 Replies View Related

Run Out Of Table Rows

Jun 1, 2007

The following is for a successful pet grooming business.

I have a Customer Table with a Customer ID as primary key. I have a Pet Name Table with a Pet ID as primary key. One customer can have many pets. The Pet Table is linked to the Customer Table via the Cust ID. I have a Visit Table with an Auto Number for each visit. The Visit Table is linked via the Pet ID number. Each pet can have many visits. That's the problem. We have exceeded the 64,000 rows in the Visit Table. All three linked tables support all the queries, forms and reports. How can I continue beyond 64,000 visits.
Thanks, Jed

View 10 Replies View Related

Max # Rows In A Table

Jun 14, 2007

I tried to search for the answer but not luck. I know there is a max size around 2gb for a DB but is there a row limit for a table or is it based upon size?

View 4 Replies View Related

How To Delete Rows From Table?

Nov 7, 2006

Hi.
How I can delete all rows from my table whit on query? Also I want that when I delete rows from my table index and other settings will stay in table.

View 1 Replies View Related

Select Last 4 Rows Of A Table

Dec 17, 2004

Is there any way to get the last 4 rows which have been entered into the table?

Thank You.

View 2 Replies View Related

Compare Rows In A Table

Nov 14, 2005

Hi,

I have a table with four columns - A, B, C, D
I want to compare the values in columns A, B and C in row 1, with the values in row 2 and if they are the same, I want to copy the value that is in column D in row 1 into column D in row 2. I then want to move to the next row in the table and compare the values in row 2 with the values in row 3 in the same way. This will continue for all rows in the table.

Any help would be greatly appreciated as my VB is not up to much.


Thanks in advance

View 2 Replies View Related

Cannot See All Rows In Access Table

May 2, 2012

My work has a sql server db, and all the tables in our Access db is linked to them for reporting reasons for the secretaries. Why all the rows for one table are not showing up in Access?

I go into SQL Server Management Studio and I can see all the rows, then when I try to go into Access 2010, I cannot see all the rows. I have already updated the table in Access through the Linked Table Manager. However, nothing changes.

View 3 Replies View Related

86,87,89,113; Strange Jump In Table Rows...

Sep 19, 2006

Hokay, so I have a very simple little database which has been written to make my job a little easier by logging the details of certain calls.
Everything on it seems to work fine, but there is one piece of strange behaviour that I just can't fathom...

I currently have 89 records stored (these were ported over from the old Excel table I used to use to log the calls). They imported just fine, and I can manipulate them as required. However, if I go to add a new record the next rwo to be added is 113 for some inexplicable reason. I can still add the record fine, and add subsequent ones as records 114,115,116, etc., but what I don't understand is why Access thinks the record number that comes after 89 is 113!

The table looks - to all intents and purposes - fine; just with its last rows going from 89 to 113 without listing 90-112 in between.

So...um...where are my missing records, and why does Access seem to think that 113 logically follows 89???

View 10 Replies View Related

Form Populates Two Rows In Table

Mar 13, 2008

Anyone know why the following would happen:

I have a form that is linked to a single table. For some reason some controls populate one line in the form and others populate another line.

Each time I complete the form it creats two records with some data in one row and other data in another row.

View 1 Replies View Related

How To Delete Duplicated Rows From Table

Oct 19, 2006

Hi
I have to make a query which deletes duplicate rows from my table. How I should start to make it? Can I do it whit one query or does this operation needs more queries? I know that DISTINCT works but how I can set it to DELETE operation?
I have try to use command DELETE DUPLICATES FROM Table; but this command deletes all rows from table why?

View 1 Replies View Related

How Do I Count Number Of Rows In Table...

Oct 4, 2004

I need to do a count of the total number of rows in a table or query. Say I have a table with 7 records, I want to be able to get total number of rows instead of the sum of the row and save it to some other table.

View 5 Replies View Related

Only Updating New Rows In Duplicate Table

Jun 5, 2007

Good morning to you all.

I have a problem that I thought would be quite simple......
But 3 days later I am still trying.

I have a form which populates a table by one set of users (Simple enough) they can only add records.

I also have another set of users who want to access that table through a similar form but with a couple of added fields.
They will not be able to change anything only add their comments to what they see in the new fields supplied. Once this has been done it cannot be edited ever.

So I made a "Make Table Query" and added 2 new fields to that, so when I clicked on the query it came me the last update from the previous table. Problem was everything that was added in the extra fields were deleted!!!!

I would like to update the 2nd table with items that have been newly added to the first table, leaving all the items on the second table the way they were!!!!!!!

Anyone got any ideas please

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved