In a bash script was having no luck with

MYTEXT="my text \n to be insert with two \n new lines";
sqlite3 mydb.db "INSERT INTO myTable VALUES('value1', 'value2', '$MYTEXT')";

because it was literally putting the \n into the database when it should have literally been a new line. This was solved by

MYTEXT=`echo -e "my text \n to be insert with two \n new lines"`;
sqlite3 mydb.db "INSERT INTO myTable VALUES('value1', 'value2', '$MYTEXT')";

the -e on the echo allows for the new line characters to be interpreted as new lines as opposed to just a backslash and an n.