Dennis Fleming wrote:
> I have provided my users with a command file to add system constraints to
> columns where there were none and should have been some. i.e.,


Dennis:

I have used this approach quite often and users will ALWAYS run the command file 
repeatedly, "It was so fast I thought it didn't do anything."

Put conditions around the commands. Something like:

select count(*) into vChk i1 from Sys_Constraints+
  WHERE Sys_Not_Null_Msg like 'whatever'
IF vChk = 0 THEN
  ALTER TABLE 'parts' ALTER COLUMN 'pr_unitp' CURRENCY NOT NULL
ENDIF


I am not sure how to test for a specific constraint; the above will need work but 
conveys the idea.
You may need to add an owner password, etc. 

You may need to send a new file to repair the damage done by repeated constraints.

Jim Blackburn
Kodiak

Reply via email to