Tag Info

New answers tagged

1

This type of expression is called a Ternary operator. Its standard form is condition ? value_if_true : value_if_false Using your example of (TableName == NULL) ? "0": TableName if TableName == NULL then "0" is returned if TableName !==Null then TableName is returned You could rewrite the ternary expression as if(TableName==NULL) then "0" else ...


3

It's what is known in programming as a Ternary Operator. It's common in C/C++, JavaScript and PHP (among other languages). As tombom states, the idea is that it is a short-hand if statement: <condition> ? <true-case-code> : <false-case-code>; SQL Server 2012 and above has it's own Ternary Operator in the form of the IIF statement. ...


1

This is short for <if> ? <then> : <else> at least in programming that is, like in C++ and so on.


1

This is not native functionality. You can encrypt: Nothing, Sensitive items, Everything. There is no capability to assign one key for development and one for execution. Instead, the way to restrict execution is through proper security, which is never the last item. If the SSIS package is loading a database, you ensure that only the correct user(s) can do ...


2

It would help to know which version of SQL Server you are using. You may get some information from the history of the job step itself. In SSMS, under SQL Server Agent, find the job. Right click the job and choose View History. Each entry in the Log File Viewer is one job run, so expand a failed run by clicking the [+] sign next to it. Highlight the ...


0

LEFT( REPLACE( (DT_STR, 20, 1252)(DATEADD( "D", (DT_I1)DATEPART("weekday",@[System::StartTime]) ==2 ? -3 : -1, @[System::StartTime])),"-","") ,8) + ".xlsx"


4

Getting a date To get the YYYYMMDD, sometimes written as CCYYMMDD, I would use an expression like (DT_WSTR,4)YEAR(@[System::StartTime]) + RIGHT("0" + (DT_WSTR,2)MONTH(@[System::StartTime]), 2) + RIGHT("0" + (DT_WSTR,2)DAY(@[System::StartTime]), 2) Reading that, I use the Year function to extract the 4 digit year and then cast that as a unicode string. ...


14

The OBJECTPROPERTY call requires a schema stability (Sch-S) lock, which is only incompatible with a schema modification (Sch-M) lock. The BULK INSERT will take a Sch-M lock in some circumstances. These are listed in the "Table Locking and Logging During Bulk Import" section of Guidelines for Optimizing Bulk Import in Books Online: If the destination ...


-1

I think you should debug SSIS package in visual studio, if you have solution file. I got this situation couple of month before, when I execute the package they stuck on the data flow. I had resolved my problem by removing the transaction script from the package. Because I importing bulk of data and transaction create kind of deadlock situation.... Hope ...


2

Annoying isn't it. I've done some research and it turns out it is incorrectly reporting a ANSI warning as an error (resolved in SQL Server 2012, no patch available for previous versions). One way to stop the error is to go through all your code, and wherever you have an aggregate function (e.g. SUM), use ISNULL to ensure the aggregated value can never be ...


0

This seems like you are running SSIS package through SQL agent job and error details are not accurate in your question,to know error details ,know name of package and run below query use ssisdb go select top 10* from catalog.event_messages ce join catalog.operations co on co.operation_id=ce.operation_id and co.object_name='your package name' ...



Top 50 recent answers are included