[sqlite] Trigger Question

2017-10-12 Thread Stephen Chrzanowski
I'm setting up a resource string to drop, recreate, and repopulate a table to use as a type of default values for colors on the UI. Essentially a default set of priority levels and FG/BG colors associated with that priority color. The table schema is as such: CREATE TABLE [ColorScheme](

Re: [sqlite] Trigger question

2012-12-30 Thread Simon Slavin
On 30 Dec 2012, at 7:37pm, Igor Korot wrote: > This would've worked if the string will be the same, i.e. "abc def" > and "abc def". > However they are not. One is "abc def", another "def abc". > So from the uniqueness point of view they are different. > > Basically I'm

Re: [sqlite] Trigger question

2012-12-30 Thread Keith Medcalf
and accent sensitive. Sent from Samsung Mobile Original message From: Simon Slavin <slav...@bigfraud.org> Date: To: General Discussion of SQLite Database <sqlite-users@sqlite.org> Subject: Re: [sqlite] Trigger question _

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Tandetnik
Igor Korot wrote: > So what would be the easiest way to solve it? Depends on your exact requirements, which you've never formulated. I made two different guesses, and suggested two solutions tailored to those guesses. If you want me to help further, now would be a good time

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Korot
Hi, Igor, On Sun, Dec 30, 2012 at 6:43 AM, Igor Tandetnik wrote: > Igor Korot wrote: >> I have: >> >> CREATE TABLE test( id integere primary key, name varchar(70)); >> INSERT INTO test( NULL, "abc def" ); >> INSERT INTO test( NULL, "def abc" ); >> >> Can

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Korot
Simon, On Sun, Dec 30, 2012 at 2:08 AM, Simon Slavin wrote: > > On 30 Dec 2012, at 9:52am, Igor Korot wrote: > >> I want to create a trigger on the table. The trigger will be fired >> before insertion. >> In that trigger I want to check if the data is

Re: [sqlite] Trigger question

2012-12-30 Thread Igor Tandetnik
Igor Korot wrote: > I have: > > CREATE TABLE test( id integere primary key, name varchar(70)); > INSERT INTO test( NULL, "abc def" ); > INSERT INTO test( NULL, "def abc" ); > > Can I prevent the second insertion with the trigger? > Or I should make some app logic to prevent

Re: [sqlite] Trigger question

2012-12-30 Thread Simon Slavin
On 30 Dec 2012, at 9:52am, Igor Korot wrote: > I want to create a trigger on the table. The trigger will be fired > before insertion. > In that trigger I want to check if the data is already present. > > I have: > > CREATE TABLE test( id integere primary key, name

[sqlite] Trigger question

2012-12-30 Thread Igor Korot
Hi, ALL, I want to create a trigger on the table. The trigger will be fired before insertion. In that trigger I want to check if the data is already present. I have: CREATE TABLE test( id integere primary key, name varchar(70)); INSERT INTO test( NULL, "abc def" ); INSERT INTO test( NULL, "def

Re: [sqlite] trigger question

2005-09-19 Thread Jim McNamara
Hi- i tried a different dll and sql tool. the trigger worked. i tried a trick and it seems to work. what i did is put the trigger in under the new dll and new sql tool and then copy the updated db (now with a trigger) to my project directory that uses the java wrapper/driver. it is

[sqlite] trigger question

2005-09-19 Thread Jim McNamara
Hi- This syntax isnt working. I cant figure out what i am doing wrong. I created a budget calculator with a sqlite java wrapper/driver. I am trying to make it a little easier to use. thanks for any tips! jim CREATE TRIGGER fki_statusDetail_statusMaster_id BEFORE INSERT ON Status_Detail FOR