I have tried to use uniqueidentifier and couldn't get it to work with update or insert. I didn't see the IS IDENTITY so will try that.
My current problem is that everything in the select statment could have several different options and am working on case statements, however they don't like complex equations and I can't seem to get an if statment to work.
Right now the variables are being declared and populated prior to the insert or update statment and the case statments seem to be running out of control.
Basically what is happening is we have a program that captures information - document name, document extension, Document path, Document size and then it has several switches that are set so that on loading into the table the switches are all set to equal 1.
The first switch is to determine if a prep run was done on the documents. That switch gets set to zero once completed.
The next step is to determine if a link is good or bad. If its good that switch is set to zero, if not its left at 1.
The next switch trips when the document is identified as one of two possible types. 1 is no, zero is yes.
Finally, each time a record is updated it gets a counter bumped up by one.