.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
david stephan
Gaurav Pal
Post New Web Links

SSIS Expression Request

Posted By:      Posted Date: September 29, 2010    Points: 0   Category :Sql Server

Hi Guys,

Input DataType String: C:\Test\CONV-Files\192572\01012010.ajk

Output Required: 192572


I am using below expression for start position, but for some reason FINDSTRING function is searching for "\", it throwing me error message. If I change it to ":" it will 2 position.

e.g: FINDSTRING(@[User::strFQDN], "\", 3)

All, I want is output like this 










View Complete Post

More Related Resource Links

SSIS Expression?

In my SSIS_HST table have 2 columns one is last process date and counter value.Those values are i am storing in package variables. i will take one enddate variable .enddate=last process date+ counter value.if the last process date valeu is 2010-02-07 and counter value is 3 then my end date value =2010-02-10.How add those expression in my end date variable..  

URGENT HELP GUYS - Expression Request

Hi Guys,   I got a data coming through from derived column like this  192752_20052010 I want an expression to above column change to get only the last part to change like this 192752_20100520   Please help guys it urgent   Thanks,   D  

SSIS Expression

Hi Guys,   Input: ProductCatalog_181416_20100513010253_2010517_22715_2010715_172740 Expression Used: SUBSTRING(@[User::FileName], FINDSTRING(@[User::FileName], "_", 1) + 1, FINDSTRING(@[User::FileName],"_",3) - FINDSTRING(@[User::FileName],"_",1)-1) Output Getting: 181416_20100513010253   Out Put Required : 181416_20100513   Can please help he out how to get above output.   Thanks,

Urgent Expression Request - Date Conversion


Input Date : 4/08/2010 6:27:00 AM


Output Required: 2010/08/04 


Expression used : SUBSTRING(@[User::ExtractionDate],1,FINDSTRING(@[User::ExtractionDate],"/",1) - 1) + "-" + SUBSTRING(@[User::ExtractionDate],FINDSTRING(@[User::ExtractionDate],"/",1) + 1,2) + "-" + SUBSTRING(@[User::ExtractionDate],FINDSTRING(@[User::ExtractionDate],"/",2) + 1,4)

Current Date is getting: 4-08-2010




SSIS 2008-Variable Expression Type Cast Syntax Error


Hi all members.

I need to ask for the following code. I need to convert the variable into a string.

"Select Distinct convert (int ,A.CustomerCategory) as AccountReceivableCategoryID, convert (varchar(40), B.Text) as AccountReceivableCategoryNameE
from Inkunde A , inpara B
where A.CustomerCategory= B.SearchItem
and B.Language1 = 'EN'
and B.ParameterName = 'CATEGORY'
and A.CustomerCategory = (DT_STR,200,1252) "+  @[User::CategoryID] +"
Order By A.CustomerCategory"

Kindly any member let me know, How to correctly use the Type Cast fucntion in variables

Thanks and Best Regards,


SSIS Expression to send email with dataset on the Mail Subject line.



I have a task - I need to email total number of products sold on the subject line of the mail task.

I have Execute SQL task process like select count(*) from tablename. Then I need to Mail the result set like "Total products sold September 2010 : 15000" on teh subject line.

I created a variable bit i dont know how to assign it on the subject line of the Send Mail Task.

I would really appreciate if you can guide me.

Thanks for your help.


SSIS - Setting TablesList Property with expression


I am having problems withing with the Transfer SQL Server Objects task in SSIS.  I would like to set the TablesList Property of the task to the value of an expression.  At a high level, I need to transfer a table from one server to another but the table name is dynamic so I can't use a data flow task.  Each iteration of the package execution will work off of one table so I need to set the TablesList property to the one table. 

Since the property is a collection, I am getting errors when I attempt to just assign the TablesList property to the variable value in the expression builder.  I get this error:

Error at Copy Table To Production: The result of the expression "@[User::TablesList]" on property "TablesList" cannot be written to the property. The expression was evaluated, but cannot be set on the property.

I also tried to open up the SSIS package in textpad and look at the formatting of the TablesList property and then set the variable to match what I saw in the XML......this gave me the same error.

Any suggestions on how to set a StringCollections property in SSIS?

Thanks in advance,


Using Conditional Split data Transfer in SSIS 2008

This article uses the Integration Services Conditional Split Data Transformation element to filter and transfer data from a set of flat text files to SQL Server database table. The concept can be easily extended to apply to any other source or destination such as Microsoft Excel. This scenario is useful in creating denormalized database tables in a reporting and analysis situation.



Dear gentlemen and ladies of the Microsoft Dynamic Data Team,

Mr. Steve Naughton says (and I hope so) that there might be chances that you read the posts published in this forum: I really hope so.

If that were the case then I am formally requesting to you in providing a "real answer" to my question:

I want to customize a dynamic data page (the details one) so I can have access to the data it has been already gathered from the end user UI (details.aspx) and use it to pass this same data to the following controls/pages that I am going to display next time to the end user.

For instance:

I have a screen with different types of data in it: texts, numbers, dates, check boxes, radio buttons and dropdownlists that has been filled with data by the end user. I want now to reset all fields exept the dropdownlist of which I'd like to keep the previously chosen values(the very same thing you do between dropdownlist of List.aspx ad Details.aspx). Even with FoxPro I could do that because data and controls were available there. It was as simple as setting carrying on to true.


I have found my

view state vs request parameters


If  the view state is the data entered into the form fields then they are supposed to be available in the request parameters or request body. Then why would we need view state for?


Unique ID throughout entire request



I am hoping somene here could advise me on a better solution to my present problem.  First a little background information on the application. 

I have a web application using the 3.5 framework.  The structure of this application is as follows: UI -> WebService   -> Business Layer -> DataAccess Layer.   What I want to accomplish is for every request (click on a link or button) have a unique identifer that follows this request through its entire lifecycle.  This unique identifer can be accessible anywhere within this request.  We use Response.Redirects which could easily be changed to Server.Transfers (although I do not want to do that) but  the problem lies with the web service calls.  Currently, a GUID is set in the ApplicationRequest.  This GUID checks for a guid value in the RawURL and if so, assigns this value to a HttpContext Item.  If not, HttpContext.Items gets a new one created.  However, this idea is wrong and will need to be revisisted.  The bigger problem is with the web service calls.  Without changing every web service method signature, and every call for that matter, is there a way of getting this GUID there.  I created a web method in every web service so that each time I instantiate a web service object in the UI, before calling any

System.Security.SecurityException: Request for the permission of type 'System.Web.AspNetHostingPerm


Good Day all,

Having an issue with an outside user accessing my IIS7 box. I do not have this problem when running the website from my host machine. I found this post: Http://forums.asp.net/t/1371394.aspx. I assure you that this is not a solution because I am not storing any of my files on a network share. 

What do you think my approach should be. 

I already have read rights to IIS user to my BIN folder. 

Thanks for the help. 

IIS request filtering module


Hi folks,

I have migrated my web application to iis 7.5 Now I am using windows 7 as dev machine.

the problem is it takes several seconds to download a single page into web browser now. It contains only 300 records.

Everything is ok on prod website though. Prod version contains up to 200000 records .I can't also use code profile tool of red gate to analyze possible bottlenecks since the software in question can't restart IIS. No errors in IIS logs. I am using ISAPI Rewrite 3 filter by Helicon to apply some URL rewriting rules. I am thinking about conflict between ISAPI rewriting rules and default IIS 7.5 request filtering rules, since the IIS request filtering module gets a higher priority than even the built-in IIS 7.5 rewriter module. Is it possible to tweak the module through web.config so that priority is given to ISAPI rewriting rules or something like that?

Frankly, I spent several days to figure out solution. No success...

I've also deployed the application on IIS 5.1. Everything works fine. Any ideas about possible solution for IIS 7.5?

How to implement custom HttpContext for each request under class that implements IHTTPHandler


Hello All,

I created an application and implemented IHTTPHandler for all incoming request ending with ".aspx" extension.

Under "ProcessRequest" module, I am creating an instance of HttpContext (with URL attributes different from my application's URL i.e. if I am working on localhost then speciying Yahoo.com as its URL) and assigning it to "context" which comes as method argument.

After redirection, an error is generated. Also, the custom HTTPContext is not passed to the requested page (default.aspx, in my case.)

Code is as follows.

    Public Sub ProcessRequest(ByVal context As System.Web.HttpContext) Implements System.Web.IHttpHandler.ProcessRequest
            Dim requestedUrl As String
            Dim targetUrl As String
            Dim urlLength As Integer
            'Save settings which will be used while redirecting to appropriate page
            requestedUrl = context.Request.RawUrl
            If requestedUrl.IndexOf("?") >= 0 Then
                targetUrl = requestedUrl.Substring(0, requestedUrl.IndexOf("?"))
                targetUrl = requestedUrl
            End If
            If targetUrl = Nothing Or targetUrl.Length = 0 Then
                targetUrl = requestedUrl
            End If

[How??] Lamda expression with ByRef parameter


How to write lamda expression with ByRef/ref parameter in c# ??

The code below causing syntax error:

item.OnAction = (p1, p2, ref p3) => {
   return true;

item.OnAction = (p1, p2, & p3) => {
   return true;

Express Yourself: Encoding Videos Using Microsoft Expression Encoder 3 SDK


Video on the Web involves huge amounts of data. Learn the best way to manage and move that data with the help of Microsoft Expression Encoder 3.

Adam Miller

MSDN Magazine June 2010

Security Briefs: Regular Expression Denial of Service Attacks and Defenses


Microsoft security expert Bryan Sullivan believes denial-of-service blackmail attacks will become more common as privilege escalation attacks become more difficult to execute. He demonstrates how to protect your apps against regular expression DoS threats.

Bryan Sullivan

MSDN Magazine May 2010

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend