Evaluate A String Expression

Aug 9, 2006

Hi,

I have a table which has expression as a column and the data looks similar to the following .



ID (int) Expression (nvarchar data type)

1 8*(1/2)-6

2 278*(1/4)-2

3 81*(3/5) +4



I now have the expression as an nvarchar. (Ex: 8*(1/2)-6)

Now I need to evaluate this expression and output the result (which is -2 in above Ex) .Can someone give me idea on how do I evaluate the expression which is available as a string. I need to write a procedure for this.

I am unable to cast/convert nvarchar to float/int

Any sample code would be greatly appreciated.

This a very urgent requirement for me.Please get back

Thanks

Swapna

View 8 Replies


ADVERTISEMENT

Conditional Formatting Expression - Evaluate First 3 Characters Of String As Numbers

Mar 2, 2012

I'm trying to put conditional formatting on a field, that behaves as follows:

The data in the field is varchar, and sample data is either:

NULL
3.0 :0
11.7 :1 (these are ratios of a sort)

I want to evaluate the first 3 characters of the string as numbers.

Example:
Mid(fieldvalue,1,3) = "3.0" or "11."

Any data that is greater than 1.99, I want to make the background dark red, anything else including nulls, zebra formatting. I have the following expression built so far and it appears to work, except when the value is null. If the value is null, it leaves the background color white.

This is the warning: [rsRuntimeErrorInExpression] The BackgroundColor expression for the text box "Asthma" contains an error: Input string was not in a correct format.

=iif(
isnothing(Fields!Asthma.Value)
,(IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))
,(iif(mid(Fields!Asthma.Value,1,3)>1.99
,"DarkRed"
,IIf(RowNumber(Nothing) Mod 2 = 0,"#b8cce4","#dbe5f1"))))

My logic is, if the field is null, zebra format, if mid of the value is > 1.99, dark red, everything else zebra formatting. As I said, this seems to work except for nulls.

View 2 Replies View Related

Programmatically Evaluate Expression

Jun 13, 2006

I would like to evaluate expressions from within my execute function in a custom task. I saw this post from about 8 months ago detailing how it would be possible:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=117564&SiteID=1

Is there an updated response (or more detailed example) to the question? Am I really risking a lot by using this undocumented feature?

Thanks!

View 3 Replies View Related

Evaluate Expression In Custom Component

Dec 12, 2007

Is there a way to evaluate an expression (like the derived column component) in a custom component? If so where should I look first? Is there an example?

An extremely simple sample is to put in an expression and evaluate one column and then add that to another column to create a new column. i.e. newcolumn = column1 + column2.

I realize that the derived column allows me to do this but I'm trying to figure out if it is possible to do this in a custom component without having to build my own expression evaluator.

Thanks!

-Thames

View 5 Replies View Related

Custom Components - How To Evaluate A Property As An Expression?

Apr 11, 2008



Hi all,

I'm wondering if anyone's accomplished this before - I've been unable to find a whiff of info on how to do this so far.

I'm creating a custom component that I'd like to give a "Derived Column" type of ability to. By that, I mean I'd like to populate a property of my component with an expression (including references to input columns, package variables and functions) and be able to evaluate it at runtime - per row processed by the component.

I would also appreciate any information as to how to provide the interface to allow the user to build such an expression as well - is there a UI function in SSIS I can call to pop up the "expression builder"?


Thanks!

View 6 Replies View Related

Error With XML Task Saying Expression Must Evaluate To A Node-set

Sep 4, 2007

Hello friends'
I am new to integration services,first time I'm using XML Task Control in SSIS,
I am stuck with problem saying....
"[XML Task] Error: An error occurred with the following error message: "Expression must evaluate to a node-set.".
I am trying to perform XPath operation type and accumulating values in a variable.
I have no clule about error if u can help to come around the problem.

View 1 Replies View Related

How Do I Evaluate The Toggle State Of A Textbox Within An Expression?

