|
 |
asp_databases thread: update multiple records at one time
Message #1 by "HoayFern" <hoayfern.lee@d...> on Mon, 8 Oct 2001 10:44:56 -0700
|
|
Hi Everyone,
i have questions on updating multiple records at one time.
i have a form in table format like below:
EmpName Shift FromTime
ToTime ToTal Purpose Line
Hou Tai Siong(drop down) AM(drop down) Text box(user key in)
Text box Text box Text box text box
(user key in) (user key in)
here is part of my program:
Duraco Industries Pte Ltd Overtime Form
Department: Production
Day and Date: MonthJan Day1 Year2001
Name Department Shift From Time To Time Total Purpose Line
Supervisor
Hou Tai Siong PRODUCTION QC MORNING NIGHT 5 7 5B 8A
NewLine Line10+Silicon Supervisor
Lee Tong Sin Ng Kheng Loong PRODUCTION QC NIGHT MORNING
5 7 5B 8A NewLine Line10+Silicon Supervisor
Line 5
Tan Meng Boon PRODUCTION QC MORNING NIGHT 5 7 5B 8A
NewLine Line10+Silicon Supervisor
my questions :
1.. How can I insert multiple records at one time ?
2.. example: i wish to insert the EmpName:Hou Tai Siong and Lee Tong
Sin, Tan Meng Boon , Anwu or more than one employee at one time ?
3.. How can i insert the date for every employee ?
4.. Example: When the user select the date: October 8 2001, i want
this date insert to every employee like below:
5.. EmpName: Hou Tai Siong
6.. Dept:Production
7.. Date: October 8 2001
8.. Shift: Morning
9.. FromTime:1800
10.. ToTime:1900
11.. Total:1
12.. Purpose:OT
13.. Line:5
14.. For the second employee, the data also must be updated in this
way:
15.. EmpName: Lee Tong Sin
16.. Dept:Production
17.. Date: October 8 2001
18.. Shift: Morning
19.. FromTime:1800
20.. ToTime:1900
21.. Total:1
22.. Purpose:OT
23.. Line:5
24.. Please assists
thanks
hoay fern
Message #2 by David Cameron <dcameron@i...> on Mon, 8 Oct 2001 15:48:13 +1000
|
|
When you write an email, consider the effects of text wrapping. If my
answers are not clear this is likely to be a result of your wrapping.
answers in order.
1. You can't, unless you are looking at something like SELECT INTO.
2. see above.
3-24. execute a string that looks like this: UPDATE EmpName SET Dept
'Production', Shift = 'Morning' <rest of your fields>
The update statement will update all records in the table. To limit it add a
WHERE clause. I assume that you are familiar with the WHERE clause.
regards
David Cameron
nOw.b2b
dcameron@i...
-----Original Message-----
From: HoayFern [mailto:hoayfern.lee@d...]
Sent: Monday, 8 October 2001 3:52 PM
To: ASP Databases
Subject: [asp_databases] update multiple records at one time
Hi Everyone,
i have questions on updating multiple records at one time.
i have a form in table format like below:
EmpName Shift FromTime
ToTime ToTal Purpose Line
Hou Tai Siong(drop down) AM(drop down) Text box(user key in)
Text box Text box Text box text box
(user key in) (user key in)
here is part of my program:
Duraco Industries Pte Ltd Overtime Form
Department: Production
Day and Date: MonthJan Day1 Year2001
Name Department Shift From Time To Time Total Purpose Line
Supervisor
Hou Tai Siong PRODUCTION QC MORNING NIGHT 5 7 5B 8A
NewLine Line10+Silicon Supervisor
Lee Tong Sin Ng Kheng Loong PRODUCTION QC NIGHT MORNING
5 7 5B 8A NewLine Line10+Silicon Supervisor
Line 5
Tan Meng Boon PRODUCTION QC MORNING NIGHT 5 7 5B 8A
NewLine Line10+Silicon Supervisor
my questions :
1.. How can I insert multiple records at one time ?
2.. example: i wish to insert the EmpName:Hou Tai Siong and Lee Tong
Sin, Tan Meng Boon , Anwu or more than one employee at one time ?
3.. How can i insert the date for every employee ?
4.. Example: When the user select the date: October 8 2001, i want
this date insert to every employee like below:
5.. EmpName: Hou Tai Siong
6.. Dept:Production
7.. Date: October 8 2001
8.. Shift: Morning
9.. FromTime:1800
10.. ToTime:1900
11.. Total:1
12.. Purpose:OT
13.. Line:5
14.. For the second employee, the data also must be updated in this
way:
15.. EmpName: Lee Tong Sin
16.. Dept:Production
17.. Date: October 8 2001
18.. Shift: Morning
19.. FromTime:1800
20.. ToTime:1900
21.. Total:1
22.. Purpose:OT
23.. Line:5
24.. Please assists
thanks
hoay fern
Message #3 by "HoayFern" <hoayfern.lee@d...> on Mon, 8 Oct 2001 14:22:37 -0700
|
|
actually i have copy my coding, but i copy it into outlook express, it bcome
like this
hoay fern
----- Original Message -----
From: "David Cameron" <dcameron@i...>
To: "ASP Databases" <asp_databases@p...>
Sent: Sunday, October 07, 2001 10:48 PM
Subject: [asp_databases] RE: update multiple records at one time
>
>
> When you write an email, consider the effects of text wrapping. If my
> answers are not clear this is likely to be a result of your wrapping.
>
> answers in order.
>
> 1. You can't, unless you are looking at something like SELECT INTO.
> 2. see above.
> 3-24. execute a string that looks like this: UPDATE EmpName SET Dept
> 'Production', Shift = 'Morning' <rest of your fields>
>
> The update statement will update all records in the table. To limit it add
a
> WHERE clause. I assume that you are familiar with the WHERE clause.
>
> regards
> David Cameron
> nOw.b2b
> dcameron@i...
>
> -----Original Message-----
> From: HoayFern [mailto:hoayfern.lee@d...]
> Sent: Monday, 8 October 2001 3:52 PM
> To: ASP Databases
> Subject: [asp_databases] update multiple records at one time
>
>
> Hi Everyone,
>
> i have questions on updating multiple records at one time.
>
> i have a form in table format like below:
>
> EmpName Shift FromTime
> ToTime ToTal Purpose Line
> Hou Tai Siong(drop down) AM(drop down) Text box(user key in)
> Text box Text box Text box text box
>
> (user key in) (user key in)
>
> here is part of my program:
>
> Duraco Industries Pte Ltd Overtime Form
>
>
>
> Department: Production
>
> Day and Date: MonthJan Day1 Year2001
>
>
> Name Department Shift From Time To Time Total Purpose Line
> Supervisor
> Hou Tai Siong PRODUCTION QC MORNING NIGHT 5 7 5B 8A
> NewLine Line10+Silicon Supervisor
> Lee Tong Sin Ng Kheng Loong PRODUCTION QC NIGHT MORNING
> 5 7 5B 8A NewLine Line10+Silicon Supervisor
> Line 5
> Tan Meng Boon PRODUCTION QC MORNING NIGHT 5 7 5B 8A
> NewLine Line10+Silicon Supervisor
>
>
>
>
> my questions :
> 1.. How can I insert multiple records at one time ?
> 2.. example: i wish to insert the EmpName:Hou Tai Siong and Lee Tong
> Sin, Tan Meng Boon , Anwu or more than one employee at one time ?
> 3.. How can i insert the date for every employee ?
> 4.. Example: When the user select the date: October 8 2001, i want
> this date insert to every employee like below:
> 5.. EmpName: Hou Tai Siong
> 6.. Dept:Production
> 7.. Date: October 8 2001
> 8.. Shift: Morning
> 9.. FromTime:1800
> 10.. ToTime:1900
> 11.. Total:1
> 12.. Purpose:OT
> 13.. Line:5
> 14.. For the second employee, the data also must be updated in this
> way:
> 15.. EmpName: Lee Tong Sin
> 16.. Dept:Production
> 17.. Date: October 8 2001
> 18.. Shift: Morning
> 19.. FromTime:1800
> 20.. ToTime:1900
> 21.. Total:1
> 22.. Purpose:OT
> 23.. Line:5
> 24.. Please assists
> thanks
>
> hoay fern
|
|
 |