Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Wanet Telecoms Ltd on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Example scripts

Status
Not open for further replies.

DaveRolph

Programmer
Sep 12, 2001
26
GB
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.


 

Check faq183-694 for training sites, tutorials and links to sites with sample scripts. Terry L. Broadbent
FAQ183-874 contains tips for posting questions in these forums.
NOTE: Reference to the FAQ is not directed at any individual.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top