Apr 10, 2008



Hi!

On a Reporting Services 2005 report, I have a table with a single group row and a single detail row (and about 5 columns). The details are set up to toggle visibility based on a textbox in the group header called "txt_Order_Number". The order line item details are set with their initial visibility set as hidden. So, when you click on the Plus sign next to the Order Number, the detail rows display below.

However, what I'd like to do is change the background color of the toggled group header row when it is toggled and the details are displayed. Here's what's going on . . .

The row with the Order header information has every textbox set in bold. That's good. It makes a subtle distinction between the order detail rows and the order header row, so when you're looking at the dollar amounts on each line item and trying to add them up in your head to see whether they correctly add up to the dollar amount in the order header row, you can at least more easily see the total amount. However, it makes the whole overall report look funny because all of the order header information is in bold. What I really want to do is change the background color of the order header row to light gray or some other subtle color and change the font to Bold when the details are toggled to visible in order to distinguish that row as the header row.

In order to do this, I think I somehow need to get to a certain element of the Reporting Services object model called "Textbox.ToggleState". If I can get to that piece of the puzzle in an expression or even in code within the report, that should tell me the state of the textbox's toggle switch and I should be able to use that information to conditionally set the color of the textbox.(or every textbox in the row probably.) Here's all I could find out about this on TechNet

http://technet.microsoft.com/en-us/library/microsoft.reportingservices.reportrendering.textbox.togglestate.aspx


I just can't figure out how to get to that piece of information in a Reporting Services expression or in the report's code block.


Any suggestions? I'd appreciate a response even if it's "You can't do that." Actually, the best response someone might be able to provide might be a link to a sample showing how to get to any of the textbox properties like that.

Thanks!
Karen

View 13 Replies View Related

Reporting Services :: Failed To Evaluate Filter Expression Of The Grouping

Sep 23, 2015

I am trying to add a filter and sorting to a matrix, within the matrix I have a column which works out the percentage and is as follows

