CREAR EL PROCEDIMIENTO [dbo]. [user_insert]
@user_service_unit internacional,
@user_champion_1 varchar (50),
@user_champion_1_nt varchar (10),
@user_champion_2 varchar (50),
@user_champion_2_nt varchar (10),
@user_champion_3 varchar (50),
@user_champion_3_nt varchar (10),
fecha y hora @user_date_received,
@user_requestor varchar (255),
texto @user_info_requested,
fecha y hora del @user_expiry_date,
fecha y hora de @user_10_days,
fecha y hora de @user_5_days,
fecha y hora de @user_2_days
COMO
PARTE MOVIBLE EN dbo.user_details
(user_service_unit, user_champion_1, user_champion_1_nt, user_champion_2, user_champion_2_nt, user_champion_3, user_champion_3_nt,
user_date_received, user_requestor, user_expiry_date, user_10_days, user_5_days, user_2_days)
VALORES
(@user_service_unit, @user_champion_1, @user_champion_1_nt, @user_champion_2, @user_champion_2_nt, @user_champion_3, @user_champion_3_nt,
@user_date_received, @user_requestor, @user_expiry_date, @user_10_days, @user_5_days, @user_2_days);
DECLARAR EL @NEW_ID INTERNACIONAL
FIJAR EL @NEW_ID = SCOPE_IDENTITY ()
INSERTAR EN dbo.user_info_requested
(user_id, user_info_requested)
VALORES
(@new_id, @user_info_requested)
PARTE MOVIBLE EN dbo.user_details_supplied
(user_id, user_details_supplied)
VALORES
(@new_id, '')
PARTE MOVIBLE EN dbo.user_questions
(user_id, user_questions)
VALORES
(@new_id, '')
@new_id DE VUELTA
¿El servidor " claro " 2000 de >
On SQL del class= de GO