Jean-Christophe Deschamps-3 wrote:
>
>
>>Newbie here. i'm trying to insert multiple values into a table by a
>>certain
>>date and when I use where clause it fails. This is my code "insert
>>into db
>>(table) values ('value') where date = 'date range'". Thanks for any help.
>
> There is no where clause in insert statements, it wouldn't make sense.
> Your insert should look like:
>
> insert into mytable (datecolumn) values
> (litteral_date_in_the_format_you_choose);
>
> See http://www.sqlite.org/lang_insert.html
>
> _______________________________________________
> sqlite-users mailing list
> [email protected]
> http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
>
>
My date column is set when the program starts and i do not want it to
change. So I have my <dbname> with <mytable> and two columns <date> and
<value column>. I have say 5 values (1 2 3 4 5) that I wanted inserted
into mytable where the date is equal to date that was preset my starting the
program. So a select of my table would look like this:
select * from mytable where date='2011/04/18 21:35:33';
2011/04/18 21:35:33|1
2011/04/18 21:35:33|2
2011/04/18 21:35:33|3
2011/04/18 21:35:33|4
2011/04/18 21:35:33|5
--
View this message in context:
http://old.nabble.com/insert-help-tp31429185p31433593.html
Sent from the SQLite mailing list archive at Nabble.com.
_______________________________________________
sqlite-users mailing list
[email protected]
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users