I want to write a single sp where I pass in the column values and if
it finds an exact match it returns the refid of that match else if it
doesn't find it, it adds a new row using the passed in values and
returns the RefID (primary key) of the new row (identity). I only
want one return value, being the RefID of the found or new row.
I currently am doing a select and then testing the @@ROWCOUNT. If < 1
I do an INSERT and return the identity. It doesn't give the desired
results.
Thanks,
RickN