Advertisement
chekalin-v

Insert update asset Sample

Jul 11th, 2013
153
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
T-SQL 1.12 KB | None | 0 0
  1. DECLARE @return_value int,
  2.         @assetId uniqueidentifier
  3.  
  4.  
  5. -- insert or update asset
  6. EXEC    @return_value = [dbo].[proc_insert_update_asset_from_ES]
  7.         @assetId = @assetId OUTPUT,
  8.         @externalSystemConfigurationId = 'D964933C-2717-4CF2-BB03-FFC27C974136',
  9.         @assetCode = N'AHU-1-11',
  10.         @assetName = N'Air Handling Unit (1)',
  11.         @assetDescription = N'Air Handling Unit',
  12.         @assetType = N'High Airflow 3',
  13.         @assetSystem = N'AC',
  14.         @assetSerialNumber = N'871246983240986',
  15.         @assetModelNumber = N'Alpha-AHU',
  16.         @assetWarantyStartDate = N'2014-12-16 00:00:00.000',
  17.         @assetPurchasingCost = N'1400',
  18.         @assetRepacmentCost = N'1600',
  19.         @assetConditionType = N'2',
  20.         @assetTagNumber = N'AHU',
  21.         @assetBarCode = N'39123439',
  22.         @assetManufacturer = N'Air Change',
  23.         @assetLocation = N'OR Club Plant Room '
  24.        
  25. -- insert or update attributes
  26. EXEC proc_update_asset_attribute_from_ES
  27.     @assetId =@assetId,
  28.     @assetAttributeName = 'Asset_Drawing',
  29.     @assetAttributeValue = 'HBGFAHU10'
  30.    
  31. EXEC proc_update_asset_attribute_from_ES
  32.     @assetId =@assetId,
  33.     @assetAttributeName = 'One more attribute',
  34.     @assetAttributeValue = 'some value'
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement