Hi, I am pretty new to SQL (MSQL 7).
I have been writting various triggers to flag data upon insert etc, however I do not really know where to start with the following..
I want a script to check for a record existing in a table and if it exists update the contents, if it does not, create a new one !
It sounds simple enough but I really do not know where to start.
Apart from giving a basic example, does anyone know a good source of scripts that I can learn from (i.e well commented etc) ???
Many Thanks
Dave
P.S I also wanted to create a unique ID on a record as it is created.
I have been writting various triggers to flag data upon insert etc, however I do not really know where to start with the following..
I want a script to check for a record existing in a table and if it exists update the contents, if it does not, create a new one !
It sounds simple enough but I really do not know where to start.
Apart from giving a basic example, does anyone know a good source of scripts that I can learn from (i.e well commented etc) ???
Many Thanks
Dave
P.S I also wanted to create a unique ID on a record as it is created.