Post Pacific  

Go Back   Post Pacific > Восстановленный архив > Темы без сохранившегося раздела

Notices

 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
Old 25.09.2006, 03:53   #6
top-gear
Архивный участник
 
Join Date: Aug 2005
Posts: 605
Default

procedure for macroinfo is

Code:
ALTER PROCEDURE [dbo].[lin_CreateMacroInfo]
(
@macro_id		int,
@macro_order		int,
@macro_int1		int,
@macro_int2		int,
@macro_int3		int,
@macro_str		nvarchar(255)
)
AS
SET NOCOUNT ON

if ( exists ( select * from user_macro where macro_id = @macro_id ) )
begin
	if ( exists ( select * from user_macroinfo where macro_id = @macro_id and macro_order = @macro_order ) )
	begin
		update user_macroinfo set macro_int1 = @macro_int1, macro_int2 = @macro_int2, macro_int3 = @macro_int3 where macro_id = @macro_id and macro_order = @macro_order

	end else begin
		insert into user_macroinfo ( macro_id, macro_order, macro_int1, macro_int2, macro_int3, macro_str )
		values ( @macro_id, @macro_order, @macro_int1, @macro_int2, @macro_int3, @macro_str )
	end

end
couldnt make it check for ! or + on creation either
top-gear is offline  
 

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT. The time now is 18:22.