Tag: ssis

Need to change the file name (excel) using xp_cmdshell

In a file path (c:\Test\), I have an EXCEL file named as “SundayReport(WTD and MTD).xls“ I need to rename the file to “SundayReport_WTD_MTD).xls” using xp_cmdshell. Kindly suggest me how to change the name.

How to check email for file using c#?

I receive an email with an excel file every week. I know there are probably better ways to accomplish my goal, but would it be possible to have a script task in SSIS that can open email, look for a specific file name as an attachment and then copy that file to another location? Here […]

how many result test we can give a for execute sql task

I have an ssis package which have a exectue sql task it. I tried to modify the task by adding a stored procedure as sql statement. The stored procedure returns two result sets. stored procedure: create proc test as begin select EmpID from Employee select PersonID from person end I mapped the result sets to […]

SSIS truncate table error

Hello I’m new to SSIS and BI. I’m trying to create a dimension and and the beginning of the work flow i want to truncate my Staging table. fr some reason this is throwing an error i cant seam to get passed. any help would be great thanks.

Combine 2 queries into 1

Currently, I dynamically constructing an SQL query, depending on the result of another query, which is executed shortly before. 1st query: SELECT col1, col2, col3, col4, col5, col6 FROM tab1 2nd dynamically constructed query: string query = “Update tab2 SET”; if (!Row.col1_IsNull) { query = query + ” anotherCol1 = ” + “‘” + Row.col1 […]

SSIS Change datasource in connections

I’m new to SSIS and .net environment, I need to migrate one of the connection to new database server, I have tried by right click on connection and edit the details in dialog testing the connection results into successful notification popup message but when I click ok and review the connection it still the same […]

How can I delete in SSIS a FlatFile in ControlFlow when it has dynamic name?

I use SQL Server 2016 and I have a SSIS package in which I have created a FlatFile with a dynamic Name in one DataFlow in Loop. For creating the name I have used this pathern : “SomeText” + DateTime + “SomeText” I have created a varibale like below Image : This is Exprission in […]

ssis derived column format

in ssis I’m loading a data file that has a date field formatted as 11171977 into a table with a data type of varchar(8). i can load this into the table fine; however, I need to reformat the data as yyyymmdd so it is 19771117. my first attempt was to load as is then query […]

Import date into SQL Server table

I am importing this .csv and I would like to import the column Date as a date, not as a string: Which data type should I choose: date or database date? After importing it, will SQL Server be able to recognize it as a date?

How can i use int32 variables Expression builder in SSIS

In the expression builder, my query looks something like this. SELECT * FROM TABLE_A WHERE COLOMN_A_ID IN (SELECT COLOMN_A_ID FROM TABLE_B JOIN EXTRACT_STATUS ON EXTRACT_DTTM > TO_DATE(‘” + (DT_WSTR, 30) @[User::LastTransferDT] + “‘, ‘mm/dd/yyyy hh:mi:ss AM’) AND TABLE_B.Scheduled_DT BETWEEN EXTRACT_STATUS.RANGE_BEGIN_DTTM AND EXTRACT_STATUS.RANGE_END_DTTM AND F_MPOG_EXTRACT.extract_num =”+@[User::RowNumber]+ “)”` I keep getting the same error again and again. […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.