Thanks for the answer
Since I have the same tables in multiple databases, what I did was put the ALTER TABLE statements to create the primary key constraint into a stored procedure. Your way is better because it keeps the primary key creation with the table creation.
I did an online chat with a "help person" at Microsoft last night, explaining the situation, and asking if they could tell me why the primary key constraint creation was hit or miss with my stored procedure. They didn't know why, especially after I showed them how I copied the text verbatim from the Books Online to use as a template.
lincoln
"Chicago to my mind was the only place to be. ... I above all liked the city because it was filled with people all a-bustle, and the clatter of hooves and carriages, and with delivery wagons and drays and peddlers and the boom and clank of freight trains. And when those black clouds came sailing in from the west, pouring thunderstorms upon us so that you couldn't hear the cries or curses of humankind, I liked that best of all. Chicago could stand up to the worst God had to offer. I understood why it was built--a place for trade, of course, with railroads and ships and so on, but mostly to give all of us a magnitude of defiance that is not provided by one house on the plains. And the plains is where those storms come from." -- E.L. Doctorow
Never apply a Star Trek solution to a Babylon 5 problem.
[link|mailto:bconnors@ev1.net|contact me]