Is there a way to write one SQL statement that will insert a new row in a table if a certain string is not found in a column in that same table? Instead of having two write two SQL statements where one checks to see if a user in a table, and the other that either updates the current user if the user is in the table or inserts the user in a new row in the table if the user is not in the table. Anyone now of how to accomplish this in just one SQL statement ?
Thanks
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.




Reply via email to