=(Sum(Fields!Sum_Distinct_JobBilledExVAT.Value) + Lookup(Fields!ClientId.Value, Fields!JobClientId.Value, Fields!Sum_JobBilledExVAT.Value, "ProfJobClientsFees") + Lookup(Fields!ClientId.Value, Fields!ClientId.Value, Fields!Sum_JobBilledExVAT.Value, "ProfClientsFeesID")) / (Lookup(Fields!ClientId.Value, Fields!ClientId.Value, Fields!Sum_MatchedToOtherPost.Value, "ProfClientsMatch") + Lookup(Fields!ClientId.Value, Fields!ClientId.Value, Fields!Sum_JobBilledExVAT.Value, "ProfClientsCC") + Lookup(Fields!ClientId.Value, Fields!ClientId.Value,

[Code] ....

I tried enclosing the query in Abs( ), which I have done in the past, although in the past I wasn't using Lookup functions so I don't know if that is the reason it won't work.

View 6 Replies View Related

Need To Evaluate Stored String Formula

Jun 18, 2007

In 'MyTable' I have the following columns...

TotalNumber (numeric)
Weighting (numreric)
Hours (numeric)
Minutes (numeric)
Formula (nvarchar)

'Formula' column stores a literal string of the formula that may include some, none or all of the previous columns or be NULL.

Here are some examples of the actual strings it stores...

Weighting*Hours
Weighting+(TotalNumber*Hours)
Weighting*Hours)+(TotalNumber*2)

etc etc

All I want to do is create a UDF that will evaluate these strings as math formula and return the value depending on the values of the other columns in the row.

Bear in mind that there may not be a string formula at all for some rows, in which case the value of teh Hours column alone should be the result.

I can do this in vb using the 'Replace' function but am having difficulty in translating it over to T-SQL.

Here is the vb version i use in Ms Access...

getFormula(strDutyType As String, dblTotalNumber As Double, dblWeightingAs Double, dblHours As Double, dblMinutes As String, strFormula As Variant)

If IsNull(strFormula) Or strFormula = "" Then
getFormula = dblHours
Exit Function
End If

'Create the expression string with literal values
strExpression = Replace(strFormula, "TotalNumber", _
CStr(dblTotalNumber), , , vbTextCompare) _
strExpression = Replace(strExpression, "Weighting", _
CStr(dblPF), , ,vbTextCompare)
strExpression = Replace(strExpression, "Hours", _
CStr(dblHours), , , vbTextCompare)
strExpression = Replace(strExpression, "Minutes", _
CStr(dblMinutes), , , vbTextCompare)

'Evaluate the math of the literal expression
getFormula = Eval(strExpression)

-----------

Many Thanks

View 1 Replies View Related

Last Position Of The Specified Expression In A Character String

Jul 10, 2007

Hi,
could you help me. I'd like to get last position of the specified expression in a character string(a fast solution for DB)
Thanks for youe help

View 5 Replies View Related

String Parsing And Expression Builder....

Oct 10, 2007

I can't figure this one out. I don't have enough knowledge of the string functions I guess.

I need to pull a value out of a variable I setup in a for each loop. The value is the filename/path of each source file being processed. Let's say the variable that has the source file path is called VAR1.

One sort of off topic thing I've noticed is when watch the variable in bebug mode and I look at the value of VAR1 it has double back slashes. Here's an example of the value of VAR1:

"\\L3KRZR6.na.xerox.net\C$\Documents and Settings\ca051731\Desktop\Project4\DPT_20070926.ver"

How come the back slashes have been doubled? And do I need to account for that when I start parsing the string value?

Anyway, I need to grab part of the filename from VAR1 and I need the value populated at the start of the for each loop container - ideally when I capture VAR1 in the for each container. I'll be using the string in drop table, create table and create index statements before the actual Data Flow task within the overall package

In the above example I need to grab the characters before the underscore and after the last \. So I'd need the string "DPT" captured in this example.

The actual string could be 1 to 3 characters long, even though this example has it as 3 long.

Underscores could exist anywhere in the actual UNC path once this package is moved to our actual system environments so I can't key off of the underscore.

Because I can't count on the string being a fixed lenght I can't just use a positional string function and grab specific text starting/ending at specific points.

Is there a way to use the various string functions in the expression builder to grab the text between the right most underscore and the right most back slashes or something like that? Ideally I'd like to setup a new expression based packed scope variable called VAR2 and build it using string functions applied to VAR1.

View 1 Replies View Related

Expression In DataSource Conenction String

Dec 4, 2007

I'm not exactly sure how to phrase this problem. If I'm going about this the wrong way, any pointers would be appreciated.

I am using an expression for a data source connection so I can decide which server/database to use at runtime. I also need to pass credentials to use for that connection. The only way I'm able to get this to work is to specify "No Credentials" for the data source and then pass a DataSourceCredentials to the report throught the report viewer. This works, for the most part, but puts a "Change Credentials" link in the report viewer.

What I think would be much better is if I could specify the credentials in the connection string that I pass. However, everything I've tried so far has not worked. I get errors complaining that the compination of options is invalid or that the report server cannot find the credentials of "unknown keyword: User Name". All by trying various combinations of things.

How do other people go about this? I've seen blogs implying that this is not such a big deal (that credentials CAN be passed over in the connection string). Hopefully I'm missing something simple here. If I have no choice, the "Change Credentials" link will not be the end of the world, but that's very sloppy. The people viewing this report will not know anything about the database credentials and I'd rather not show them somthing as inviting as a link that can get them off track.

Thanks for your help!
-C

View 3 Replies View Related

String Formatting Expression Problem

May 27, 2008

I have what should be a simple string formatting issue -- removing all alpha characters from a phone number. T-SQL below is simple and works just fine:


declare @home_phone as char(14);
set @home_phone = '(123)979-3206';
set @home_phone = REPLACE(@home_phone,'-','');
set @home_phone = REPLACE(@home_phone,'(','');
set @home_phone = REPLACE(@home_phone,')','');


The condensed version below works equally well:

set @home_phone = REPLACE((REPLACE((REPLACE(@home_phone,'(','')),')','')),'-','');


Either script above returns correct result:

select @home_phone;
Result = '1239793206'


HOWEVER, within SSIS Derived Column expressions, this function fails to remove parentheses. First of all, Expression Builder doesn't like outer single quotes (turns red) which I resolved by using double quotes resulting in the following expression:


REPLACE(home_phone,"-","") + REPLACE(home_phone,"'('","") + REPLACE(home_phone,"')'","")


Unfortunately, this expression fails to remove parentheses and instead returns: '(123)9793206'

I've tried several different permutations--no inner single quotes; adding more inner single quotes; etc., but so far no success. Any suggestions would be much appreciated!

View 15 Replies View Related

Converting A String Expression To Proper Case

Oct 22, 2000

How would I convert an expression like on of these to all upper case first letters with remaining letters lower case? VB has a function for that but sql doesn't seem to. I thought about having a loop go through each character to check for spaces. I've written a couple of similar pieces of code in VB when a while ago, but is there a better way? Thanks :)

