Excluding A Package From The Build Process
Jan 17, 2007There is some way to exclude a package from the build process of a SSIS project ?
Cosimo
There is some way to exclude a package from the build process of a SSIS project ?
Cosimo
My SSIS solution has about hundred packages and time to time I have to edit a package. I understand I could use 'Build' command to compile only updated package, as opposed to Rebuild which recomplies all of the packages.
Nevertheless, in both cases SSIS opens all of the packages in design environment before compilation. My packages are saved in SourceSafe and that process takes quite long and I was wondering if there was any other way to compile only updated package where none of the other packages are opened during Build/Rebuild process? For example we could use dtutil to deploy only updated packages without running Package Installation Wizard.
Hi,
I'm working with SSIS and I would add the Integration Service project to the daily build process but I need to know how to generate the <name>.SSISDeploymentManifest other then invoking the devenv.exe.
Thanks,
Dear all,
I'd like to get simple and clear explanation of the cube in data mining, and 3 notions we encounter a lot : Build, Deploy, and Process.
(1) What is the cube that is created when we deploy a mining solution/project?
I wonder what type of cubes they are because although the dialog on deploy/process
show that cube, after successful deployment we still don't see the cube in Cubes folder
of the project.
(2) Why the SQL Server created that cube? Even though we process only one table
and only use case-table (without nested table)
(3) Can someone explain these 3 concepts with CLEAR differences between them?
(A) Build
(B) Deploy
(C) Process
As far as I know, the stages are like that : build, then deploy, then process. Also, it seems
to me that those operations do not create objects inside 'Relational' database, but create
objects (binary and text, with text files usually in XMLA programming language) in the
related project's folders and subfolders. Any good explanation is appreciated.
Bernaridho
Hi,
In my application, i have two package, parent package and child package. the parent package is executing child package using a Execute Package Task.
"Execute Out Of Process" property of Execute Package Task is set to TRUE. means the child package will be run in separate process not in the process of Parent package.
this was working fine, but at a particular client location. its failing the error is "not able to load child package".
for me it seems some setting on server restricting to create separate process for child package execution.
when "Execute Out Of Process" property of Execute Package Task is set to FALSE. its working fine.
can anyone help what could cause its failure with property set to TRUE.
Appreciate any help.
Hello.
I am attempting to install the first of the cumulative hotfix packages ( SQL2005-KB918222-x64-ENU.exe) after applying Service Pack 1 to a SQL Server 2005 std edn 64-bit installation. The service pack installed no problem but the hot fix fails with the following errors in the log file below.
I have installed the 32-bit versions of the hotfix packages onto a different server and I did not get these errors.
Any help on how to sort this out would be much appreciated!
08/23/2006 15:03:44.592 ================================================================================
08/23/2006 15:03:44.608 Hotfix package launched
08/23/2006 15:03:45.842 Product discovery successfully completed during the install process for MSSQLSERVER
08/23/2006 15:03:45.858 SP Level check successfully completed during the install process for MSSQLSERVER
08/23/2006 15:03:45.889 Product language check successfully completed during the install process for MSSQLSERVER
08/23/2006 15:03:45.905 Product version check successfully completed during the install process for MSSQLSERVER
08/23/2006 15:03:45.920 Command-line instance name check completed during the install process
08/23/2006 15:03:45.936 Baseline build check completed during the install process
08/23/2006 15:03:52.107 Attempting to install instance: MSSQLSERVER
08/23/2006 15:03:52.154 Attempting to install target: SRVLEBIZTALK
08/23/2006 15:03:52.170 Attempting to check for locked files: sqlrun_sql.msp
08/23/2006 15:03:52.232 Attempting to check for locked files: \SRVLEBIZTALKd$dd32a156dacc8dbe70a862647d70hotfixsqlFilessqlrun_sql.msp
08/23/2006 15:03:52.248 Creating MSP locked file check log at: C:WINDOWSHotfixSQL9LogsSQL9_Hotfix_KB918222_sqlrun_sql.msp.out
08/23/2006 15:04:02.107 MSP returned 1602: The user cancels installation.
08/23/2006 15:04:02.310 Successfully checked file: \SRVLEBIZTALKd$dd32a156dacc8dbe70a862647d70hotfixsqlFilessqlrun_sql.msp
08/23/2006 15:04:02.326 Successfully opened registry key: SystemCurrentControlSetControlSession Manager
08/23/2006 15:04:02.357 Failed to read registry key: PendingFileRenameOperations
08/23/2006 15:04:02.373 Failed to read associated hotfix build information for the following file: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnxmlfilt.dll
08/23/2006 15:04:02.388 Failed to read associated hotfix build information for the following file: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnThaWBrkr.dll
08/23/2006 15:04:02.435 Failed to read associated hotfix build information for the following file: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnquery.dll
08/23/2006 15:04:02.451 Failed to read associated hotfix build information for the following file: C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLBinnls400.dll.
-----------------------
It carries on with errors like the above but my post will be massive if I include it all, so below is the last few lines of the log file.
--------------------------
08/23/2006 15:04:07.591 Failed to read associated hotfix build information for the following file: C:Program Files (x86)Microsoft SQL Server90SharedMicrosoft.SqlSac.Public.dll
08/23/2006 15:04:07.653 Attempting to install file: sqlrun_sql.msp
08/23/2006 15:04:07.700 Attempting to install file: \SRVLEBIZTALKd$dd32a156dacc8dbe70a862647d70hotfixsqlFilessqlrun_sql.msp
08/23/2006 15:04:07.716 Creating MSP install log file at: C:WINDOWSHotfixSQL9LogsSQL9_Hotfix_KB918222_sqlrun_sql.msp.log
08/23/2006 15:04:07.732 Successfully opened registry key: SoftwarePoliciesMicrosoftWindowsInstaller
08/23/2006 15:04:07.747 Failed to read registry key: Debug
08/23/2006 15:05:11.197 MSP returned 1603: A fatal error occurred during installation.
08/23/2006 15:05:11.212 Successfully opened registry key: SoftwarePoliciesMicrosoftWindowsInstaller
08/23/2006 15:05:11.244 Failed to read registry key: Debug
08/23/2006 15:05:11.259 Unable to install MSP file: \SRVLEBIZTALKd$dd32a156dacc8dbe70a862647d70hotfixsqlFilessqlrun_sql.msp
08/23/2006 15:05:11.275 The following exception occurred: Unable to install Windows Installer MSP file Date: 08/23/2006 15:05:11.275 File: depotsqlvaultstablesetupmainl1setupsqlsesqlsedllcopyengine.cpp Line: 856
08/23/2006 15:05:11.322
08/23/2006 15:05:11.353 Product Status Summary:
08/23/2006 15:05:11.369 Product: SQL Server Database Services 2005 (64-bit)
08/23/2006 15:05:11.384 MSSQLSERVER - Failure
08/23/2006 15:05:11.415 Details: Unable to install Windows Installer MSP file
I have a table with embedded files in it and also ftp server/user/pwd fields so that each record has all the data and information required and need to configure an SSIS package to to FTP them to the destination as specified in the record within the databaseAt the moment I have a data flow task which uses a Derived Column and an Export Column transformation which creates the files to a temp folder then it runs a ForEach loop container back on the control flow to FTP each file and to then move each file to an archive folder.
All I think I need to know how to do is to somehow control the FTP connection settings with the fields from the database within this foreach loop, but it is a for each file collection. I also need to update each record saying it has been FTP'd as well
Do I need to have an initial query outside of this foreach loop to populate an array which can be used for the 4 FTP connection fields (server/user/pwd/directory), if so how?
Any ideas as to how to correctly finish this package.
Thanks
I've read about this hotfix at http://www.kbalertz.com/Feedback_933097.aspx but I can't find anything on microsoft.com about it. It sounds like a worthwhile hotfix, but I'm wondering about the absence of an announcement on microsoft.com.
Anyone else know about this hotfix?
Thanks!
Hello,
we have automated build on every night. In our solution is SSIS project, where each package is encrypted per password. We call build process per command line like this..
C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (c:DevelopmentX3\X3.sln /build Release)' in 'c:DevelopmentProjectsDailyBuild
Through build process we get a error:
External Program Failed: C:ProgrammeMicrosoft Visual Studio 8Common7IDEdevenv.exe (return code was 1):
We think a reason is, that on build of SSIS project must be entered a password. You can wonder for what we need that SSIS packages are part of our build. We hope that on build process is also created Deployment Utility, if so set in dtproject.user. Is it so? Is there any way to create Deployment utility on automated build process? Can be a password provided pre command line?
with best regards
Anton Kalcik
I expect to create a trigger to post updated data from GoldMine hosted in MS-SQL to my migration MS-SQL database in the appropriate tables mirroring the destination PICK data tables.
Then, start an ActiveX DTS package to migrate the data via a PICK DSN to data tables in a PICK database.
Currently the dba has been able to use VB6.0 with ADO to push data into PICK. He also was able to do similar using MS-Access.
However, PICK (RainingData) is of the opinion that he must script a PICK server side Basic (RealBasic) insert script to receive the data from a VB6.0 application triggered by MS-SQL.
I think that I could skip the Basic script and go direct with ADO in DTS as he has before with VB6.0 with a user form.
Can I have the trigger start the DTS or should I just schedule it to run as often as necessary to update the PICK database?
FYI, this is a one-way data flow into PICK.
TIA
Anyone within the L.A. CA area that has experience with PICK and MS-SQL can get some well paid consulting hours. I'm just the GoldMine GMT whose been enlisted to get the job done, but would appreciate an expert with PICK to join the project.
jEfFp...
I am unable to call a package with a cube processing task... it will not execute. I have even tried to simply call a package to process foodmart on my own machine and it will not run. The package when run manually executes fine.
Any ideas? Thanks in advance
Hello All SQL Experts.
Need your advise on this. I have a DTS package which check for 2 dates and execute tasks when the date do not matched. The problem I am facing now is I could make the next step to start only if the previous step is completed. When the DTS package is executed, all steps being completed almost at the same time. See below / attached DTS package.
In the disgram, I have labelled 5 steps A ~ E, each step needs info from the finished product from previous step to produce correct result in it's own step. I couldn't schedule each step to run at different time because the DTS kicks off based on a file that comes in and each step doesn't have a fixed processing time to complete.
I have tried using On Success or On Complete and both options start the next step immediately not not wait for the job the complete or success. I guess this is because I have transferred the command to external when using command. Is there a way to control by some delay between each task?
Please advise. Thank you.
Each of the step has something like below (refreshing of excel file with macro build in):- I cannot build all macros into one file and run from the main excel.
declare @MainUpdate datetime
declare @TempUpdate datetime
select @MainUpdate=Main_Update_CET from APMEAPV_Compare
select @TempUpdate=Temp_Update_CET from APMEAPV_Compare
--select @MainUpdate, @TempUpdate
if @MainUpdate<>@TempUpdate
begin
DECLARE @commandK varchar(1000)
SET @commandK='Start Excel.exe "D:Daily_Status_Report_EDWHEDWH_Runbook_BTS.xls"'
exec master..xp_cmdshell @commandK, No_Output
END
Hello,
I have several DTS packages that take data from SQL Server and exports them onto an Access DB located on the network. Basically, one Execute Process Task from within my DTS package takes the Access DB and zips it while another such task copies the zipped DB and pastes it onto another location on the network. All this works fine.
This export process happens once a month so each month I have to manually add a datestamp to the end of the Access DB file that’s being exported to distinguish it from prior month's export. For example, this month's export file would have AccessDB_20040727.mdb name and the next month it would be AccessDB_20040820.mdb (date is determined based on the date the output is exported on). AccessDB.mdb is the default name of the export DB and datestamp is added at the end of the file name depending on what date the export was run. As I said, I can do this manually each month and it works fine.
I want to, however, know if there is a way to automatically supply the datestamp to the Execute Process Task's Parameters' text box? Following is what I have right now in the Parameters box:
\ghf1-ndc8-sqll$productionoutputlob200406LOB_CF_forDril ldown_All_20040727.zip \ghf1-ndc8-sqll$productionoutputlob200406LOB_CF_forDril ldown_All.mdb
I want to take above text from the parameters box and replace it with something like:
\ghf1-ndc8-sqll$productionoutputlob200406FileName_RunDa te.zip \ghf1-ndc8-sqll$productionoutputlob200406LOB_CF_forDril ldown_All.mdb
Where FileName_RunDate is a variable/placeholder for the name of the output with the datestamp the output is exported on.
There are three different Execute Process Tasks that are happening within each of my DTS packages so it's a time consuming job to have to manually add a datestamp to each package every month when data is exported.
Does anyone know if what I am asking is doable? If I can use a variable in the parameters box of each Execute Process Task’s properties and supply current datestamp values to it prior to executing the package each month? If so then what are the ways? How would I do that?
Thanks much.
JN
When I start creating a new DTS Package and I choose the Analysis ProcessingTask icon, I only have the option of working with the local MicrosoftAnalysis Server.How can I choose a remote server's Analysis Server in order to process itsdatabase?Thank you
View 1 Replies View RelatedTrying to run a SSIS package from a SQL job, and the package itself has a step that calls a process task that runs a batch file. The syntax in the process task I have is the following:
executable: c:windowssystem32cmd.exe
Arguments: /C e:SungardPTAencryptfile.bat
Working Directory: e:sungardpta
I keep getting the following in my log:
PackageStart,MIMKEIMC11N,MI rustserviceadmin,PTADailyTransactionExtract,{46F7381F-B345-47DC-BFC0-17CCF02A935A},{F82C7944-D28C-4F70-8CB7-F0BD7ED748D2},1/29/2008 1:59:11 PM,1/29/2008 1:59:11 PM,0,0x,Beginning of package execution.
OnError,MIMKEIMC11N,MI rustserviceadmin,EncryptFiles,{FCF5B653-CC05-4183-981B-F5EF4906DD09},{F82C7944-D28C-4F70-8CB7-F0BD7ED748D2},1/29/2008 1:59:12 PM,1/29/2008 1:59:12 PM,-1073573551,0x,In Executing "c:windowssystem32cmd.exe" "/C e:SungardPTAencryptfile.bat" at "e:sungardpta", The process exit code was "1" while the expected was "0".
OnError,MIMKEIMC11N,MI rustserviceadmin,PTADailyTransactionExtract,{46F7381F-B345-47DC-BFC0-17CCF02A935A},{F82C7944-D28C-4F70-8CB7-F0BD7ED748D2},1/29/2008 1:59:12 PM,1/29/2008 1:59:12 PM,-1073573551,0x,In Executing "c:windowssystem32cmd.exe" "/C e:SungardPTAencryptfile.bat" at "e:sungardpta", The process exit code was "1" while the expected was "0".
OnTaskFailed,MIMKEIMC11N,MI rustserviceadmin,EncryptFiles,{FCF5B653-CC05-4183-981B-F5EF4906DD09},{F82C7944-D28C-4F70-8CB7-F0BD7ED748D2},1/29/2008 1:59:12 PM,1/29/2008 1:59:12 PM,0,0x,(null)
PackageEnd,MIMKEIMC11N,MI rustserviceadmin,PTADailyTransactionExtract,{46F7381F-B345-47DC-BFC0-17CCF02A935A},{F82C7944-D28C-4F70-8CB7-F0BD7ED748D2},1/29/2008 1:59:12 PM,1/29/2008 1:59:12 PM,1,0x,End of package execution.
Any help would be greatly appreciated
Has anyone ever used an Execute Package Task to call a child package, and the Execute Package Task's ExecuteOutOfProcess = True? Unless the account it runs under is an Administrator on the box, it fails for me with "Error 0x80070005 while loading package file "C:program filesmicrosoft sql server90dtsPackagesETLFact_SalesTransaction_Tracking.dtsx". Access is denied."
This is eating up hours and hours of my time, time we can't afford. Is anyone able to successfully call a child package out of process?
Hello
I'm trying to run a task that executes a script file (cmd). When i run it with in bids with my own users (domain admin) it works. When i start a cmd prompt and try to run the cmd file directly from the network location where it is it works (with my own rights and with the sql server agent user).
Now when i try to run in from smss > agent jobs > job and run job it never completes. Im not getting any error message either it just keeps on running on the step ??? It seems like a rights issue, but the account running the sql server agent is able to execute the cmd file directly from the command prompt.
There are no errors in any error logs anywhere and no error is displayed...
Ps. Im running the job step as a integration service pacgake.
Hi.
I have a master package, which executes child packages that are located on a SQL Server. The Child packages execute other child packages which are also located on the SQL server.
Everything works fine when I execute in process. But when I set the parameter in the mater package ExecutePackageTask to ExecuteOutOfProcess = True, I get the following error
Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "Row Count" (5349).
Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Custom Split" (6399).
Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "SCR Data Source" (5100).
Error: 0xC00470FE at DFT Load Data, DTS.Pipeline: SSIS Error Code DTS_E_PRODUCTLEVELTOLOW. The product level is insufficient for component "DST_SCR Load Data" (6149).
The child packages all run fine when executed directly, and the master package runs fine if Execute Out of Process is False.
Any help would be greatly appreciated.
Thanks
Geoff.
Hi,
I was trying to extract data from the source server using OLEDB Source and SQL Server Destination when i encountered this error:
"Transaction (Process ID 135) was deadlocked on lock resources with another process and has been chosen as the deadlock victim. Rerun the transaction.".
What must be done so that even if the table being queried is locked, i wouldn't experience any deadlock?
cherriesh
Hello all,
I am running into an interesting scenario on my desktop. I'm running developer edition on Windows XP Professional (9.00.3042.00 SP2 Developer Edition). OS is autopatched via corporate policy and I saw some patches go in last week. This machine is also a hand-me-down so I don't have a clean install of the databases on the machine but I am local admin.
So, starting last week after a forced remote reboot (also a policy) I noticed a few of the databases didn't start back up. I chalked it up to the hard shutdown and went along my merry way. Friday however I know I shut my machine down nicely and this morning when I booted up, I was in the same state I was last Wenesday. 7 of the 18 databases on my machine came up with
FCB:pen: Operating system error 32(The process cannot access the file because it is being used by another process.) occurred while creating or opening file 'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf'. Diagnose and correct the operating system error, and retry the operation.
and it also logs
FCB:pen failed: Could not open file C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataTest.mdf for file number 1. OS error: 32(The process cannot access the file because it is being used by another process.).
I've caught references to the auto close feature being a possible culprit, no dice as the databases in question are set to False. Recovery mode varies on the databases from Simple to Full. If I cycle the SQL Server service, whatever transient issue it was having with those files is gone.
As much as I'd love to disable the virus scanner, network security would not be amused. The data and log files appear to have the same permissions as unaffected database files. Nothing's set to read only or archive as I've caught on other forums as possible gremlins. I have sufficient disk space and the databases are set for unrestricted growth.
Any thoughts on what I could look at? If it was everything coming up in RECOVERY_PENDING it's make more sense to me than a hit or miss type of thing I'm experiencing now.
Dear list
Im designing a package that uses Microsofts preplog.exe to prepare web log files to be imported into SQL Server
What Im trying to do is convert this cmd that works into an execute process task
D:SSIS ProcessPrepweblogProcessLoad>preplog ex.log > out.log
the above dos cmd works 100%
However when I use the Execute Process Task I get this error
[Execute Process Task] Error: In Executing "D:SSIS ProcessPrepweblogProcessLoadpreplog.exe" "" at "D:SSIS ProcessPrepweblogProcessLoad", The process exit code was "-1" while the expected was "0".
There are two package varaibles
User::gsPreplogInput = ex.log
User::gsPreplogOutput = out.log
Here are the task properties
RequireFullFileName = True
Executable = D:SSIS ProcessPrepweblogProcessLoadpreplog.exe
Arguments =
WorkingDirectory = D:SSIS ProcessPrepweblogProcessLoad
StandardInputVariable = User::gsPreplogInput
StandardOutputVariable = User::gsPreplogOutput
StandardErrorVariable =
FailTaskIfReturnCodeIsNotSuccessValue = True
SuccessValue = 0
TimeOut = 0
thanks in advance
Dave
How do I use the execute process task? I am trying to unzip the file using the freeware PZUnzip.exe and I tried to place the entire command in a batch file and specified the working directory as the location of the batch file, but the task fails with the error:
SSIS package "IngramWeeklyPOS.dtsx" starting.
Error: 0xC0029151 at Unzip download file, Execute Process Task: In Executing "C:ETLPOSDataIngramWeeklyUnzip.bat" "" at "C:ETLPOSDataIngramWeekly", The process exit code was "1" while the expected was "0".
Task failed: Unzip download file
SSIS package "IngramWeeklyPOS.dtsx" finished: Success.
Then I tried to specify the exe directly in the Executable property and the agruments as the location of the zip file and the directory to unzip the files in, but this time it fails with the following message:
SSIS package "IngramWeeklyPOS.dtsx" starting.
Error: 0xC002F304 at Unzip download file, Execute Process Task: An error occurred with the following error message: "%1 is not a valid Win32 application".
Task failed: Unzip download file
SSIS package "IngramWeeklyPOS.dtsx" finished: Success.
The command in the batch file when run from the command line works perfectly and unzips the file, so there is absolutely no problem with the command, I believe it is just the set up of the variables on the execute process task editor under Process. Any input on resolving this will be much appreciated.
Thanks,
Monisha
I am designing a utility which will keep two similar databases in sync. In other words, copying the new data from db1 to db2 and updating the old data from db1 to db2.
For this I am making use of the 'Tablediff' utility which when provided with server name, database, table info will generate .sql file which can be used to keep the target table in sync with the source table.
I am using the Execute Process Task and the process parameters I am providing are:
WorkingDirectory : C:Program Files (x86)Microsoft SQL Server90COM
Executable : C:SQL_bat_FilesSQL5TC_CTIcustomer.bat
The customer.bat file will have the following code:
tablediff -sourceserver "LV-SQL5" -sourcedatabase "TC_CTI" -sourcetable "CUSTOMER_1" -destinationserver "LV-SQL2" -destinationdatabase "TC_CTI" -destinationtable "CUSTOMER" -f "c:SQL_bat_Filessql5TC_CTIsql_filescustomer1"
the .sql file will be generated at: C:SQL_bat_Filessql5TC_CTIsql_filescustomer1.
The Problem:
The Execute Process Task is working fine, ie., the tables are being compared correctly and the .SQL file is being generated as desired. But the task as such is reporting faliure with the following error :
[Execute Process Task] Error: In Executing "C:SQL_bat_FilesSQL5TC_CTIpackage_occurrence.bat" "" at "C:Program Files (x86)Microsoft SQL Server90COM", The process exit code was "2" while the expected was "0". ]
Some of you may suggest to just set the ForceExecutionResult = Success (infact this is what I am doing now just to get the program working), but, this is not what I desire.
Can anyone help ?
I'm pulling data from Oracle db and load into MS-SQL 2008.For my data type checks during the data load process, what are options to ensure that the data being processed wouldn't fail. such that I can verify first in-hand with the target type of data and then if its valid format load it into destination table else mark it with error flag and push into errors table... All this at the row level.One way I can think of is to load into a staging table then get the source & destination table -column data types, compare them and proceed.
should I just try loading the data directly and if it fails try trouble shooting(which could be a difficult task as I wouldn't know what caused error...)
Hello,
I'm trying to figure out the best way to approach this seemingly simple task in Reporting Services 2005, but have come up with nothing but frustration. Any help would be appreciated!
Here's the basic idea:
SELECT Server.Database1.Employee, Server.Database1.HomeDept, Server.Database2.WorkedDept
FROM Server.Database1, Server.Database2
I need to exclude certain combinations of HomeDept/WorkedDept (about 11)...such as 1015/2223, 1015/2226, 2002/4422, 2002/8742, 2002/2342, etc. I want any other combinations of HomeDept 1015 & 2002 to be selected (which would be hundreds).
I've tried:
WHERE (Server.Database1.HomeDept <> '1015' AND Server.Database2.WorkedDept NOT IN ('2223','2226')) AND Server.Database1.HomeDept <> '2002' AND Server.Database2.WorkedDept NOT IN ('4422','8742','2342'))
(and all combinations of NOT IN, <>, and parenthesis placement...I even tried to do each exception separately)
What happens is that all instances of HomeDept 1015 and 2002 and all instances of WorkedDept 2223, 2226, 4422, 8742, and 2342 are excluded.
The SQL Query Designer will remove parenthesis so that the HomeDept exclusion is processed separately from the WorkedDept.
I've tried to do the SQL in the Generic Query Designer, so the SQL Query Designer doesn't reformat it, and it still returns the same results.
This behavior only seems to happen when using <> for both, NOT IN for both, or a combo of NOT and <>. If I used = for the HomeDept, the exclusion of the WorkedDept worked fine.
Any suggestions?
The script basically maps ALL products to customer levels. The Delete statement at the start is needed to make sure that any deleted products or temporary mapped products are removed once a week. However I want to map some products to CustomerID's 9,10 and 14 only. But when I run this statement it maps all products to all customer levels. What I want is thisAll products mapped to customer levels 9,10 and 14Then every other product mapped to customer levels 0,5,7, and 8 but not those extra ones in 9,10 and 14.
DELETE FROM ProductCustomerLevel
WHERE CustomerLevelID IN (0, 5, 7, 8, 9, 10, 14)
INSERT ProductCustomerLevel
(
ProductID,
CustomerLevelID
[code]....
I have to exclude some records from the data flow.
If there is more than one record with equal col1 and col2, I need to exclude both records.
I can't do this operation in the OLE DB Source because I have to run some transformations before I run the col1-col2-equality check.
ANy ideas? Is aggregation transformation way to go? How do I tell to the aggr. transf to do a having count() > 1?
Hi Folks,
I am having this table locking issue that I need to start paying attention to as its getting more frequent.
The problem is that the data in the tables is live finance data that needs to be changed and viewed almost real time so what I have picked up so far is that using 'table Hints' may not be a good idea.
I have a guy at work telling me that introducing a data access layer is the only way to solve this, I am not convinced but havnt enough knowledge to back my own feeling up. (asp system not .net).
Thanks in advance
We are facing deadlock issue in our web application. The below message is coming:
> Session ID: pwdagc55bdps0q45q0j4ux55
> Location: xxx.xxx.xxx.xxx
> Error in: http://xxx.xxx.xxx.xxx:xxxx/Manhatta...Bar=&Mode=Edit
> Notes:
> Parameters:
> __EVENTTARGET:
> __EVENTARGUMENT:
[code].....
I would like to exclude any parameter that is empty from the SELECT
command? How do I do this? This is part of a stored
procedure.
SELECT PersonID FROM Persons WHERE
(FirstName = @firstname) AND
(LastName = @lastname) AND
(SSN = @ssn) AND
(AddressID = @addressid) AND
(DOB = @dob) AND
(Middle = @middle)
THanks
Does anyone know how to write code to tell the amount of days between 2 dates excluding Saturday and Sunday.
Datediff will tell me the total amount of days and I guess I need some logic to look at the startdate and manipulate the total after the fact.
Any thoughts or solutions out there?
and generating a report from an SQL table, and need to know how to exclude records that are "duplicates". Not duplicates in a sense that every field is identical, but duplicates in a sense where everything except the unique identifier is identical. Is there a quick and easy way to do this?
View 5 Replies View RelatedI'm having a problem writing a SQL query that excludes certain data. This is for a pay stub application to display current and previous paycheck stubs. To calculate certain data such as YTD figures and time off, we SUM on other tables. However, to display correctly, I can't SUM bonus checks for the current payperiod ONLY - but for previous pay periods, I must SUM bonus checks.
Here's an example of my data:
No code has to be inserted here.
No code has to be inserted here.
No code has to be inserted here.
No code has to be inserted here.
Right now my SQL is this:
Code:
SELECT PR04PTF.PayCheckNo, SUM(PR11ERF_History.PayCheckAmt) AS [TotalSum]
FROM PR04PTF
INNER JOIN PR11ERF_History ON
PR11ERF_History.EmployeeID = PR04PTF.EmployeeID
AND PR11ERF_History.PayPeriodEnd <= PR04PTF.PayPeriodEnd
WHERE PR04PTF.EmployeeID=441