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

Adding multiple Lines for data input

Hi all

Please help

I need to generate multiple lines (per employee per day)

3 tables
Employee - Empl No 001 John, empl No 002 Mary
Day - Day ID 12001 Jan 1 2012

The next table needs to be generated as follows:

Daily input Table
Record 1
Day No - 1201
Empl No - 001
Hrs in Office - 0
Hrs at client - 0
Hrs pers - 0

Record 2
Day No - 1201
Empl No - 002
Hrs in Office - 0
Hrs at client - 0
Hrs pers - 0

etc for each employee

These records would then be updated individually

Any ideas

Thanks
Mar 24 '12 #1

✓ answered by NeoPa

Use a simple APPEND query based on both other tables without any JOIN. This produces what you need, which is a Cartesian Product of the two tables. See SQL JOINs for more.

8 2096
NeoPa
32,556 Expert Mod 16PB
Use a simple APPEND query based on both other tables without any JOIN. This produces what you need, which is a Cartesian Product of the two tables. See SQL JOINs for more.
Mar 24 '12 #2
Thanks NeoPa

You got me onto the right track

I eventually used (without coding) the union option in the query (append)

Thanks muchly
Ivan
Mar 25 '12 #3
NeoPa
32,556 Expert Mod 16PB
When you say "the union option", are you referring to what I suggested or the SQL UNION statement. The latter would not do as you asked about. It would have a very different effect.
Mar 25 '12 #4
Yep the union after much playing is not correct

In the Select i have got the employee and day info up but not if i do an append to the daily input table - it says i need at least one destination field

I tried putting in field from there (joins (relationships)) then were included when i showed the table - but nothing happens - i cannot get all the records selected into the target database

I've tried a few things but have been unsuccessful

help...
Mar 26 '12 #5
as soon as i include the input table and sopecify the fields i want to append to - the append run will do nothing - whereas in select mode without the append (or the input table which i would like to append to - it brings up the correct data

2 issues

1 i think the problem is when i bring in a table that has joins in it (i have tried removing the relationships
2 it comes up with an error saying it is disabled
Mar 26 '12 #6
I have unblocked the location and it works now - thanks for all your help

Ivan
Mar 26 '12 #7
NeoPa
32,556 Expert Mod 16PB
I don't really understand the process you've been through, but it doesn't sound very much like what was suggested. If you post your SQL I'll tell you if you have got the right idea or not. If not I'll try to clarify for you what you need.
Mar 26 '12 #8
The problem that i had related to the blocked table - in the trust centre - i enabled it and exactly what you suggested worked - so thank you
Mar 26 '12 #9

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

Similar topics

14
by: JStrauss | last post by:
Hello, Can anybody give me some tips on the best and/or easiest way to display multiple lines in a field. The data is collected from a "textarea" field when the form is submitted, and I want to...
3
by: aurora | last post by:
This is an entry I just added to ASPN. It is a somewhat novel technique I have employed quite successfully in my code. I repost it here for more explosure and discussions. ...
1
by: Loading name... | last post by:
hey asp.net 2.0 In my db (sql server 2005) I have a record which consist of multiple lines: "HEY THIS IS A TEST OF MULTIPLE LINES"
5
by: dubing | last post by:
Hi, We have some html source like this: <div class="survey"> <form action="students/cbe-graduate-students/survey.html" method="post" id="frmPbSurvey"> <fieldset class="survey_item">...
7
by: =?Utf-8?B?TG9zdEluTUQ=?= | last post by:
Hi All :) I'm converting VB6 using True DBGrid Pro 8.0 to VB2005 using DataGridView. True DBGrid has a MultipleLines property that controls whether individual records span multiple lines. Is...
1
by: CapRand | last post by:
Hi, I am creating an ASP.NET site and have created a form which I have been able to dynamically with listboxes, labels etc from a database - using mainly form1.Controls.Add ..... Does anyone...
11
by: TechnoAtif | last post by:
INSERT AND UPDATE MULTIPLE CHECKBOX DATA USING PHPMYSQL OR JAVASCRIPT Hi All I want to check the multiple checkboxes update them after revisiting that page. I am taking the name as...
3
by: didi86 | last post by:
Please help me to adding multiple row at a time... // Last updated 2006-02-21 <script language="javascript"> function addRowToTable() { var tbl = document.getElementById('tblSample'); ...
0
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...
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
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
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
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...

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.