How to fill many records with some value at a time?
please, see the attached screen shot that shows my question
i wanted to fill some value for many record in Field2.
how can i do that? do i need to fill them one by one?
regards
Jamal
How to fill many records with some value at a time?
please, see the attached screen shot that shows my question
i wanted to fill some value for many record in Field2.
how can i do that? do i need to fill them one by one?
regards
Jamal
You don't have to do it manually.
What rows do you want to put the new value in Field2?
All rows?
Only specific rows?
Thank you Robeen for the answer.
i wanted to put a new value for specific records (selected ones) at a time as shown in screen shot.
For example, in ArcGIS software, we can add some value for the selected records at a time.
how can we do the same in Access?
regards
Jamal
Are you wanting to put the same value into all your selected records?
What value in each record will let us know that this is a record into which you want to add a value in another field?
For example, i need to add the same "city" for all the selected records, and in this case, all the selected records in the Field2 will take the value "Ramallah"
is it possible in Access to fill the value "Ramallah" (same value) for all selected records at a time (all together)?
regards
Jamal
Yes - it IS possible to fill a value - like "Ramallah" - into as many records as you want - at the same time.
BUT
You have to tell Access WHICH rows you want that value put into.
For instance - if you wanted to put City = "Ramallah" into all rows of data where there is no value in the 'City' field you can run an INSERT query that looks something like this:
Insert into [TableName](City) Values ("Ramallah") Where [TableName].[City] Is Null
However - if all rows that you want to put City = "Ramallah" into don't have anything in common with each other [like all are Null in the City field, or some other common value in all the rows] - then you cannot do this.
Sorry for the confusion in this thread.Yes - it IS possible to fill a value - like "Ramallah" - into as many records as you want - at the same time.
BUT
You have to tell Access WHICH rows you want that value put into.
For instance - if you wanted to put City = "Ramallah" into all rows of data where there is no value in the 'City' field you can run an INSERT query that looks something like this:
Insert into [TableName](City) Values ("Ramallah") Where [TableName].[City] Is Null
However - if all rows that you want to put City = "Ramallah" into don't have anything in common with each other [like all are Null in the City field, or some other common value in all the rows] - then you cannot do this.
please, see the screen shot that shows my question
in filling the a database table, it happens that many records in Field1 have the same value in Field2. in this case, do i need to fill the records of Field1 that have the same value in Field2 one by one?
is this practical?
regards
Jamal
Wait . . .
Your last screenshot shows Table13 that HAS cities and Table12 does not.
Are you asking me if you can copy and paste the values from one Table to another?
OR
Are you asking if it is possible to put values in using an INSERT query?
I'm sorry. It is difficult for me to understand because of the language.
![]()
Thank you Robeen.Wait . . .
Your last screenshot shows Table13 that HAS cities and Table12 does not.
Are you asking me if you can copy and paste the values from one Table to another?
OR
Are you asking if it is possible to put values in using an INSERT query?
I'm sorry. It is difficult for me to understand because of the language.
It frequently happens that we can't express what we need to do and this is why i try to attach screen shot in each single post.
Suppose that we have Table13 as Hard Copy! and we need to fill its value in table12. In this case, we have 6 records that to have the value "Ramallah" and other 2 values that have the value "Hebron".
my question: what is the best way to fill the Table12 with these values?
do we need to copy and paste the value "Ramallah" 6 times? and the value "Hebron" two times?
this question is all about data entry!
appreciated
regards
Jamal
Down load the attached DB
The task can be very easily done by Update query as shown in your own data base
Run the update query to duplicate the data from Table13 to Table12.
Study the update query properly
Hope this will solve your problem.
Thank you MANN. this is very useful.
regards
Jamal
Jamal said that Table 13 was in hard copy:
. . . I assume 'Hard Copy' to mean . . . 'on paper'.Suppose that we have Table13 as Hard Copy! and we need to fill its value in table12.
But the screenshot shows Table 13 already in the database.
You are right Robeen.
What i made is just a sample of what we may have in Hard Copy"! Just to illustrate the idea behind my thread.
many thanks
regards
Jamal
In that case, you have two options.
1. Use an update query for each value you want to add to your table12.
Eg:
I created a query top update Table1 in your DB using this SQL.
It put "Ramallah" in Field2 of the first two records of the Table.Code:UPDATE Table1 SET Table1.[Field2] = "Ramallah" WHERE Table1.[ID] In (1009,1209)
You can put in many more IDs in there - so that you can fill more fields at once.
Or you can try this [which will update Field2 in the first 4 rows of Table1 with "Ramallah":
ORCode:UPDATE Table1 SET Table1.Field2 = "Ramallah" WHERE Table1.[ID] Between 1009 AND 1598;
You can Copy & Paste - but it will be tedious.
First Type Ramallah in one field.
Then Copy it and paste it in the next field.
Then select both fields that have Ramallah.
Then paste THAT into two more fields . . .
. . . good luck!!!
I hope you don't have a LOT of this to do.
Using the Update should be a lot quicker - I think - but you'll still have to put all the criteria [either the 'in' - or the 'Between' values] into the query.
I hope this helps!!
Clever work a round Robeen. Useful notes to follow. Many thanks.In that case, you have two options.
1. Use an update query for each value you want to add to your table12.
Eg:
I created a query top update Table1 in your DB using this SQL.
It put "Ramallah" in Field2 of the first two records of the Table.Code:UPDATE Table1 SET Table1.[Field2] = "Ramallah" WHERE Table1.[ID] In (1009,1209)
You can put in many more IDs in there - so that you can fill more fields at once.
Or you can try this [which will update Field2 in the first 4 rows of Table1 with "Ramallah":
ORCode:UPDATE Table1 SET Table1.Field2 = "Ramallah" WHERE Table1.[ID] Between 1009 AND 1598;
You can Copy & Paste - but it will be tedious.
First Type Ramallah in one field.
Then Copy it and paste it in the next field.
Then select both fields that have Ramallah.
Then paste THAT into two more fields . . .
. . . good luck!!!
I hope you don't have a LOT of this to do.
Using the Update should be a lot quicker - I think - but you'll still have to put all the criteria [either the 'in' - or the 'Between' values] into the query.
I hope this helps!!
regards
Jamal