Just a couple of typical examples of how the data should appear ~

payment, credit card ==> Payment, Credit Card
butcher & singer ==> Butcher & Singer

View 1 Replies View Related

Filters && Expression With String Values, Should They Work??

Dec 7, 2007

Any idea why this expression would not work in SSRS?

Based on a expression on a group textbox I get 0 records that match:
=Iif(Fields!ACCRUAL_CODE.Value <> "A", CountDistinct(Fields!LOAN_NBR.Value), 0)



I've evaluated in the proc & there should be a count of 29 records.

I found a work around by using this in the stored proc & I get my record count:


ACCRUAL_CODE = CASE WHEN BASE.ACCRUAL_CODE = 'A' THEN 0 ELSE 1 END

and changed the expression in SSRS to this & it works:
=sum(Fields!ACCRUAL_CODE.Value)



Is this a known issue with strings? From searching on this site I see that string evaluations are widely used so I do not see why it wouldn't work. I've also see this when filtering the dataset on anything that is a character. Any suggestions?

View 3 Replies View Related

SQL 2012 :: Regular Expression For Capital Characters In String

Mar 1, 2014

I need to verify data in a column and do pattern matching on the string in each field.

I've create a CLR Function that will verify the element against the patter and return a True or Fales....

I have only used reg expressions once and am struggling mightly. I'm bacially here. A

I need to match a pattern that each word in the string will be a Capital letter.

ex. The beginning of the day - Fail
ex. The Beginning Of The Day - Pass

[URL] .....

View 2 Replies View Related

Analysis :: Using String Replace In Cube URL Action-expression

Jul 15, 2010

Within the MDX "Action expression" of a url-action I need to replace some text from a string that is used in building the URL.

replace("hellowhatever","what","")

The above syntax errors out, is this type of formatting possible with MDX action expressions?

View 3 Replies View Related

T-SQL (SS2K8) :: Search For A String In Expression By Number Of Its Appearance - Charindex

Apr 3, 2015

I have written a query to search for a string in an expression by the number of it's appearance. Script is like this:

DECLARE @Expression VARCHAR(8000) = 'abcd_e_fgh',
@SearchString VARCHAR(10)= '_',
@OccuranceNumber SMALLINT = 1
DECLARE @SearchIndex INT = 0, @SearchIndexPrevious INT = 0, @Sno INT = 0
WHILE @Sno < @OccuranceNumber BEGIN

[Code] .....

Here i'm trying to search "_" in expression "abcd_e_fgh" where it is appearing for first time. it gives me 5 correctly. Now when i change the @OccurenceNumber to 2 or 3, it gives correct values 7 and -1 respectively. However now when i change it to 4, it gives me 5. So when it's trying to check for fifth appearance of "_", it's not actually giving 0 or -1 but repeating the value 5.

