Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
INSERT INTO and SELECT
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Titre:
INSERT INTO and SELECT
Divers
Thread ID:
00034033
Message ID:
00034033
Vues:
75
I am convering a DB/2 Query Manager application. The application used the following code:

INSERT INTO PJL.HELTH_TMP
(DEDTYPE, MNPD, NAME, PRSNID, UNIT, DIV, DEPT, SUBDEPT,
EECLASCD, PRIORADJ, SSNO, SORTKEY, FAMSINGL, FRFAMSNG, DEDAMNT)
SELECT A.DEDTYPE, MNPD, NAME, PRSNID, UNIT, DIV, DEPT, SUBDEPT,
EECLASCD, PRIORADJ, A.SSNO, A.SORTKEY, FAMSINGL, FRFAMSNG, DEDAMNT)
FROM PJL.HELTHINS A
WHERE A.SSNO NOT IN
(SELECT B.SSNO
FROM PJL.HELTH_PRIORS_TMP B)

VFP 5.0 does not appear to support using a SELECT statment as an argument to the INSERT INTO statement. So I was thinking of trying this:

SELECT a.dedtype, mnpd, name, prsnid, unit, div, dept, subdept,;
eeclascd, prioradj, a.ssno, a.sortkey, famsingl, frfamsng, dedamnt,;
termcode, paidthru, addcode, adjamt, adjmonth, efctdate,;
a.user_comment;
FROM helthins_view a
WHERE a.ssno NOT IN (SELECT b.ssno ;
FROM helth_priors_tmp_view b);
INTO ARRAY aIns_Helth_Others
IF _TALLY > 0
INSERT INTO helth_tmp_view FROM ARRAY aIns_Helth_Others
ENDIF

My question is this: Will this work?! Will the insert into from array work wihout having to specify the field names? If this won't work, what is the alternative?

Jeff Rusch
UW-Madison
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform