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

update sql statements using loops

29
hi
is it possible to have an sql statement with a loop. i am trying to update several fields at once based on a form.
the criteria would be that if the value on the current form is the same value in another table, then set field to .....
Apr 21 '07 #1
3 1465
MMcCarthy
14,534 Expert Mod 8TB
hi
is it possible to have an sql statement with a loop. i am trying to update several fields at once based on a form.
the criteria would be that if the value on the current form is the same value in another table, then set field to .....
A lot more information is required. Can you give a more detailed explanation of exactly what you are trying to do and when and where it's triggered.
Apr 21 '07 #2
Shokoth
29
i have a listbox with employee details, and it is in a form that allows a manager to assign employees to a particular job.
so when the manager double cicks the list, the employee that he has just clicked, the name on the employee is added to the form, an is added to employee one. once the manger clickes the list again, that employee is added to the form, on the text box employee 2, and so on.

firstly i am not sure how that would be done, weather a loop statement is required or an if statemnet is required.


also after an employee has been added, he should be reomoved from that list, and the employee table is updated, by changing the 'Available' field from true to false, for all the employees that have jus been added.

is that possible?
Apr 21 '07 #3
MMcCarthy
14,534 Expert Mod 8TB
i have a listbox with employee details, and it is in a form that allows a manager to assign employees to a particular job.
so when the manager double cicks the list, the employee that he has just clicked, the name on the employee is added to the form, an is added to employee one. once the manger clickes the list again, that employee is added to the form, on the text box employee 2, and so on.

firstly i am not sure how that would be done, weather a loop statement is required or an if statemnet is required.


also after an employee has been added, he should be reomoved from that list, and the employee table is updated, by changing the 'Available' field from true to false, for all the employees that have jus been added.

is that possible?
Having multiple fields for an employee is structurally unsound. These should be put in another table and added using a subform.
Apr 24 '07 #4

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

Similar topics

1
by: jstreet10 | last post by:
How would i use function statements instead of loops(for) in this code? i have tried some, but not working. # this program is suppose to read fm a file, computes the average and reads fm a...
4
by: Rustam Bogubaev | last post by:
Hi, I have a table with the following columns: ID INTEGEDR, Name VARCHAR(32), Surname VARCHAR(32), GroupID INTEGER, SubGroupOneID INTEGER, SubGroupTwoID...
3
by: Nipon | last post by:
Hi, I am using MS SQL Server 7.0 SP2 in Windows 2000 server SP4. I have one-to-many tables (TABLE_HEAD and TABLE_DETAILS)which I am going to update by using a stored procedure with UPDATE...
9
by: Vorpal | last post by:
Here is a small sample of data from a table of about 500 rows (Using MSSqlserver 2000) EntryTime Speed Gross Net ------------------ ----- ----- 21:09:13.310 0 0 0 21:09:19.370 9000 ...
16
by: Philip Boonzaaier | last post by:
I want to be able to generate SQL statements that will go through a list of data, effectively row by row, enquire on the database if this exists in the selected table- If it exists, then the colums...
3
by: Josué Maldonado | last post by:
Hello list, I have 7.3.4 on RH 8, server hardware is a dual processor Intel Xeon 2.4 Ghz, 2G RAM, 27Gb HD available on postgres partition. Table cost2est2003 with 99350 recs is described as:...
4
by: Ed L. | last post by:
I think I'm seeing table-level lock contention in the following function when I have many different concurrent callers, each with mutually distinct values for $1. Is there a way to reimplement...
39
by: slogging_away | last post by:
Hi - I'm running Python 2.4.2 (#67, Sep 28 2005, 12:41:11) on win32, and have a script that makes numerous checks on text files, (configuration files), so discrepancies can be reported. The script...
9
by: John Salerno | last post by:
One of the things I learned with C# is that it's always better to handle any errors that might occur within the codes itself (i.e. using if statements, etc. to catch potential out of range...
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...
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
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
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...
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,...

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.