View 9 Replies View Related

Frror: 4000 Max String Literal In Expression For Datareader Component

Apr 15, 2006

Hi, I have a datareader component of which i am dynamically setting its sqlcommand statement with expression (click the background of dataflow > properties > expressions). Now my sql select statement has about 600 fields so that makes my expression statment "select field1, field2, .....from table1 where field2 >=" + @[User::dateforfield2] but when i evalute the expresssion (which is right), i get the error: A string literal in the expression exceeds the maximum allowed length of 4000 character and i think its because of the fields in my select statment causing my string literal to grow more than 4000 characters. Is there any way to increase the max string literal for expressions. Please help.

View 1 Replies View Related

How To Find Terms In A File Name: Regular Expression OR A String Function

Oct 15, 2007

hi,

i am using a forEach look to import each file within a folder, but i also need to calculate the dataset related ot these files.
the file are named as:

ff_inbound_20071008_1.csv
ff_inbound_20071008_2.csv


where for file ff_inbound_20071008_1.csv:

ff => flat file
inbound => dataset of this csv
20071008 => date
1=> file count

having in mind that they are store in the variable as a full path:

z:myFlatFilesexportsproj01ff_inbound_20071008_2.csv

i need to extract the dataset and the date for each file.

how can i extract these terms from the file name?


many thanks,

nicolas

View 4 Replies View Related

Integration Services :: Casting GETDATE To A String Value Using Expression Builder?

May 7, 2012

Having trouble casting GETDATE() to a string value (DT_STR) using expression builder?  I want to concatenate the current date to some text used in a send mail task.

View 5 Replies View Related

Integration Services :: Connection String Error - Expression Cannot Be Parsed

Jul 26, 2015

Error: The variable "$Package::LocalConfigDB_ConnectionString" was not found in the Variables collection. The variable might not exist in the correct scope.

Error: Attempt to parse the expression "@[$Package::LocalConfigDB_ConnectionString]" failed and returned error code 0xC00470A6. The expression cannot be parsed. It might contain invalid elements or it might not be well-formed. There may also be an out-of-memory error.

View 3 Replies View Related

Failed To Load Expression Host Assembly. Details: StrongName Cannot Have An Empty String For The Assembly Name.

Jan 12, 2006

I previously had an ASP.NET 1.1 site running on my IIS 6.0 server (not the default website) with Reporting Services running in a subdirectory of that website.  I recently upgraded to ASP.NET 2.0 for my website and was greeted with an error when trying to view a report.  The error was very non-descript, but when I checked the server logs, it recorded the details as "It is not possible to run two different versions of ASP.NET in the same IIS process.  Please use the IIS Administration Tool to reconfigure your server to run the application in a separate process."

 

First of all, I could not figure out where and how to do this.  Secondly, I decided to try to also change the Reporting Services folders to run ASP.NET 2.0 and when I did, I was greeted with the following message when attempting to view a report:

 

"Failed to load expression host assembly. Details: StrongName cannot have an empty string for the assembly name."

Please help.

View 7 Replies View Related

Can't Get More Than First Field To Evaluate.

Jan 8, 2007

I am having trouble getting an

View 6 Replies View Related

Evaluate Numaric Value

Apr 17, 2008

I havea flat file source.All of the coulmns in the source file are string of 5o length( default). There going to be couple of numeric columns like beginning balance, end balance etc. Now I have to evaluate those column to see if there is any column has more then two digit after decimal point. I have to do it through vb.net scripting in SSIS.

Can some one please give me some suggestion how can I achieve it?

Thanks.

View 3 Replies View Related

URGENT - My Error Or Bug? The Result Of The Expression Cannot Be Written To The Property. The Expression Was Evaluated, But

Feb 8, 2007

