copy from one field to another

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have several tables that I am working with

1 table has a field (dgof_cd) that stores the type of offense IE.. F1, F2,
F3, M1, M2, M3

I have another table that has a field (asacgp_cd) that has the group
information
IE.. F1/2, F3, M1, M2, M3 AND SO ON.

I would like to know how do I make a expresion that would move the (dgof_cd)
field to the (asacgp_cd) group.

I know this is not code but this is what I want to get at

IF [DGOF_CD] = [ASACGP_CD] THEN COPY TO [ASACGP_CD]

ANY HELP WOULD BE GREAT.
 
Have both tables Records?

Or do you want to add the Data from Field dgof_cd to the other table in
field asacgp_cd?

- Raoul
 
I would like to add the data from dgof_cd to the other. Thanks

JaRa said:
Have both tables Records?

Or do you want to add the Data from Field dgof_cd to the other table in
field asacgp_cd?

- Raoul

ESTEVES JOSE said:
I have several tables that I am working with

1 table has a field (dgof_cd) that stores the type of offense IE.. F1, F2,
F3, M1, M2, M3

I have another table that has a field (asacgp_cd) that has the group
information
IE.. F1/2, F3, M1, M2, M3 AND SO ON.

I would like to know how do I make a expresion that would move the (dgof_cd)
field to the (asacgp_cd) group.

I know this is not code but this is what I want to get at

IF [DGOF_CD] = [ASACGP_CD] THEN COPY TO [ASACGP_CD]

ANY HELP WOULD BE GREAT.
 
INSERT INTO DestinationTable (asacgp_cd) SELECT dgof_cd FROM SourceTable

if dgof_cd contains doubles for the tables then you should use

INSERT INTO DestinationTable (asacgp_cd) SELECT DISTINCT dgof_cd FROM
SourceTable

You can alse add criteria by adding a WHERE clause

INSERT INTO DestinationTable (asacgp_cd) SELECT DISTINCT dgof_cd FROM
SourceTable WHERE dgof_cd="F1"

- Raoul

Jose Esteves said:
I would like to add the data from dgof_cd to the other. Thanks

JaRa said:
Have both tables Records?

Or do you want to add the Data from Field dgof_cd to the other table in
field asacgp_cd?

- Raoul

ESTEVES JOSE said:
I have several tables that I am working with

1 table has a field (dgof_cd) that stores the type of offense IE.. F1, F2,
F3, M1, M2, M3

I have another table that has a field (asacgp_cd) that has the group
information
IE.. F1/2, F3, M1, M2, M3 AND SO ON.

I would like to know how do I make a expresion that would move the (dgof_cd)
field to the (asacgp_cd) group.

I know this is not code but this is what I want to get at

IF [DGOF_CD] = [ASACGP_CD] THEN COPY TO [ASACGP_CD]

ANY HELP WOULD BE GREAT.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top