Re: [sqlite] CHECKING fOR A STRING IN A COLUMN IN A TABLE AND IF STRING IS NOT IN THE COLUMN ADD IT

2005-01-25 Thread Cory Nelson
Try the UNIQUE keyword when creating your table..


On Tue, 25 Jan 2005 09:34:53 -0500, Steve Frierdich
<[EMAIL PROTECTED]> wrote:
> Does anyone have any code they can send me that shows how to check for a
> string in a column in a table, and if the string is not there on how to
> insert the string in the column in the table in a new row. Then finally
> on how to update the table?
> 
> And if possible on how to maybe write a trigger for the above operation
> and use the trigger in a Visaul C++ or a Window's 32 program?
> 
> Thanks
> 
> Steve
> 727 455 4668
> 727-547-9799 ext 1766
> 
> 


-- 
Cory Nelson
http://www.int64.org


Re: [sqlite] CHECKING fOR A STRING IN A COLUMN IN A TABLE AND IF STRING IS NOT IN THE COLUMN ADD IT

2005-01-25 Thread Steve Frierdich
Oh thought maybe there was a trigger I could use to this operation for me.
Thanks for your input.
Steve
Mrs. Brisby wrote:
On Tue, 2005-01-25 at 09:34 -0500, Steve Frierdich wrote:
 

Does anyone have any code they can send me that shows how to check for a 
string in a column in a table, and if the string is not there on how to 
insert the string in the column in the table in a new row. Then finally 
on how to update the table?
   

You should look at the sqlite documentation for REPLACE.
 

And if possible on how to maybe write a trigger for the above operation 
and use the trigger in a Visaul C++ or a Window's 32 program?
   

I don't understand why you think you need a trigger for this.
 



Re: [sqlite] CHECKING fOR A STRING IN A COLUMN IN A TABLE AND IF STRING IS NOT IN THE COLUMN ADD IT

2005-01-25 Thread Mrs. Brisby
On Tue, 2005-01-25 at 09:34 -0500, Steve Frierdich wrote:
> Does anyone have any code they can send me that shows how to check for a 
> string in a column in a table, and if the string is not there on how to 
> insert the string in the column in the table in a new row. Then finally 
> on how to update the table?

You should look at the sqlite documentation for REPLACE.

> And if possible on how to maybe write a trigger for the above operation 
> and use the trigger in a Visaul C++ or a Window's 32 program?

I don't understand why you think you need a trigger for this.



[sqlite] CHECKING fOR A STRING IN A COLUMN IN A TABLE AND IF STRING IS NOT IN THE COLUMN ADD IT

2005-01-25 Thread Steve Frierdich
Does anyone have any code they can send me that shows how to check for a 
string in a column in a table, and if the string is not there on how to 
insert the string in the column in the table in a new row. Then finally 
on how to update the table?

And if possible on how to maybe write a trigger for the above operation 
and use the trigger in a Visaul C++ or a Window's 32 program?

Thanks
Steve
727 455 4668
727-547-9799 ext 1766