Error 3 Error loading MLS_AZ_PHX.dtsx: The result of the expression ""C:\sql_working_directory\MLS\AZ\Phoenix\Docs\Armls_Schema Updated 020107.xls"" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property. c:documents and settingsviewmastermy documentsvisual studio 2005projectsm l sMLS_AZ_PHX.dtsx 1 1


"C:\sql_working_directory\MLS\AZ\Phoenix\Docs\Armls_Schema Updated 020107.xls"

Directly using C:sql_working_directoryMLSAZPhoenixDocsArmls_Schema Updated 020107.xls
as connectionString works

However - I'm trying to deploy the package - and trying to use expression:
@[User::DIR_WORKING] + "\Docs\Armls_Schema Updated 020107.xls"
which causes the same error to occur

(Same error with other Excel source also:
Error 5 Error loading MLS_AZ_PHX.dtsx: The result of the expression "@[User::DIR_WORKING] + "\Docs\Armls_SchoolCodesJuly06.xls"" on property "ConnectionString" cannot be written to the property. The expression was evaluated, but cannot be set on the property. c:documents and settingsviewmastermy documentsvisual studio 2005projectsm l sMLS_AZ_PHX.dtsx 1 1
)

View 4 Replies View Related

Reporting Services :: Running Value Expression Within Lookup Expression In SSRS?

Oct 28, 2015

I have created 1 report with 2 datasets. This report is attached to the 1st dataset.For example,1st one is "Smallappliances", 2nd is "Largeappliances".

I created a tablix and, the 1st column extracts Total sales per Sales person between 2 dates from 1st dataset (Small appliances). I used running values expression and it works fine.

Now, I would like to add another column that extracts Total sales per sales person between 2 dates from 2nd dataset (Large appliances). I am aware that I need to use Lookup expression and it is giving me the single sales value rather than the total sales values. So, I wanted to use RunningValue expression within lookup table to get total sales for large appliances.

This is the lookup expression that I added for the 2nd column.

=Lookup(Fields!salesperson.Value,Fields!sales_person.Value,RunningValue(Fields!sales_amount.Value,
sum, " sales_person"),
"Largeappliances").

I get this error when I preview the report.An error occurred during local report processing.The definition of the report is invalid.An unexpected error occurred in report processing.

(processing): (SortExpression ++ m_context.ExpressionType)

View 7 Replies View Related

Sp_start_job Does Not Evaluate &#34;@server_name&#34; Parameter

Apr 30, 2001

We want to start a job remotely on another SQL7 server.

innocently we thought that should be no problem with sp_start_job.

We used the command listed below:

use msdb
go
EXEC sp_start_job @job_name='MyJobName', @server_name='blablabla'

The strange thing is, that sp_start_job ignores the @server_name at all.

Even if we enter complete nonsense for @server_name the job gets started as long it is present on the local sqlserver instance.
sp_start_job seems to search locally for the given job_name, only.
Consequently if we enter the remote server's name the job fails as the
jobname is not present on the local sqlserver.

Any ideas what's going wrong here.

Greetings from Mannheim, Germany
Ricardo

View 2 Replies View Related

How To Evaluate Data In Multi Rows

Oct 19, 2013

I am trying to evaluate dates within my sub queries for A,B,C,D. If there is a count > 0 in the 'A' category, I need to evaluate if the servicedates in B,C,D are within 30 days of 'A'. How would I code this within my current code?

select
customernumber,
SUM(CASE WHEN category = 'A' then 1 else 0 end) 'A',
SUM(CASE WHEN category = 'B' then 1 else 0 end) 'B',
SUM(CASE WHEN category = 'C' then 1 else 0 end) 'C',
SUM(CASE WHEN category = 'D' then 1 else 0 end) 'D'

[Code] ....

My BEFORE the case statement:

Customernumber A B C D SERVICEDATE
123456789 1 0 0 0 2012-02-07
123456789 0 0 1 0 2012-02-28
123456789 0 0 1 0 2012-03-06
123456789 0 1 0 0 2012-12-17

