OK, other than a few minor tweaks, it works.
create procedure getkeywordid @keyword varchar(100)
as
SET NOCOUNT ON;
select keywordid
from keyword
where keyword = @keyword
if @@ROWCOUNT <> 1
begin
insert into keywords (keyword)
values (@keyword)
select keywordid=@@identity
end
SET NOCOUNT OFF;
Thanks Carl and DK
--
Michael Dinowitz
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~|
Want to reach the ColdFusion community with something they want? Let them know
on the House of Fusion mailing lists
Archive: http://www.houseoffusion.com/groups/sql/message.cfm/messageid:3326
Subscription: http://www.houseoffusion.com/groups/sql/subscribe.cfm
Unsubscribe: http://www.houseoffusion.com/groups/sql/unsubscribe.cfm