Can anyone suggest why the below results in 'Error: near line 1: near "INSERT": syntax error'?
read -p "Other notes: " WINENOTESother_notes
if [[ -z "$WINENOTESother_notes" ]]; then
WINENOTESothernotes=null
fi
sqlite3 $DBFILE << EOF
BEGIN TRANSACTION
INSERT INTO wines VALUES (null, '$WINEdate', '$WINEformat', '$WINEtype', '$WINEvineyard', '$WINEyear', '$WINEregion', '$WINEname', '$WINEgrape1', '$WINEgrape2', '$WINEgrape3')
INSERT INTO winenotes VALUES (null, LASTINSERT_ROWID(), '$WINENOTESnotes_date', '$WINENOTESnose', '$WINENOTEStaste', '$WINENOTESratingof10', '$WINENOTESrating_justification', '$WINENOTESother_notes')
COMMIT TRANSACTION;
EOF
fi