CHECK for duplicate inside a cursor and pass a ouptut parameter in sql server 2008

Hi All,
I am inserting a value into a table, Before inserting i am checking that record already exists or not in the target table, If its existsing i am making an entry into errorlog table and set the output parameter to 'errorlog' . This is inside the cursor, as
il be passing multiple values. Next is I have separate query to get the new record which is not in the target table. Using EXCEPT i get the new record and i insert into a main table. after insertion i set output as 'success'. 
Here while executing the procedure i pass a duplicate value and a new value. As it is in cursor,first it will insert into errorlog and set output parameter as 'errorlog' .Next it will insert a new record into main table and set output parameter as 'Success'.
So on completion of the execution of the procedure i get output as success.
But i should get as errorlog. I should get success only on no errors in the procedure. How i can i achieve this? Please help me.
Below is my code
IF NOT EXISTS(SELECT Beginmilepost,BeginTrackName,Endmilepost,EndTrackName
FROM SSDB_Segment WHERE BeginMilepost>=@BegMP AND EndMilepost<=@EndMP AND SearchID = @SearchID AND Reference = 'Range')
BEGIN
                 Declare C_Max1 Cursor FOR
(SELECT Beginmilepost,BeginTrackName,Endmilepost,EndTrackName FROM SSDB_Segment WHERE BeginMilepost = @BegMP AND EndMilepost = @EndMP AND  BeginTrackName = @BegtrkName 
AND EndTrackName = @EndTrkName  AND SearchID = @SearchID)
  Open C_Max1
  FETCH FROM C_MAX1 INTO @BeginMilepost,@BTrackName,@EndMilepost,@ETrackName
WHILE(@@FETCH_STATUS=0)
BEGIN
IF OBJECT_ID ('tempdb..#temp') IS NOT NULL
BEGIN
      DROP TABLE #temp
