Solved query data shift or move from clolumn to other

mhakim

Member
Local time
Today, 10:53
Joined
Jan 25, 2021
Messages
72
hi dears

good day

i am asking if i can


if there is null on column (name_english) then the yellow data move from (Chart_Name_English) column to the Null column

please look at PIC attached
 

Attachments

  • move data in query.PNG
    move data in query.PNG
    50.4 KB · Views: 270
Run an UPDATE action SQL

UPDATE tablename SET name_english = Chart_Name_English WHERE name_english IS NULL;

The data will be in both fields. Instead of actually copying the data, could just calculate this in a query (or textbox) when needed.

SELECT tablename.*, Nz(name_english, Chart_Name_English) AS EngName FROM tablename;
 
Last edited:
Run an UPDATE action SQL

UPDATE tablename SET name_english = Chart_Name_English WHERE name_english IS NULL;

The data will be in both fields. Instead of actually copy the data, could just calculate this in a query (or textbox) when needed.

SELECT tablename.*, Nz(name_english, Chart_Name_English) AS EngName FROM tablename;

where i can run this query

it give me message

operation must use updateble query

how can i use updateble query

i already have normal union select query as PIC

how do i run this SQL Statement to affect the query by new data
 
how do i run this SQL Statement to affect the query by new data
Create a new query by clicking query design tab
click on SQL View at the top left
enter the update query @June7 sent you, but change the table name to your own table name
save it.

The query will appear on the database window
you can then click it to run it.
 
What do you mean by "PIC"?
What exactly is the SQL statement you built?
Why is a UNION query involved? A UNION query is not an updateable dataset.
What are you really trying to accomplish?
 
hi dears

good day

i am asking if i can


if there is null on column (name_english) then the yellow data move from (Chart_Name_English) column to the Null column

please look at PIC attached
For your name_english column, you could try this.
Code:
NameEnglish: Nz([name_english], [chart_name_english])
 

Users who are viewing this thread

Back
Top Bottom