My output after case statement:

Customernumber A B C D
123456789 1 1 2 0

What I need my output to look like after case statement:

Customernumber A B C D Service w/in 3 mnths
123456789 1 1 2 0 2

View 1 Replies View Related

Please Evaluate This Approach To Shrinking Log Files

Sep 8, 2006

I've been tasked with taking over the support for a client's SQL Serverdatabase. I'm not a DBA by profession, I'm a software developer whouses SQL Server as a database designer.The clients have reported that the server is running out of disk spaceand examination shows that the log files for several of the databasesare at 5Gb or more.After reading around the subject I suggested the following sequence ofoperations:-- Select the name of the database you want to shrinkUSE MyDB-- Dump unwanted transactionsdump tran MyDB with truncate_only-- Get the name of the logfileSELECT * from sysfiles-- Having examined the rows returned by this use the log file....-- Shrink the file to required size (in MB)DBCC SHRINKFILE('MyDB_log', 10)Is this a reasonable approach? Please bear in mind that I'm pretty newto this, and I have many other tasks to do besides manage the server.A previous DBA has set up good maintenance plans etc. so everything isbeing properly backed up (well, I think it is)If this IS a good approach, would it be reasonable to do this on, say,a monthly basis as a scheduled job? Obviously the stepSELECT * from sysfileswhich gives us the physical name of the log file would be removed andthe job would operate explicitly on each log file for each database inturn.Many thanks for reading.William Balmer.

View 2 Replies View Related

Power Pivot :: How Does EVALUATE Function Work

Oct 24, 2015

playing with the Power pivot , DAX. While analyzing the DAX ,I came across a function EVALUATE , but when I tried this function in excel Power Pivot workbook - =EVALUATE 'Date' where 'Date' is my one of the Power pivot table , I was writing this function within the Calculation area of the Power Pivot model.  I get the below error when I hit enter after writing the function ."The expression is not valid or appears to be incomplete..An MDX expression was expected while a full statement was specified."But in many forums I find the syntax is correct.

View 4 Replies View Related

Derived Columns Expressions Evaluate Incorrectly

Oct 26, 2007

All,

I have seen it happen frequently that I type in a perfectly valid SSIS expression (this is easy for me since I am an old hand at C++/C/C#) in a row in a Derived Column transformation, and it turns red. Or sometimes, I will have an invalid expression that I correct, but it stays red. Finally I have also seen it happen that I make some change in the data flow pipeline and suddenly a Derived Column transform develops an error. I then go into the Derived Column transform and find that the expression has turned red. So, I literally have to go into the expression in these cases, and make a trivial change to them to get the red error to go away. Alternatively, I can cut the derived column expression text, and then paste it back in and it works (this is most telling.)

So, it seems to me the Derived Column is somehow holding onto some meta data about the Derived Column that is getting out of date (rather than re-evaluating the correctness of the Expression.) One thing I usually can do to repro this at times is to remove a column (that the Derived Column depends upon) from the pipeline and then re-add it. When I go into the Derived Column it will be red, and then like I said I have to tweak the expression to force SSIS to re-evaluate the expression.

Anyway, I'm curious if anyone else has seen this?

Thanks.

View 10 Replies View Related

Script Component In Loop Tries To Evaluate Connection

May 12, 2006

I have a script component which loads a file which is in a custom format. The script component is inside a For Each Loop Container and it uses a flat file connection manager. The loop sets the connection string for the connection manager.

The problem I'm having is that the connection string needs to be set to something every time that I start the package but I don't know ahead of time what file there will be, so I get a System.IO.FileNotFoundException error on the script component. If I manually set the variable for the connection string and point it to a file that exists, then the package runs fine but at the end of the package the connection string is set to the last file loaded and this file will no longer exist the next time the package runs.

I hope this makes sense...

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved