Howie Hamlin wrote:
> I have a basic MSSQL7 question - we have a table with no unique identifier (don't
> ask - I didn't design it) where, on an insert, we want to update a record if it
> exists and insert it if it doesn't. The record can be identified only by a
> combination of columns. For example -
>
> select a,b,c,d,e,f from sometable where ...
Maybe it is time to create a composite primary key so you can enfore a
unique identifier. Something like:
ALTER TABLE sometable
ADD CONSTRAINT sometable_pkey PRIMARY KEY (a,b,c,d,e,f)
For the trigger, why not a stored procedure? I find instead of triggers
quite a cludge.
Jochem
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Archives: http://www.houseoffusion.com/cf_lists/index.cfm?forumid=4
Subscription:
http://www.houseoffusion.com/cf_lists/index.cfm?method=subscribe&forumid=4
FAQ: http://www.thenetprofits.co.uk/coldfusion/faq
This list and all House of Fusion resources hosted by CFHosting.com. The place for
dependable ColdFusion Hosting.
Unsubscribe:
http://www.houseoffusion.com/cf_lists/unsubscribe.cfm?user=89.70.4