Jump to content

Merge and aggregate datasets: Difference between revisions

Harbour: allow multiple INSERT values
(Harbour: allow multiple INSERT values)
Line 801:
<syntaxhighlight lang="xbase">
&& SQL-like INSERT command (note the variable number of arguments)
#xcommand INSERT INTO <table> ( <uField1>[, <uFieldN> ] ) VALUESVALUE ( <uVal1>[, <uValN> ] ) => ;
<table>->(dbAppend()); <table>-><uField1> := <uVal1> [; <table>-><uFieldN> := <uValN> ]
#xcommand INSERT INTO <table> ( <uFieldList,...> ) VALUES ( <uValList1,...> ) [, ( <uValListN,...> )] => ;
INSERT INTO <table> ( <uFieldList> ) VALUE ( <uValList1> ) ;
[; INSERT INTO <table> ( <uFieldList> ) VALUE ( <uValListN> )]
 
PROCEDURE Main()
Line 812 ⟶ 815:
pStruct := {{"patient_id", "n", 8, 0}, {"lastname", "c", 10, 0 }}
dbCreate( "patient", pStruct,, .T., "patient" )
INSERT INTO patient (patient_id, lastname) VALUES (1001, "Hopper"), (2002, "Wirth"), ;
INSERT INTO patient (patient_id3003, lastname"Kemeny"), VALUES(4004, "Gosling"), (20025005, "WirthKurtz")
INSERT INTO patient (patient_id, lastname) VALUES (3003, "Kemeny")
INSERT INTO patient (patient_id, lastname) VALUES (4004, "Gosling")
INSERT INTO patient (patient_id, lastname) VALUES (5005, "Kurtz")
INDEX ON patient_id TO pat_id
136

edits

Cookies help us deliver our services. By using our services, you agree to our use of cookies.