END--IF
Select BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix,EndLatitude,EndLongitude,EndTrackName,EndMilepost,TrainType into #temp
FROM
SELECT BeginLatitude= case when @BegLat = 0 THEN NULL ELSE @BegLat end ,BeginLongitude= case when @BegLong=0 THEN NULL ELSE @BEgLong end ,@BTrackName AS BeginTrackName,ROUND(@BeginMilepost ,3) AS BeginMilepost,
BeginMilepostPrefix= CASE WHEN @BegPrefix = 'null' THEN NULL ELSE @BegPrefix END,BeginMilepostSuffix= CASE WHEN @BegSuffix  = 'null' THEN NULL ELSE @BegSuffix  END,
EndLatitude=case when @EndLat =0 then NULL else @EndLat end,EndLongitude=case when @Endlong = 0 THEN NULL ELSE @Endlong END,@ETrackName AS EndTrackName,ROUND(@EndMilepost ,3) AS EndMilepost,@TrainType AS TrainType 
UNION ALL
select BeginLatitude,BeginLongitude,BeginTrackName,ROUND(BeginMilepost,3) AS BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix, EndLatitude,EndLongitude,EndTrackName,ROUND(EndMilepost,3) AS EndMilepost,TrainType from SSDB_MaximumPermissibleSpeed)data
group by  BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,EndLatitude,EndLongitude,EndTrackName,EndMilepost,BeginMilepostPrefix,BeginMilepostSuffix,TrainType
having COUNT(*)>1
SET @COUNT= (select count(*) from #temp )
Print @COUNT
IF @COUNT>=1
BEGIN
 INSERT INTO ErrorLog_Asset (
                                    ErrorCode,
                                    ErrorMessage,
                                    TableName,
                                    MilepostPrefix,
                                    Milepost
SELECT
                                 '1',
                                 'Already exists at BeginMp '+ CAST(@BeginMilepost  as varchar) +',EndMp '+ CAST(@EndMilepost as varchar) +' ,Beginlat
'+CAST(@BegLat   as varchar)
                                 +' ,Endlat '+CAST(@EndLat   as varchar)+', BeginTrackName '+@BTrackName  +' and EndTrackName '+@ETrackName
                                 'MaximumPermissibleSpeed',
                                  CASE WHEN @BegPrefix = 'null' THEN NULL
ELSE @BegPrefix END ,
@BeginMilepost  
SET @output = 'Errorlog'
END
 IF OBJECT_ID ('tempdb..#Max') IS NOT NULL
BEGIN
 DROP TABLE #Max
END--IF
 Select BeginLatitude,BeginLongitude,BeginTrackName,BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix,EndLatitude,EndLongitude,EndTrackName,EndMilepost,TrainType into #Max from
       (SELECT BeginLatitude= case when @BegLat = 0 THEN NULL ELSE @BegLat end ,BeginLongitude= case when @BegLong=0 THEN NULL ELSE @BEgLong end ,@BTrackName AS BeginTrackName,ROUND(@BeginMilepost ,3)
AS BeginMilepost,
              BeginMilepostPrefix= CASE WHEN @BegPrefix = 'null' THEN NULL ELSE @BegPrefix END,BeginMilepostSuffix= CASE WHEN @BegSuffix  = 'null' THEN NULL ELSE @BegSuffix  END,
              EndLatitude=case when @EndLat =0 then NULL else @EndLat end,EndLongitude=case when @Endlong = 0 THEN NULL ELSE @Endlong END,@ETrackName AS EndTrackName,ROUND(@EndMilepost ,3) AS EndMilepost,@TrainType AS TrainType 
except
             select BeginLatitude,BeginLongitude,BeginTrackName,ROUND(BeginMilepost,3) AS BeginMilepost,BeginMilepostPrefix,BeginMilepostSuffix, EndLatitude,EndLongitude,EndTrackName,ROUND(EndMilepost,3) AS EndMilepost,TrainType
from SSDB_MaximumPermissibleSpeed)data
 Declare C_Max2 Cursor FOR
 Select BeginMilepost,BeginTrackName,EndMilepost,EndTrackName from #Max 
  Open C_Max2
  FETCH FROM C_Max2 INTO  @BeginMP,@BeginTrackName,@EnMP,@EnTrackName
WHILE(@@FETCH_STATUS=0)
BEGIN
   IF (Select COUNT(*) from tbl_Trackname )>=1
   BEGIN
 IF (@TrainType IN (SELECT TrainType  FROM SSDB_TrainType )AND (@Speed <>0) AND @BeginMP IS NOT NULL AND @BeginTrackName IS NOT NULL  AND @EnMP IS NOT NULL
 AND @Direction IN (SELECT Direction FROM SSDB_Direction) AND @EnTrackName IS NOT NULL )
 BEGIN-------------
 SET @ID = (Select MAX(MaximumpermissibleSpeedID) from SSDB_MaximumPermissibleSpeed)
IF @COUNT =0
   BEGIN
                      INSERT INTO SSDB_MaximumPermissibleSpeed
BeginMilepostPrefix,
BeginMilepostSuffix,
BeginMilepost,
BeginTrackName,
BeginLatitude,
BeginLongitude,
BeginElevation,
EndMilepostPrefix,
EndMilepostSuffix,
EndMilepost,
EndTrackName,
EndLatitude,
EndLongitude,
EndElevation,
Direction,
Speed,
TrainType,
Description,
InsertUser,
S_ID
                                                 SELECT
  CASE WHEN @BegPrefix = 'null' THEN NULL
  ELSE @BegPrefix END,
                      CASE WHEN @BegSuffix = 'null' THEN NULL
  ELSE @BegSuffix END,
  @BeginMP ,
  @BeginTrackName  ,
  case WHEN @BegLat = 0 THEN NULL
  ELSE @BegLat END,
  CASE WHEN @BegLong=0 THEN NULL
  ELSE @BegLong END ,
  CASE WHEN @BegEle = 0 THEN NULL
  ELSE @BegEle END ,
  CASE WHEN @EndPrefix = 'null' THEN NULL
  ELSE @EndPrefix END,
                      CASE WHEN @EndSuffix = 'null' THEN NULL
  ELSE @EndSuffix END,
  @EnMP ,
  @EnTrackName  ,
  case WHEN @EndLat = 0 THEN NULL
  ELSE @EndLat END,
  CASE WHEN @EndLong=0 THEN NULL
  ELSE @EndLong END ,
  CASE WHEN @EndEle = 0 THEN NULL
  ELSE @EndEle END ,
  @Direction ,
  @Speed ,
  @TrainType ,
  CASE WHEN @Description ='null' THEN NULL
  ELSE @Description END ,
  @InsertUser ,
  @UID     
INSERT INTO SSDB_MaxSpeed_History
                   MSID,
BeginMilepostPrefix,
BeginMilepostSuffix,
BeginMilepost,
BeginTrackName,
BeginLatitude,
BeginLongitude,
BeginElevation,
EndMilepostPrefix,
EndMilepostSuffix,
EndMilepost,
EndTrackName,
EndLatitude,
EndLongitude,
EndElevation,
Direction,
Speed,
TrainType,
Description,
S_ID,
NOTES ,
[Action] ,
InsertUser
                             SELECT 
                      (Select MaximumPermissibleSpeedID from SSDB_MaximumpermissibleSpeed WHERE MaximumPermissibleSpeedID > @ID),
                      CASE WHEN @BegPrefix = 'null' THEN NULL
  ELSE @BegPrefix END,
                      CASE WHEN @BegSuffix = 'null' THEN NULL
  ELSE @BegSuffix END,
  @BeginMP ,
  @BeginTrackName  ,
  case WHEN @BegLat = 0 THEN NULL
  ELSE @BegLat END,
  CASE WHEN @BegLong=0 THEN NULL
  ELSE @BegLong END ,
  CASE WHEN @BegEle = 0 THEN NULL
  ELSE @BegEle END ,
  CASE WHEN @EndPrefix = 'null' THEN NULL
  ELSE @EndPrefix END,
                      CASE WHEN @EndSuffix = 'null' THEN NULL
  ELSE @EndSuffix END,
  @EnMP ,
  @EnTrackName  ,
  case WHEN @EndLat = 0 THEN NULL
  ELSE @EndLat END,
  CASE WHEN @EndLong=0 THEN NULL
  ELSE @EndLong END ,
  CASE WHEN @EndEle = 0 THEN NULL
  ELSE @EndEle END ,
  @Direction ,
  @Speed ,
  @TrainType ,
  CASE WHEN @Description ='null' THEN NULL
  ELSE @Description END ,
  @UID,
  NULL,
  'INSERT',
  @InsertUser 
set @output='Success'
--IF ((@COUNT >=1) AND (@COUNT =0))
--BEGIN
--  SET @output = 'ErrorLog'
--END
--IF (@COUNT = 0)
-- BEGIN
--SET @output ='Success'
--END
--END
END
END------------------------> 
Deepa

Hi Deepa,
If I understand your question correctly, you would like the @Output parameter to contain the value "Success" only if all rows were successful. As soon as one row was found to be a duplicate, the value of @Output at the end of execution should be "ErrorLog".
Currently, you modify the value of @Output in each iteration of the cursor, so at the end of execution you're left with the last value.
In order to change that to work the way you want it, you need to set the value of @Output in the beginning of execution (before entering the cursor) to "Success", and as soon as there is a duplicate row, you should modify the value to "ErrorLog". This way,
if all rows are successful, the value of @Output will be "Success" at the end of execution. On the other hand, if there is even a single duplicate row, the value of @Output will be "ErrorLog" at the end of execution.
I hope this helps...
Guy Glantser
SQL Server Consultant & Instructor
Madeira - SQL Server Services
http://www.madeirasql.com

Similar Messages

  • Using SSDT-BI in Visual Studio 2012 to create and maintain SSRS, SSAS, SSIS in SQL Server 2008 R2

    Hi,   My management is wanting all the developers (database and .net) to upgrade from Visual Studio 2008 to Visual Studio 2012.  We are currently using SQL Server 2008 R2 for our data warehouse and using Business Intelligence (SSIS,
    SSAS, and SSRS) to maintain it.  Our database team is also wanting to create database projects and include that in our Team Foundation Server 2010 code repository along with our BI code.  From what I've been able to research googling the
    internet is there are two products available SSDT and SSDT-BI which can be installed into VS2012, but it appears that only SSDT for database projects is the only thing that will work until we someday upgrade to SQL Server 2012.  Most of the information
    I've found on the internet regarding this subject is over a year old and a lot can change in a year.  So my questions are can we install VS2012 and both SSDT and SSDT-BI to create and maintain the SSIS, SSRS, and SSAS currently in our SQL Server 2008
    R2 database?  If we can install these three items, VS2012 and the two SSDTs, and are able to create new BI and maintain our current BI in our SS2008R2 database then what issues might we have with our TFS2010 code repository?  We prefer
    to use only VS2012 or VS2008 but not both at the same time.  If we can't do everything we are currently doing in VS2008 with our SS2008R2 database by switching to VS2012 and the two SSDTs then we will stay with VS2008 until we someday upgrade
    to SS2012.  Please advise and thank you.  James M.

    I'm going to move this to the SSAS blog, where most SSDT-BI questions are answered (this forum mainly answers SSDT questions). Someone there may be able to give you better information but here's what I know:
    - I think you'll only need to install SSDT-BI since you're using SSIS, SSAS and SSRS. SSDT is the database tooling which it sounds like you wouldn't use, and it's actually built into VS2012 in any case.
    - SSIS projects don't work with earlier versions of SQL Server, but SSAS and SSRS do. Details are on
    this blog post. I don't have enough knowledge to suggest workarounds or best practices for handling the SSIS issue. Perhaps you could keep 2 projects, or 2 branches of the same project (one for 2012, one for 2008) if that's possible? I think your BIDS projects
    will be upgraded to SSDT-BI compatible projects so it's work checking them into source control, upgrading, then comparing to understand what's changed. You might be able to keep the same overall source and just change a few settings in the different branches?
    Hopefully someone on the SSAS forum can help give you more information and suggestions.
    Kevin

  • Benefit and limitation of temp table in sql server 2008

    I have a datagrid in front end of asp.net . when user select a row it shows another gridview (multiple row ) where user have to put some data. when user click CLOSE button  i have to keep all data of 2nd gridview in reference with 1st gridview row id. 
    Same process for each row of 1st gridview. If i will keep all the record in a datatable in view state and finally save the data in database table when final save is clicked then the process may be very slow due to large data in view state. So i think to store
    data in temp datable in database for each CLOSE click. For this porpose which temp table i should use
    1. Local temporary tables
    2. Global temporary tables
    3. Normal tables.
    Multiple user may do the same thing same time.  Please help me.
    Thanks

    >1. Local temporary tables
    >2. Global temporary tables
    >3. Normal tables.
    When used in stored procedures, local temporary tables (#table) are automatically multi-user.
    For global temp (##table) & normal tables, you need to develop your own mult-user logic.
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Design & Programming
    New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012

  • Checking for duplicates in my library and an external photo collection?

    Hi
    So I have imported a large amount of my photo collection into Aperture however due to my filing system on my mac being really bad I have ended up with a large folder full of sub folders and lots of photos. Some of the photos in this folder have already been imported but others have not. Is there any simple way of importing only non-duplicate images so I can just delete the messy folder? I'd really rather not go through manually.
    Thanks

    As long as the imported image files have not been renamed on import, Aperture should recognise, when you are trying to import a photo, that alrady has been imported and not import it again. Just make sure, the option"Do not import duplicates" is active in the Import settings panel.

  • How do i check ensure that SAP checks for duplicate vendor invoice numbers?

    Hi Experts -
    How do I verify that SAP checks for duplicate vendor invoice numbers and blocks duplicate invoices from being paid?
    Thanks!

    Hi
    Pls chek the settigs by following the path
    IMG>Materials Management>Logistics Invoice Verification>Incoming Invoice>Set Check for Duplicate Invoice.
    Here you make the settings for creating a duplicate invoice check.
    Moreever, in the vendor master, you need to tick the check box for duplicate invoice check.
    I suggest you search the Forums before posting a query. There are lots of postings on this issue.
    Thanks & regards
    Sanil K Bhandari

  • Installation Error for SQL Server 2008 R2 on windows vista

    2014-09-20 07:49:26 Slp: ----------------------------------------
    2014-09-20 07:49:26 Slp: Setting: TIMESTAMP
    2014-09-20 07:49:26 Slp: Value specified: 20140920_074907
    2014-09-20 07:49:26 Slp: New setting source: CommandLine; previous setting source: Default
    2014-09-20 07:49:26 Slp: ----------------------------------------
    2014-09-20 07:49:26 Slp: Setting: LOGMARKER
    2014-09-20 07:49:26 Slp: Value specified: _ComponentUpdate
    2014-09-20 07:49:26 Slp: New setting source: CommandLine; previous setting source: Default
    2014-09-20 07:49:26 Slp: ----------------------------------------
    2014-09-20 07:49:26 Slp: Setting: INSTALLMEDIAPATH
    2014-09-20 07:49:26 Slp: Value specified: C:\Downloaded\SQL Server 2008\x86\setup\
    2014-09-20 07:49:26 Slp: New setting source: CommandLine; previous setting source: Default
    2014-09-20 07:49:26 Slp: ----------------------------------------
    2014-09-20 07:49:26 Slp: Setting: MEDIALAYOUT
    2014-09-20 07:49:26 Slp: Value specified: Full
    2014-09-20 07:49:26 Slp: New setting source: CommandLine; previous setting source: Default
    2014-09-20 07:49:26 Slp: ----------------------------------------
    2014-09-20 07:49:26 Slp: Completed Action: ProcessChainerCommandLineArguments, returned True
    2014-09-20 07:49:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:26 Slp: Running Action: ProcessMediaChainerConfigFileArguments
    2014-09-20 07:49:26 Slp: Completed Action: ProcessMediaChainerConfigFileArguments, returned True
    2014-09-20 07:49:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:26 Slp: Running Action: ProcessChainerConfigFileArguments
    2014-09-20 07:49:26 Slp: Completed Action: ProcessChainerConfigFileArguments, returned True
    2014-09-20 07:49:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:26 Slp: Running Action: ProcessSlipstreamParameters
    2014-09-20 07:49:26 Slp: Completed Action: ProcessSlipstreamParameters, returned True
    2014-09-20 07:49:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:26 Slp: Skipping Action: SetRoleAndUIModeForExpressMedia
    2014-09-20 07:49:26 Slp: Action is being skipped due to the following restrictions: 
    2014-09-20 07:49:26 Slp: Condition "IsMediaExpress" did not pass as it returned false and true was expected.
    2014-09-20 07:49:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:26 Slp: Running Action: ValidateChainerSetting
    2014-09-20 07:49:26 Slp: -- PidPublicConfigObject : ValidateSettings is normalizing input pid=[PID value hidden]
    2014-09-20 07:49:26 Slp: -- PidPrivateConfigObject : NormalizePid found null or empty pid
    2014-09-20 07:49:26 Slp: -- PidPublicConfigObject : ValidateSettings proceeding with normalized pid=[PID value hidden]
    2014-09-20 07:49:26 Slp: -- PidPrivateConfigObject : Initialize is initializing using input pid=[PID value hidden]
    2014-09-20 07:49:26 Slp: -- PidPrivateConfigObject : NormalizePid found null or empty pid
    2014-09-20 07:49:26 Slp: -- PidPrivateConfigObject : Initialize proceeding with normalized pid=[PID value hidden]
    2014-09-20 07:49:26 Slp: -- PidPrivateConfigObject : Initialize called ValidatePid, output is pid=[PID value hidden] validateSuccess=True output editionId=EVAL(0x2467BCA1)
    2014-09-20 07:49:27 Slp: -- PidPublicConfigObject : ValidateSettings initialized private object, result is initializeResult=Success
    2014-09-20 07:49:27 Slp: Completed Action: ValidateChainerSetting, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: ProcessFeatureCommandLineArguments
    2014-09-20 07:49:27 Slp: ----------------------------------------
    2014-09-20 07:49:27 Slp: Completed Action: ProcessFeatureCommandLineArguments, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: ProcessMediaFeatureConfigFileArguments
    2014-09-20 07:49:27 Slp: Completed Action: ProcessMediaFeatureConfigFileArguments, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: ProcessFeatureConfigFileArguments
    2014-09-20 07:49:27 Slp: Completed Action: ProcessFeatureConfigFileArguments, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: StartSqmSession
    2014-09-20 07:49:27 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
    2014-09-20 07:49:27 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\100
    2014-09-20 07:49:27 Slp: SQM is opted-out by command line parameter /SQMREPORTING or registry key setting, SQM session is closed
    2014-09-20 07:49:27 Slp: Completed Action: StartSqmSession, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: ValidateSettingsAgainstScenario
    2014-09-20 07:49:27 Slp: Scenario: ComponentUpdate
    2014-09-20 07:49:27 Slp: Completed Action: ValidateSettingsAgainstScenario, returned True
    2014-09-20 07:49:27 Slp: Completed Action: ExecuteBootstrapAfterExtensionsLoaded, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: SetComponentUpdateScenarioFlags
    2014-09-20 07:49:27 Slp: Completed Action: SetComponentUpdateScenarioFlags, returned True
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: ExecuteInitWorkflow
    2014-09-20 07:49:27 Slp: Workflow to execute: 'INITIALIZATION'
    2014-09-20 07:49:27 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:27 Slp: Running Action: InitializeMsiExtension
    2014-09-20 07:49:29 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
    2014-09-20 07:49:29 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\100\Bootstrap
    2014-09-20 07:49:29 Slp: Completed Action: InitializeMsiExtension, returned True
    2014-09-20 07:49:29 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:29 Slp: Skipping Action: InitializeConfigAction
    2014-09-20 07:49:29 Slp: Action is being skipped due to the following restrictions: 
    2014-09-20 07:49:29 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableExternalMsiConfiguration set" did not pass as it returned false and true was expected.
    2014-09-20 07:49:29 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:29 Slp: Skipping Action: RunDiscoveryAction
    2014-09-20 07:49:29 Slp: Action is being skipped due to the following restrictions: 
    2014-09-20 07:49:29 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableDiscoverableProducts set" did not pass as it returned false and true was expected.
    2014-09-20 07:49:29 Slp: Completed Action: ExecuteInitWorkflow, returned True
    2014-09-20 07:49:29 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:29 Slp: Running Action: ExecuteStartUiWorkflow
    2014-09-20 07:49:29 Slp: Workflow to execute: 'STARTUI'
    2014-09-20 07:49:29 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:29 Slp: Running Action: InstallWizard
    2014-09-20 07:49:29 Slp: Start Action: ComponentUpdate
    2014-09-20 07:49:29 Slp: Configuration file: C:\Downloaded\SQL Server 2008\x86\configuration.uicfg
    2014-09-20 07:49:30 Slp: Adding registration information 'ShowWizard' for type 'Microsoft.SqlServer.Management.ActionHandlerInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'InstallWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'InstallClusterWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'AddNode' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'RemoveNode' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'PrepareClusterWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'CompleteClusterWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'UninstallWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'UpgradeWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'ComponentUpdate' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'RepairWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'RunRulesUI' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'EditionUpgradeWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'PatchWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'RemovePatchWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'PrepareImageWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: Adding registration information 'CompleteImageWizard' for type 'Microsoft.SqlServer.Management.ActionInfo'
    2014-09-20 07:49:30 Slp: -- SkuPublicConfigObject : Calling SkuPublicConfigObject.Calculate.
    2014-09-20 07:49:31 Slp: Completed Action: InstallWizard, returned True
    2014-09-20 07:49:31 Slp: ----------------------------------------------------------------------
    2014-09-20 07:49:31 Slp: Running Action: GatherUserSettings
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings is normalizing input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid is normalizing input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid added dashes to pid, output pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings proceeding with normalized pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : Initialize is initializing using input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid is normalizing input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid found a pid containing dashes, assuming pid is normalized, output pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : Initialize proceeding with normalized pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : Read lcid 1033 from CultureInfo
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : Pid validation of input pid '[PID value hidden]' succeeded, resulting edition is 'DATA_CENTER' channel 'OEM'
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : Initialize called ValidatePid, output is pid=[PID value hidden] validateSuccess=True output editionId=DATA_CENTER(0xC5AA9665)
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings initialized private object, result is initializeResult=Success
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings is normalizing input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid is normalizing input pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPrivateConfigObject : NormalizePid added dashes to pid, output pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings proceeding with normalized pid=[PID value hidden]
    2014-09-20 07:50:22 Slp: -- PidPublicConfigObject : ValidateSettings found pid=[PID value hidden] is already validated and initialized.
    2014-09-20 07:50:22 Slp: License file: C:\Downloaded\SQL Server 2008\1033_ENU_LP\x86\1033\License_DC_OEM.rtf
    2014-09-20 07:50:25 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
    2014-09-20 07:50:25 Slp: Sco: Attempting to open registry subkey Software\Microsoft\Microsoft SQL Server\100
    2014-09-20 07:50:25 Slp: SQM is opted-out by command line parameter /SQMREPORTING or registry key setting, SQM session is closed
    2014-09-20 07:50:25 Slp: License file: C:\Downloaded\SQL Server 2008\1033_ENU_LP\x86\1033\License_DC_OEM.rtf
    2014-09-20 07:50:25 Slp: Completed Action: GatherUserSettings, returned True
    2014-09-20 07:50:25 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:25 Slp: Running Action: RegisterRetryHandler
    2014-09-20 07:50:25 Slp: Completed Action: RegisterRetryHandler, returned True
    2014-09-20 07:50:25 Slp: Completed Action: ExecuteStartUiWorkflow, returned True
    2014-09-20 07:50:25 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:25 Slp: Running Action: NotifyProgressCountDisplay
    2014-09-20 07:50:26 Slp: Completed Action: NotifyProgressCountDisplay, returned True
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Running Action: ExecuteCalculateScenarioWorkflow
    2014-09-20 07:50:26 Slp: Workflow to execute: 'CALCULATESCENARIO'
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Running Action: ClearCalculatedState
    2014-09-20 07:50:26 Slp: Completed Action: ClearCalculatedState, returned True
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Skipping Action: SetUninstallEnableInstallMatchingByInstanceId
    2014-09-20 07:50:26 Slp: Action is being skipped due to the following restrictions: 
    2014-09-20 07:50:26 Slp: Condition "Is the user's scenario set to Uninstall" did not pass as it returned false and true was expected.
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Skipping property ArgInstanceName of class: SetFeatureInstallStateAction
    2014-09-20 07:50:26 Slp: Input of property will not be set due to the following failed restriction(s): 
    2014-09-20 07:50:26 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableDiscoverableProducts set" did not pass as it returned false and true was expected.
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Skipping property ArgSqlInstanceId of class: SetFeatureInstallStateAction
    2014-09-20 07:50:26 Slp: Input of property will not be set due to the following failed restriction(s): 
    2014-09-20 07:50:26 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableInstallMatchingByInstanceId set" did not pass as it returned false and true was expected.
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Skipping property ArgASInstanceId of class: SetFeatureInstallStateAction
    2014-09-20 07:50:26 Slp: Input of property will not be set due to the following failed restriction(s): 
    2014-09-20 07:50:26 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableInstallMatchingByInstanceId set" did not pass as it returned false and true was expected.
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Skipping property ArgRSInstanceId of class: SetFeatureInstallStateAction
    2014-09-20 07:50:26 Slp: Input of property will not be set due to the following failed restriction(s): 
    2014-09-20 07:50:26 Slp: Condition "Is the datastore flag /Scenario/GlobalFlags/EnableInstallMatchingByInstanceId set" did not pass as it returned false and true was expected.
    2014-09-20 07:50:26 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:26 Slp: Running Action: SetFeatureInstallStateAction
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_Cpu32: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:26 Slp: Package ID sql_engine_core_inst_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_fulltext_Cpu32: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_Cpu32: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_engine_core_shared_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_Cpu32: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_as_spi_Cpu32: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_rs_Cpu32: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_rs_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_rs_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:27 Slp: Package ID sql_rs_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_rs_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_Cpu32: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_is_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_Cpu32: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_tools_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_bids_Cpu32: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_bids_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:28 Slp: Package ID sql_bids_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_bids_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_Cpu32: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_ssms_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_Cpu32: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1028: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1031: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1033: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1036: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1040: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1041: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1042: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1046: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1049: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_2052: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_3082: NotInstalled
    2014-09-20 07:50:29 Slp: Package ID sql_common_core_loc_Cpu32_1053: NotInstalled
    2014-09-20 07:50:29 Slp: Error: Action "Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction" threw an exception during execution.
    2014-09-20 07:50:29 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Value cannot be null.
    2014-09-20 07:50:29 Slp: Parameter name: productVersion ---> System.ArgumentNullException: Value cannot be null.
    2014-09-20 07:50:29 Slp: Parameter name: productVersion
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallProperty.set_ProductVersion(String value)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallPropertyByProductCode(PackageInstallProperty pkg, String prodCode)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallProperty(PackageInstallProperty pkg)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.ExecuteAction(String actionId)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:29 Slp:    --- End of inner exception stack trace ---
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue()
    2014-09-20 07:50:29 Slp: Error: Action "Microsoft.SqlServer.Configuration.BootstrapExtension.ExecuteWorkflowAction" threw an exception during execution.
    2014-09-20 07:50:29 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Value cannot be null.
    2014-09-20 07:50:29 Slp: Parameter name: productVersion ---> System.ArgumentNullException: Value cannot be null.
    2014-09-20 07:50:29 Slp: Parameter name: productVersion
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallProperty.set_ProductVersion(String value)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallPropertyByProductCode(PackageInstallProperty pkg, String prodCode)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallProperty(PackageInstallProperty pkg)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.ExecuteAction(String actionId)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:29 Slp:    --- End of inner exception stack trace ---
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue()
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Configuration.BootstrapExtension.ExecuteWorkflowAction.ExecuteAction(String actionId)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2014-09-20 07:50:29 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2014-09-20 07:50:33 Slp: Received request to add the following file to Watson reporting: C:\Users\Kimi Raikkonen\AppData\Local\Temp\tmpB4ED.tmp
    2014-09-20 07:50:33 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
    2014-09-20 07:50:33 Slp: Inner exceptions are being indented
    2014-09-20 07:50:33 Slp: 
    2014-09-20 07:50:33 Slp: Exception type: System.ArgumentNullException
    2014-09-20 07:50:33 Slp:     Message: 
    2014-09-20 07:50:33 Slp:         Value cannot be null.
    2014-09-20 07:50:33 Slp:         Parameter name: productVersion
    2014-09-20 07:50:33 Slp:     Stack: 
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallProperty.set_ProductVersion(String value)
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallPropertyByProductCode(PackageInstallProperty pkg, String prodCode)
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.FillInstallProperty(PackageInstallProperty pkg)
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Configuration.MsiExtension.SetFeatureInstallStateAction.ExecuteAction(String actionId)
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2014-09-20 07:50:33 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2014-09-20 07:50:43 Slp: Watson Bucket 1 
     Original Parameter Values 
    2014-09-20 07:50:43 Slp: Parameter 0 : SQL Server 2008 R2@RTM@ 
    2014-09-20 07:50:43 Slp: Parameter 1 : Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallProperty.set_ProductVersion 
    2014-09-20 07:50:43 Slp: Parameter 2 : Microsoft.SqlServer.Configuration.MsiExtension.PackageInstallProperty.set_ProductVersion 
    2014-09-20 07:50:43 Slp: Parameter 3 : System.ArgumentNullException@-2147467261 
    2014-09-20 07:50:43 Slp: Parameter 4 : System.ArgumentNullException@-2147467261 
    2014-09-20 07:50:43 Slp: Parameter 5 : SetFeatureInstallStateAction 
    2014-09-20 07:50:43 Slp: 
     Final Parameter Values 
    2014-09-20 07:50:43 Slp: Parameter 0 : SQL Server 2008 R2@RTM@ 
    2014-09-20 07:50:43 Slp: Parameter 1 : 0x2AA348CC 
    2014-09-20 07:50:43 Slp: Parameter 2 : 0x2AA348CC 
    2014-09-20 07:50:43 Slp: Parameter 3 : 0xF15156D0 
    2014-09-20 07:50:43 Slp: Parameter 4 : 0xF15156D0 
    2014-09-20 07:50:43 Slp: Parameter 5 : SetFeatureInstallStateAction 
    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
    2014-09-20 07:50:43 Slp: Sco: Unable to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_, Win32 error
    2
    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
    2014-09-20 07:50:43 Slp: Sco: Unable to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_, Win32 error 2
    2014-09-20 07:50:44 Slp: Value cannot be null.
    Parameter name: productVersion
    2014-09-20 07:50:44 Slp: Watson bucket for exception based failure has been created
    2014-09-20 07:50:44 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
    2014-09-20 07:50:44 Slp: Sco: Attempting to open registry subkey 
    2014-09-20 07:50:44 Slp: Sco: Attempting to open registry subkey Software\Microsoft\PCHealth\ErrorReporting\DW\Installed
    2014-09-20 07:50:44 Slp: Sco: Attempting to get registry value DW0200
    2014-09-20 07:50:46 Slp: Submitted 1 of 1 failures to the Watson data repository
    2014-09-20 07:50:46 Slp: 
    2014-09-20 07:50:46 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:46 Slp: 
    2014-09-20 07:50:46 Slp: Error result: 1269611253
    2014-09-20 07:50:46 Slp: Result facility code: 940
    2014-09-20 07:50:46 Slp: Result error code: 47861

    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_
    2014-09-20 07:50:43 Slp: Sco: Unable to write hklm registry key SOFTWARE\Microsoft\Microsoft SQL Server to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Microsoft SQL Server.reg_, Win32
    error 2
    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_Windows_CurrentVersion_Uninstall.reg_
    2014-09-20 07:50:43 Slp: Sco: Attempting to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
    2014-09-20 07:50:43 Slp: Sco: Unable to write hklm registry key SOFTWARE\Microsoft\MSSQLServer to file C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_, Win32 error 2
    2014-09-20 07:50:44 Slp: Value cannot be null.
    Parameter name: productVersion
    2014-09-20 07:50:44 Slp: Watson bucket for exception based failure has been created
    2014-09-20 07:50:44 Slp: Sco: Attempting to create base registry key HKEY_LOCAL_MACHINE, machine 
    2014-09-20 07:50:44 Slp: Sco: Attempting to open registry subkey 
    2014-09-20 07:50:44 Slp: Sco: Attempting to open registry subkey Software\Microsoft\PCHealth\ErrorReporting\DW\Installed
    2014-09-20 07:50:44 Slp: Sco: Attempting to get registry value DW0200
    2014-09-20 07:50:46 Slp: Submitted 1 of 1 failures to the Watson data repository
    2014-09-20 07:50:46 Slp: 
    2014-09-20 07:50:46 Slp: ----------------------------------------------------------------------
    2014-09-20 07:50:46 Slp: 
    2014-09-20 07:50:46 Slp: Error result: 1269611253
    2014-09-20 07:50:46 Slp: Result facility code: 940
    2014-09-20 07:50:46 Slp: Result error code: 47861
    Hi,
    For above error the error code is 2 which means system cannot find the file specified. It is saying it is unable to write at location which means SQL server account does not have access to
    C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140920_074907\Registry_SOFTWARE_Microsoft_MSSQLServer.reg_
    You can manually go to the location and add required rights may be installable is corrupt
    Now did you ran SQL server setup as administrator. Always right click on setup.exe file and select run as administrator.
    Please make sure you disable antivirus running on machine. Also if you have any registry scanner software which scans registry remove it as well.
    Below thread might be helpful
    http://social.msdn.microsoft.com/Forums/sqlserver/en-US/d425791a-9a7c-4c16-9e93-d348ecde3a3f/sql-server-2008-r2-install-fails-on-win-2008-r2-x64-std-server-with-workflowxmltext-msg-error-help?forum=sqlsetupandupgrade
    Can you also post summary.txt file
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it
    My Technet Articles

  • Should I Install SQL Server 2008 R2 on a VHDX or Pass-through disk

    Hi,
    I am in going to be setting a virtual server running Windows Server 2008 R2 on my Hyper-V cluster and I will be also adding SQL Server 2008 R2 once the OS is configured. Can you please suggest whether I should setup a VHDX or a pass-through disk? I have
    read articles online suggesting to use a pass-through disk from my SAN but I also read that since Windows Server 2012, VHDX is as good as a pass-through disk, especially because it will allow to have snapshots taken, unlike the pass-through which will not.
    Please advise on whether I should chose a pass-through disk or a VHDX.
    Thanks in advance,

    Hi Aquila,
    There are three basic types of Virtual Hard Disks (VHDs) that you can use with VMs, such as dynamic VHD, fixed VHD, and differencing disks. Usually, the fixed VHD is almost always the best choice for virtualized SQL Server systems that run a production workload.
    You can use dynamic disks for noncritical production workloads, as well as for testing, training, and lab environments. Pass-through disks offer the highest level of performance for VM storage, however, Pass-through disks can't be moved without incurring downtime,
    and they don't support VM snapshots. For more information, see:http://sqlmag.com/sql-server/sql-server-virtualization-tips
    In addition, there is an article about how to setup boot from VHD for a SQL Server. You can review the following link.
    http://www.mssqltips.com/sqlservertip/2327/how-to-setup-boot-from-vhd-for-a-sql-server-test-or-development-environment/
    Regards,
    Sofiya Li
    Sofiya Li
    TechNet Community Support

  • Need to connect SQL Server 2008 and CR 2008 via OLE DB SQL Server Provider

    I am relatively new to Crystal but have done some minor design/layout work in the past. I just purchased CR 2008 and dowloaded a Eval Copy of SQL Server 2008 to build test reports that will then be uploaded to a hosted web app we use for use with live data.
    I am having some trouble, however, getting SQL server and CR 08 to talk the way I need them to. We have to use the OLE DB for SQL Server Provider connection for the reports to work in our hosted live environment but I cannot get this to work on SQL 2008. The server never appears in the Server dropdown and if I manually type it get the following error:
    failed to open connection.
    Detail ADO Error Code: 0x80004005
    Source: Microsoft OLE DB Provider for SQL Server
    Description: [DBNETLIB][ConnectionOpen (Connect()).]SQL Server does not exist or access is denied.
    SQL State: 08001
    Native Error: 17 [Database Vendor Code: 17 ]
    I am setting up the connection through the Database Expert choosing the OLE DB (ADO) folder and then selecting 'Microsoft OLE DB Provider for SQL Server' then entering my server name, user id, password, and Database name.
    I have uninstalled and reinstalled everything twice. I have installed the Microsoft SQL Server 2008 Analysis Service 10.0 OLEDB Provider pack.
    My provider/host does use SQL Server 2005 but since I can't get a free Evaluation version of it I have to use 2008 for my local copy. I have searched the web over (including here) and cannot find an answer to my issue.
    I cannot use SQL Server Express version because our copy of the DB is too big. I cannot use the Native 10 provider as the reports will not work once I have uploaded them to the live data.
    any help anyone can provide for this would be GREATLY appreciated. Thank you and sorry if this is a dupe post. I have searched everywhere and cannot find the answer.

    Hello,
    Go to Microsoft's site and download their OLE DB test tool and test the connection. Did you install the MS client tools to test the connection also?
    As a test try creating an ODBC System DSN just to verify you can connect and create a report also.
    And don't use the SA account, MS 2008 disabled it, sort of, so you'll have to create a new account and grant permissions to any table you need to use.
    SQL 2008 changed security model big time so it's not the same as 2005 once was....
    Good luck
    Don

  • Check for duplicate invoices and trigger a workflow

    Hello All,
        I have a requirement to check for duplicate invoices in AP(Accounts payable) and trigger a workflow when duplicate invoices are found. I a not sure how to do any of the above. Please  let me know if you have any information on:
    1) Checking for duplicate invoices in AP
    2) Trigger a workflow
    Are there any standard workflows that checks duplicate invoices?
    Thanks.
    --Mithun

    Hi MD,
    I doubt if system gives an error on FI side when a duplicate invoice is posted.
    I feel you would require a BAdi for it, where you can call your WF using FM SAP_WAPI_START_WORKFLOW.
    Hope it helps.
    Aditya
    P.S also ask your Func Consultants, if there are any settings in the Customization, where you could capture Inv Dt, Inv Amt, Vendor, Company code.
    Edited by: Aditya Varrier on Oct 15, 2008 9:38 AM

  • Check for duplicate record in SQL database before doing INSERT

    Hey guys,
           This is part powershell app doing a SQL insert. BUt my question really relates to the SQL insert. I need to do a check of the database PRIOR to doing the insert to check for duplicate records and if it exists then that record needs
    to be overwritten. I'm not sure how to accomplish this task. My back end is a SQL 2000 Server. I'm piping the data into my insert statement from a powershell FileSystemWatcher app. In my scenario here if the file dumped into a directory starts with I it gets
    written to a SQL database otherwise it gets written to an Access Table. I know silly, but thats the environment im in. haha.
    Any help is appreciated.
    Thanks in Advance
    Rich T.
    #### DEFINE WATCH FOLDERS AND DEFAULT FILE EXTENSION TO WATCH FOR ####
                $cofa_folder = '\\cpsfs001\Data_pvs\TestCofA'
                $bulk_folder = '\\cpsfs001\PVS\Subsidiary\Nolwood\McWood\POD'
                $filter = '*.tif'
                $cofa = New-Object IO.FileSystemWatcher $cofa_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
                $bulk = New-Object IO.FileSystemWatcher $bulk_folder, $filter -Property @{ IncludeSubdirectories = $false; EnableRaisingEvents= $true; NotifyFilter = [IO.NotifyFilters]'FileName, LastWrite' }
    #### CERTIFICATE OF ANALYSIS AND PACKAGE SHIPPER PROCESSING ####
                Register-ObjectEvent $cofa Created -SourceIdentifier COFA/PACKAGE -Action {
           $name = $Event.SourceEventArgs.Name
           $changeType = $Event.SourceEventArgs.ChangeType
           $timeStamp = $Event.TimeGenerated
    #### CERTIFICATE OF ANALYSIS PROCESS BEGINS ####
                $test=$name.StartsWith("I")
         if ($test -eq $true) {
                $pos = $name.IndexOf(".")
           $left=$name.substring(0,$pos)
           $pos = $left.IndexOf("L")
           $tempItem=$left.substring(0,$pos)
           $lot = $left.Substring($pos + 1)
           $item=$tempItem.Substring(1)
                Write-Host "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp"  -fore green
                Out-File -FilePath c:\OutputLogs\CofA.csv -Append -InputObject "in_item_key $item in_lot_key $lot imgfilename $name in_cofa_crtdt $timestamp"
                start-sleep -s 5
                $conn = New-Object System.Data.SqlClient.SqlConnection("Data Source=PVSNTDB33; Initial Catalog=adagecopy_daily; Integrated Security=TRUE")
                $conn.Open()
                $insert_stmt = "INSERT INTO in_cofa_pvs (in_item_key, in_lot_key, imgfileName, in_cofa_crtdt) VALUES ('$item','$lot','$name','$timestamp')"
                $cmd = $conn.CreateCommand()
                $cmd.CommandText = $insert_stmt
                $cmd.ExecuteNonQuery()
                $conn.Close()
    #### PACKAGE SHIPPER PROCESS BEGINS ####
              elseif ($test -eq $false) {
                $pos = $name.IndexOf(".")
           $left=$name.substring(0,$pos)
           $pos = $left.IndexOf("O")
           $tempItem=$left.substring(0,$pos)
           $order = $left.Substring($pos + 1)
           $shipid=$tempItem.Substring(1)
                Write-Host "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp"  -fore green
                Out-File -FilePath c:\OutputLogs\PackageShipper.csv -Append -InputObject "so_hdr_key $order so_ship_key $shipid imgfilename $name in_cofa_crtdt $timestamp"
    Rich Thompson

    Hi
    Since SQL Server 2000 has been out of support, I recommend you to upgrade the SQL Server 2000 to a higher version, such as SQL Server 2005 or SQL Server 2008.
    According to your description, you can try the following methods to check duplicate record in SQL Server.
    1. You can use
    RAISERROR to check the duplicate record, if exists then RAISERROR unless insert accordingly, code block is given below:
    IF EXISTS (SELECT 1 FROM TableName AS t
    WHERE t.Column1 = @ Column1
    AND t.Column2 = @ Column2)
    BEGIN
    RAISERROR(‘Duplicate records’,18,1)
    END
    ELSE
    BEGIN
    INSERT INTO TableName (Column1, Column2, Column3)
    SELECT @ Column1, @ Column2, @ Column3
    END
    2. Also you can create UNIQUE INDEX or UNIQUE CONSTRAINT on the column of a table, when you try to INSERT a value that conflicts with the INDEX/CONSTRAINT, an exception will be thrown. 
    Add the unique index:
    CREATE UNIQUE INDEX Unique_Index_name ON TableName(ColumnName)
    Add the unique constraint:
    ALTER TABLE TableName
    ADD CONSTRAINT Unique_Contraint_Name
    UNIQUE (ColumnName)
    Thanks
    Lydia Zhang

  • Problem in Set Check for Duplicate Invoices

    Hi,
    I have did all the required setting s for check duplicate invoice , but when i do miro , its not giving any error or warning msge.. i did all the config  as per blw link..
    FYI-  in migo, i have entered the 3434 as a invoice ref # in delveriy note column and while doing miro , i have entered 3434 in ref column and give the 3434 as a dlvery note # in item tab .. but its not giving any error?
    Pls guide, where the mistake has gone wrongly??
    Problem in Set Check for Duplicate Invoices
    Edited by: UJ on May 15, 2009 1:45 PM

    Hello,
    Hope you have done all the required configurations for the checking of double invoice and ticked the vendor for the double invoice checking in vendor master record.
    You have to understand the way the system does the double invoice check.
    As per the configuration, if the system identifies an invoice for a vendor whose double invoice check is activated, at the time of MIRO, system will update a separate table.
    So system will check for the double invoice entry among the invoices entered after making the tick in the vendor master.
    i meant to say that, if you are introducing this double invoice check in between the transactions, the check will be valid only for the invoices entered after the activation of double invoice check.
    Regards

  • Set Check for Duplicate Invoices.

    Hi,
    what is the difference if is set "<b>Set Check for Duplicate Invoices</b>"
    in MIRO?
    Best regards

    HI,
    This check will prevent incoming invoices being accidentally entered and paid more than once.
    You can choose whether to activate or deactivate the check criteria of company code, reference document number and invoice date for each company code. The more criteria that you activate, the lower the probability of the system finding a duplicate invoice.
    The company code check makes sense if you work with more than one company code.
    Depending on the reference document number entry, the system checks as follows:
    1. If you have entered a reference document number, the system checks whether the invoice matches in the following attributes:
    Company code
    Vendor
    Currency
    Invoice date
    Reference document number
    2. If you have not entered a reference document number, the system
    3. checks whether the invoice matches in the following attributes:
    Company code
    Vendor
    Currency
    Invoice date
    Amount in
    document currency
    Depending on the system settings, a warning message or an error message appears if the system finds an invoice that matches all attributes.
    Requirements
    The field Chk double inv. (Check for duplicate invoice) must be flagged on the Accounting view in the vendor master record.
    Regards
    Aasif

  • Does itunes check for duplicate purchases?

    I got a new version of itunes and I cannot have my purchased next to my new purchases.  Does itunes check for duplicates? Or are they happy to take your money?

    Maybe they will in a future update. Im not sure but I think they use to do this. IF they did Id say they stopped to make the record companys happy (And alittle richer)

  • Checking for duplicate primary keys on row inserts

    Checking for duplicate primary keys on row inserts
    I have a situation where I will be making bulk table inserts knowing that the primary key value will in some cases already exist. In this is the case I simply want to ignore the duplicate inserts.
    Should I be performing a sub-query on the table and using a statement like:
    where not exist in
    Or is there a cleaner way of discarding or checking for duplicates on insert.
    My concerns were mainly one of performance, as my routine will be inserting a few thousand rows in its operation.

    The MERGE commnad is a good option when a large percentage of the data will exist in the target because it is much more efficient to attempt to update then insert when the update affects zero rows than capture an error and convert it to an update.
    However, since in this case it would appear that only a few rows will alreadys exist and we want to ignore the duplicates when they exist then
    begin
    insert
    exception
    when dup_value_in_index then null;
    end
    would be the way to code this one. The bulk insert version has in 9.2 the ability to store the errors so that they can all be handled at once which means the rest of the array insert can work.
    HTH -- Mark D Powell --

  • How to check for duplicates - with a twist?

    As I'm importing music from my CD collection, is there a way to automatically check for duplicates - with an unusual twist?
    I already imported about 70 CDs using AAC format.
    I just bought a huge external drive specifically for storing my entire collection of CDs and LPs. Now that I have lots of space, I want to import everything in Apple Lossless format.
    Is there an automatic (or at least painless) way to check for duplicates as I'm importing CDs, and to have the old AAC music files over written by the new Apple Lossless files?

    Hi Clinto,
    Do you see the column headers above in itunes? They say Title, Album, Artist, etc. I don't know if it's the same for MAC but in Windows, Right Click on the column headers and click "Kind". This will display the format each song is in. If your column headers already take up all of your screen, you're gonna have to uncheck one to make room for "kind".
    Oh! and to overwrite existing files, make sure the ID3 tags are filled exactly to the old ones prior to ripping, though you don't need to fill all of them. I think you just fill the Artist, Album Artist, Album, and Title. A window will appear as you start to rip. It will ask if you want to overwrite the existing files, click "Yes". Again, don't know about Mac but it works this way in Windows.
    Message was edited by: fullcream

Maybe you are looking for

  • My Iphoto has crashed for the last month or so!  Please help!

    Hi all, I am a real apple amateur and newcomer.  And I have nobody to speak to about this problem, so please help!  My IPhoto has been crashing for the last month.  Every time that I open it, I get the spinning circle, that spins continuously, and I

  • Unable to invoke BPEL process from UCM

    Hi, I have installed UCM PS5. We have SOA PS3 also installed in the same machine in a different domain. I was able to connect to the BPEL server after enableing the UCM-BPEL component in UCM. I am able to view the process and have updated the payload

  • Styling lists/item renderers

    Hi, I've been using the Flash Builder 4 beta (SDK 10485) for some time and have a pretty good understanding of how styling components work. I've recently migrated a project to a retail copy of Flash Builder and have ran into a few problems regarding

  • Update 3G - Error code 1015

    Hi; Was given an iphone by a friend who said it weren't working anymore. Tried to get it into recovery mode to install IOS 4.2.3 (I think, anyway - doesn't show the version number now?) with iTunes 10.5.3.3 Went through the update process but then dr

  • How to find out execution frequency for store procedure

    We have several store procedures and I need to determine how often they been executed per hour for example for the last couple days. Does anybody can help me? Thanks.