I'm new to database and form builder .
I'm getting:
Error 103 at line 10, column 2
Encountered the symbol "SELECT"...
Whats the correct syntax for that please?
INSERT INTO vehicle (
vehicleid, reg_no, year, fuel,
engine_capacity, transmission, seat_capacity, rice_per_day,
modelid, policy_id, type_name, color
)
VALUES (:vehicle_block.id,
:vehicle_block.reg_no,
:vehicle_block.year,
:vehicle_block.fuel,
:vehicle_block.cc,
:vehicle_block.transm,
:vehicle_block.seat,
:vehicle_block.price_p_day,
(SELECT modelid
FROM model m
WHERE m.make = :vehicle_block.make
AND m.mode_name = :vehicle_block.model),
:vehicle_block.policy,
:vehicle_block.type,
:vehicle_block.color);
COMMIT;
INSERT INTO .... SELECT :VEHICLE_BLOCK.ID, :VEHICLE_BLOCK.REG_NO, :VEHICLE_BLOCK.YEAR, :VEHICLE_BLOCK.FUEL, :VEHICLE_BLOCK.CC, :VEHICLE_BLOCK.TRANSM, :VEHICLE_BLOCK.SEAT, :VEHICLE_BLOCK.PRICE_P_DAY, MODELID, :VEHICLE_BLOCK.POLICY, :VEHICLE_BLOCK.TYPE, :VEHICLE_BLOCK.COLOR FROM model M WHERE m.make = :VEHICLE_BLOCK.MAKE AND m.model_name = :VEHICLE_BLOCK.MODELif sure thatmakeandmodel_namecombination always returns single row.:vehicle_block.idisn't a bind variable. VEHICLE_BLOCK represents block name (region in Apex), while ID represents field (item in Apex) that belongs to that block. Colon in front of it is part of Forms' syntax (something like :P1_ID in Apex).:vehicle_block.idrepresents.