Showing posts with label string. Show all posts
Showing posts with label string. Show all posts

Friday, March 30, 2012

Problems with TRIGGER

I still have problems with my TRIGGER (T-SQL) to update a table. I will read some information from INSERTD table and create a String to execute EXEC(@.sSQL), I’m creating a dynamic SQL because the name of then table I’ll update is in the INSERTED table, the problem I have is that : I read a date from the INSERTED table (31/08/2007 12:15:30) and write this date into then update table, but the date change to this : 31/08/2007 12:16:00 above is part of the trigger that do this :

SELECT @.TipoConta = Tipo, @.Inscricao = Inscricao, @.MesAno = Mes_Ref, @.DataPagam = Data_Quitacao, @.ValorPago = Valor_Pago, @.LiberMult = Libera_Multa FROM INSERTED

SET @.YearTable = Right(@.MesAno, 4)

SET @.MyTable = 'LEITURAS_VALORES_' + @.YearTable

set @.sSQL =

'UPDATE ' +

@.MyTable +

' SET ' +

'VALOR_PAGO = ' + str(@.ValorPago, 12, 2) +

', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

', SITUACAO = '''+ @.Situacao + '''' +

', LIB_MULTA = ' + str(@.LiberMult, 2) +

' WHERE ' +

'INSCRICAO = ' + str(@.Inscricao, 8) +

'AND MES_ANO = ''' + @.AuxVar + ''''

exec (@.sSQL)

@.DataPagam is the date I’m reading from INSERTED

The problem is in the code : ', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

Date format (dd/mm/yyyy hh:mmTongue Tieds) we use here in Brazil

Any one can help me,

Thanks, very much

Try something like this:

', DATA_SITUACAO = CAST(''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + ''' AS DATETIME) '
|||

It could be that your installation is set to us_english which has a dateformat of MDY.


In your trigger, try setting SET DATEFORMAT DMY at the start.


HTH!

|||

I put ''' AS DATETIME) '

Error Source :

.NetSqlCliente Data Provider

Error Message :

Incorrect syntax near then keyword 'AS'

|||

I have already done it : SET DATEFORMAT DMY in my TRIGGER

Thanks

Problems with TRIGGER

I still have problems with my TRIGGER (T-SQL) to update a table. I will read some information from INSERTD table and create a String to execute EXEC(@.sSQL), I’m creating a dynamic SQL because the name of then table I’ll update is in the INSERTED table, the problem I have is that : I read a date from the INSERTED table (31/08/2007 12:15:30) and write this date into then update table, but the date change to this : 31/08/2007 12:16:00 above is part of the trigger that do this :

SELECT @.TipoConta = Tipo, @.Inscricao = Inscricao, @.MesAno = Mes_Ref, @.DataPagam = Data_Quitacao, @.ValorPago = Valor_Pago, @.LiberMult = Libera_Multa FROM INSERTED

SET @.YearTable = Right(@.MesAno, 4)

SET @.MyTable = 'LEITURAS_VALORES_' + @.YearTable

set @.sSQL =

'UPDATE ' +

@.MyTable +

' SET ' +

'VALOR_PAGO = ' + str(@.ValorPago, 12, 2) +

', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

', SITUACAO = '''+ @.Situacao + '''' +

', LIB_MULTA = ' + str(@.LiberMult, 2) +

' WHERE ' +

'INSCRICAO = ' + str(@.Inscricao, 8) +

'AND MES_ANO = ''' + @.AuxVar + ''''

exec (@.sSQL)

@.DataPagam is the date I’m reading from INSERTED

The problem is in the code : ', DATA_SITUACAO = ''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + '''' +

Date format (dd/mm/yyyy hh:mmTongue Tieds) we use here in Brazil

Any one can help me,

Thanks, very much

Try something like this:

', DATA_SITUACAO = CAST(''' + Convert(char(10), @.DataPagam, 103) + ' ' + Convert(char(8), @.DataPagam, 114) + ''' AS DATETIME) '
|||

It could be that your installation is set to us_english which has a dateformat of MDY.


In your trigger, try setting SET DATEFORMAT DMY at the start.


HTH!

|||

I put ''' AS DATETIME) '

Error Source :

.NetSqlCliente Data Provider

Error Message :

Incorrect syntax near then keyword 'AS'

|||

I have already done it : SET DATEFORMAT DMY in my TRIGGER

Thanks

Wednesday, March 28, 2012

Problems with string value "one space"

Hello,
I've been discovering weird problems in my application, and after thorough
research, going to lower and lower levels, until I've found the following:
The setup:
MSSQL table with nvarchar(255) field (Case-sensitive and accent-sensitive
collation). The problems are when there is an entry with one character, code
0x20 (ASCII 32; space).
The first surprise hit me when I discovered that LEN function gives the
length of the value, NOT INCLUDING the trailing spaces. Since there is no
function that takes into account the trailing spaces, the only way to get
the length of the field seems to be something like Len(myField+'X')-1.
Awkward, if you ask me. Is there a more preferred way?
The other, which actually caused the problems in my system, was that
querying for zero-length value, it returned the record with the single
space!
SELECT * FROM MyTable WHERE myField=''
So, to avoid this, I can use the following query:
SELECT * FROM MyTable WHERE myField+'X'='X'
I assume that this behaviour might be connected with collation, but I'd hate
to select binary sort for this language-related value. What is happening
here, and how to fix it?
Thanks,
Pavils"Pavils Jurjans" <pavils@.mailbox.riga.lv> wrote in message
news:%23SFUuWKXGHA.4484@.TK2MSFTNGP02.phx.gbl...
> Hello,
> I've been discovering weird problems in my application, and after thorough
> research, going to lower and lower levels, until I've found the following:
> The setup:
> MSSQL table with nvarchar(255) field (Case-sensitive and accent-sensitive
> collation). The problems are when there is an entry with one character,
> code 0x20 (ASCII 32; space).
> The first surprise hit me when I discovered that LEN function gives the
> length of the value, NOT INCLUDING the trailing spaces. Since there is no
> function that takes into account the trailing spaces, the only way to get
> the length of the field seems to be something like Len(myField+'X')-1.
> Awkward, if you ask me. Is there a more preferred way?
>
datalength

> The other, which actually caused the problems in my system, was that
> querying for zero-length value, it returned the record with the single
> space!
> SELECT * FROM MyTable WHERE myField=''
> So, to avoid this, I can use the following query:
> SELECT * FROM MyTable WHERE myField+'X'='X'
> I assume that this behaviour might be connected with collation, but I'd
> hate to select binary sort for this language-related value. What is
> happening here, and how to fix it?
This is unrelated to collation. Trailing spaces are ignored in string
comparisons in SQL Server. To compare strings without ignoring trailing
spaces use LIKE.
EG:
select datalength('a ')
select 1 where '' = ' '
select 1 where '' like ' '
David

Problems with SQL Server connection string

I am slightly confused about SQL Server connections strings. When I used the following connection string:

string strConn = "server=decius\awa;database=xxxx;uid=xxxx;pwd=xxxx";

I get an error saying "Format of the initialization string does not conform to specification starting at index 13. "

I spent ages trying to figure out why this was and I eventually discovered that adding an "@." symbol before the string fixed it, i.e.

string strConn = @."server=decius\awa;database=xxxx;uid=xxxx;pwd=xxxx";

Most of the examples I have seen to not use the "@." symbol so I am just wondering what is does and when you need to use it?

Thanks,

Mark

The @. fixed your problem because it designates a literal string. Basically, when the processor sees @. before the string it knows to ignore all special characters within that string that would otherwise need to be used with an escape character. In C#, the '\' is an escape character that means 'do not read the following character as a special character. It would be used like so:

string path = "files\\filename.doc";

That will read to the processor as 'files\filename.doc";

As you've found out, you can also use the @. for the same result. These next 2 strings will have the same output:

string path = "files\\filename.doc";

string path = @."files\filename.doc";

...Hope that helps.

|||

Thanks Stew, that's great.

Mark

sql

Friday, March 23, 2012

Problems with regard to connection string

hi!

I have 2 questions that needs to be clarified.

I have Sub packges being executed from the main package. I am executin the Main Package with the Conn string set through the C# UI like

string connect = @."TahoeDB;Data Source=SE413695\AASQL2005;Initial Catalog=TestDB;Provider=SQLNCLI.1;Integrated Security=SSPI;";

jobCommand = new SqlCommand("xp_cmdshell 'dtexec /f \"" + path + "\" /Conn \"" + connect + "\" /Set \\package.Variables[User::ArchivePackageName].Properties[Value];\"" + name + "\" /Set \\package.Variables[User::ArchiveFileType].Properties[Value];\"" + type + "\" /Set \\package.Variables[User::ArchiveFlatFileConnectSt].Properties[Value];\"" + xlspath + "\"'", cconn);

Works fine. but In my Integration services package which has connection string for each packge separately. Which i need to set as same as the main package conn string.

Which is the best way of doing it.

2 problem is that i have 2 connection string in my main package. how to i set them as i have shown in the above code.

Do i need to set the / Conn twice . But how will it interpret two connection s that is set. how can i deal with this problem

Thanks,

Jas

How about a "Parent package variable" configuration?

For a brief discussion of this topic see the section titled "Passing Values to Child Packages" in Books Online-

Execute Package Task
(http://msdn2.microsoft.com/en-us/library/042d4ec0-0668-401c-bb3a-a25fe2602eac.aspx)

In answer to first question, you should only need to pass the connection string into the package once, but passing it into a variable rather than setting the connection isetlf would be better for reuse. The connection in the parent can use an expression to set itself from the variable. The child can use one of the methods covered in the BOL section.

|||

This worked fine. i am setting value to variables including the conn string in the main package .Using Parent Package variable i set the values to variable through expression.

thanks a lot,

Jas

Wednesday, March 21, 2012

Problems with null values

I'm reading data with ADO into a recordset. From the recordset, I create an XML string.

Unfortunately, when I go from rst to XML, any null values are chopped off and don't appear in the XML tree. This causes problems in further developments.

It would appear that the easiest way to fix the problem is to guarrantee that there are no nulls in the output data.

I've tried ' ' + tbl.column as NewCol but when tbl.column is null, the result is null also.

suggestions?

For the record, for some damn reason the FOR XML RAW command does not work on my SQL. Don't know why, but I'm trying to find a work around.select coalesce(tbl.column,'') as newcol

replaces null with zero-length string

use 0 for numeric fields, i guess

rudy|||u can check the null value while retreiving the value from a recordset to a variable by iif(isnull(rsAdo("column")),"",rsAdo("column"))|||A variation of r937's answer:

SELECT IsNull(Field, 0) AS Field1
or
SELECT IsNull(Field, 'unknown') AS Field1

Tuesday, March 20, 2012

Problems with Lookup task and dates

I’m trying to make a Lookup transformation with a relation on two string columns and a between dates condition set by parameter:

select * from
(select * from [dbo].[RgnErhverv_Ansvar]) as refTable
where [refTable].[Opretdato] = ? and ? between StartDate and EndDate

where the second parameter is my Date column (FakturaDato_konv) .

My problem is that I keep getting the error:

"Error 1 Validation error. Data Flow Task: Lookup [16505]: input column "FakturaDato_konv" (17826) has a datatype which cannot be joined on"

The StartDate and EndDate is datetime data type and have tried all of the DATE data types for the "FakturaDato_konv" without any luck - DT_DBTIMESTAMP should be the one.

FakturaDato_konv looks like this 24-06-2005 00:00:00
StartDate looks like this 31-08-2001 00:00:00

Any suggestions?

-Jeppe

I tried your lookup string in here and received no error so I don't know specifically what your problem is. You mention above 2 strings and a date but your SQL only has 2 parameters so maybe that is the problem. You should look at the parameters dialog to see if the columns are being joined as you expect. That all being said lookup is a one to one lookup so in general what you are trying to do won't work even if you get the SQL statement problem ironed out.

Thanks,|||

The first parameter is a string value and the second is the date value. The string value is working fine but the date value is causing me problems. I have mapped the parameters to the correct columns in the parameters dialog and manually added the date column (second parameter) to the input columns the advanced editor.

The two date values in my post represent the second parameter and one of the date values in the lookup table – they are same format but I keep getting the has a datatype which cannot be joined on?

I have tried joining on only one date parameter.. same error.

Thanks
-Jeppe

|||

Are there any other errors posted? Have you tried fully qualifying startdate and enddate (e.g. [reftable].[startdate])? Error 1 does not look like an error we post did you cut and paste the entire error (i.e. our errors look like 0xCxxxxxxx)? As I asked previously did you look at the parameter dialog to see the mapping? Did you verify that the metadata for the dataflow column is the type you expect it is?

Thanks,

|||

The warning i like the one I posted and the error messagebox is:

TITLE: Package Validation Error

Package Validation Error


ADDITIONAL INFORMATION:

Error at Data Flow Task [Lookup [18314]]: input column "FakturaDato_konv" (18427) has a datatype which cannot be joined on.

Error at Data Flow Task [DTS.Pipeline]: "component "Lookup" (18314)" failed validation and returned validation status "VS_ISBROKEN".

Error at Data Flow Task [DTS.Pipeline]: One or more component failed validation.

Error at Data Flow Task: There were errors during task validation.

(Microsoft.DataTransformationServices.VsIntegration)


BUTTONS:

OK
The log says:

[DTS.Pipeline] Error: The ProcessInput method on component "Lookup" (18314) failed with error code 0xC0209029. The identified component returned an error from the ProcessInput method. The error is specific to the component, but the error is fatal and will cause the Data Flow task to stop running.

I have checked the column mappings and the format in metadata. I also tried a simpel lookup only on one of the date columns - samme error.

Maybe my package is corrupted?

Thanks
-Jeppe

|||I found the error Idea

The date column (FakturaDato) had to be mapped to one of the lookup date columns (StartDate or EndDate) - it's not enough that the string column (Ansvar) was mapped and the date columns manually added as input columns in the advanced editor.

Hope this makes sense

Thanks
-Jeppe

Problems with login to Web Data Administrator

Hi..

1. I installed MSDE with this string: Setup SAPWD=mypassword DISABLENETWORKPROTOCOLS=1 SecurityMode=SQL

2. And then i installed Web Data Administrator.

3. I try to login to my MSDE, but when i press the Login button, NOTHING is happening, I´ve been waiting for half an hour or so and it just freezes??.

4. I have tried Both SQL login and Windows, NONE of them work, i get no error messages at all, it just freezes?.

5. And the funny thing is that i can login with a connectionstring and a ordinary SqlCommand, that is no problem but the Web Data Administrator just freezes?I'm afraid that I don't have an answer for you. I just wanted to throw in that I have just started experiencing a similar problem. I used to have Web Data Admin working very nicely with MSDE. Then I uninstalled Visual Basic .NET Standard 2003 and installed Visual Studio .NET 2003 Professional. After doing so, suddenly the Web Data Admin just hangs after I press "Login" ... and VS.NET cannot access the MSDE database at all, whereas I used to be able to access the database with VB.NET Std just fine. The database itself still seems to be fine ... or at least it still works with a local ASP.NET website I have been working on.

At this point I'm thinking that my uninstalling VB.NET Standard took something with it that MSDE needed to be accessed by these other programs. If so, the problem is that I have no idea what that is (not to mention that I would have expected any such thing to be restored by the VS.NET Pro install, which to my thinking should have been a superset of the VB.NET Standard functionality.

Any ideas on what might have happened here would be most appreciated.|||After installing the MSSQLSERVER service isn't started automatically. If you start it manually with "net start MSSQLSERVER" (without quotes) in your run box it will work. Alternativly you could restart and it will start at startup.|||I did restart the computer...

Saturday, February 25, 2012

Problems with an insert

Ok, I've been looking at my code for a while now and need some help. All this function should do is take the incoming ProductID and String of ChildIDs, then insert a record for each ProductID and ChildID into my table

I have 2 problems with my function right now:

1) Why is my function creating zeros in the first pastthrough the loope for new ProductID passed to my function?


ProductID RelatedProductID
105744 0
0
105744
...and then it's fine

The problem is that the @.str variable is returning zero in the first iteration in my loop

SET @.str = substring(@.tmpstr, 1, @.pos - 1

2) It's inserting dup ChildIDs as you'll see below. You'll see I want to perform 2 inserts (with 2 different relationship types of 2 and 3) because for each parent / child we need a reverse insert with relationshiptype as the third column...don't ask me why, we just do.
Example incoming ChildIDs string looks like this (and this string is not always a fixed length): 105234,105235,105236,105237,105238,105239,105240,105241,105242,105243,105244,105245,105246,105247,105248,105249,105250,105251,105252,105253,105254,105255

The product ID incoming that is passed to this function for example is 106731

Example of the double inserts and zeros that keep happening for a product:

106731 0
0 106731
106731
105234 ?- Double Child 105234 (which I do not want happening)
106731 105234 ?-
106731 105235
106731 105235
106731 105236
106731 105236
106731 105237
106731 105237
106731 105238
106731 105238
106731 105239
106731 105239
106731 105240
106731 105240
106731 105241
106731 105241
106731 105242
106731 105242
106731 105243
106731 105243
106731 105244
106731 105244
106731 105245
106731 105245
106731 105246
106731 105246
106731 105247
106731 105247
106731 105248
106731 105248
106731 105249
106731 105249
106731 105250
106731 105250
106731 105251
106731 105251
106731 105252
106731 105252
106731 105253
106731 105253
106731 105254
106731 105254
106731 105255
105253 106731
105251 106731
105249 106731
105247 106731
105245 106731
105243 106731
105241 106731
105239 106731
105252 106731
105254 106731
105237 106731
105235 106731
105250 106731
105248 106731
105246 106731
105244 106731
105242 106731
105240 106731
105238 106731
105236 106731
105234 106731 <-- Double ChildID 105234
105234 106731 <--
105236 106731
105235 106731
105244 106731
105243 106731
105242 106731
105241 106731
105240 106731
105239 106731
105238 106731
105237 106731
105254 106731
105253 106731
105255 106731
105252 106731
105251 106731
105250 106731
105249 106731
105248 106731
105247 106731
105246 106731
105245 106731

What I should be getting is this instead (example below: ProductID is in bold, ChildID is in blue):

ProductID RelatedProductID RelationshipType

106731 105234 3

105234 106731 2

106731 105235 3

105235 106731 2

106731 105236 3

105236 106731 2

106731 105237 3

105237 106731 2

106731 105238 3

105238 106731 2

106731 105239 3

105239 106731 2

106731 105240 3

105240 106731 2

…and so on


ALTER PROCEDURE [dbo].[Insert_Product_Child_Relationships]
-- Add the parameters for the stored procedure here
@.ProductID bigint,
@.ChildIDList ntext
AS
BEGIN
DECLARE @.pos int,
@.textpos int,
@.chunklen smallint,
@.str nvarchar(4000),
@.tmpstr nvarchar(4000),
@.leftover nvarchar(4000)
SET @.textpos = 1
SET @.leftover = ','
WHILE @.textpos <= datalength(@.ChildIDList) / 2
BEGIN
SET @.chunklen = 4000 - datalength(@.leftover) / 2
SET @.tmpstr = ltrim(@.leftover + substring(@.ChildIDList, @.textpos, @.chunklen))
SET @.textpos = @.textpos + @.chunklen
SET @.pos = charindex(',', @.tmpstr)
WHILE @.pos > 0
BEGIN
SET @.str = substring(@.tmpstr, 1, @.pos - 1)
INSERT INTO ProductRelationship VALUES(@.ProductID, convert(bigint, @.str), 3,'', GetDate(), 3, NULL, NULL, 1, 0)
INSERT INTO ProductRelationship VALUES(convert(bigint, @.str), @.ProductID, 2,'', GetDate(), 3, NULL, NULL, 1, 0)
SET @.tmpstr = ltrim(substring(@.tmpstr, @.pos + 1, len(@.tmpstr)))
SET @.pos = charindex(',', @.tmpstr)
END
SET @.leftover = @.tmpstr
END
END

Schema (just enough to see what's going on)

ProductRelationship

-

ProductID (bigint)

RelatedProductID (bigint)

ProductRelationshipType (int)

It is doing that because you are adding a @.leftover to the beginning of the string, so the first record is nothing.

Change your SET @.tmpstr to:

--SET @.tmpstr = ltrim(@.leftover + substring(@.ChildIDList, @.textpos, @.chunklen))
SET @.tmpstr = ltrim(substring(@.ChildIDList, @.textpos, @.chunklen))|||Thanks Tom, I got so confused. Thanks much, it works great now!

problems with < or > string values

I have a query that is trying to find all of the names that fall between a low and high value. I'm using CHR(10) for the low value and this seems to work, but using a '{' for the high value does not. I chose '{' because it is one higher then 'z' in the ASCII charts. So the query looks something like this.

SELECT * FROM People where LastName > @.LastNameLow and LastName < @.LastNameHigh

The parameter values are built in .Net code and passed to the stored proceedure. @.LastNameLow is a string of CHR(10) values whose length is equal to the column length. @.LastNameHigh is a string of '{' characters whose length is equal to the column length.

When I run this query, I get no rows returned. However if I change the '{' character to 'z' character, it does return rows. However I don't want to use 'z' because the query is <, not <=. And before you ask, no I cant change it. I've tried '|', '}' and '~', all of which are valid ASCII values above 'z' and valid printable characters, but none of them seem to work in this case.

Any help would be appreciated.

Bill

you want a default LOWEST and HIGHEST value when user does not specify any value is it ?

why not pass in NULL value to @.LastNameLow or @.LastName High if user does not specify any Low or High value

SELECT *
FROM People
WHERE LastName >= coalesce(@.LastNameLow , LastName)
AND LastName <= coalesce(@.LastNameHigh, LastName)|||

A variation on K H Tan's solution (passing in Null when there is no upper or lower limit) is:

SELECT *
FROM People
WHERE ((LastName > @.LastNameLow) OR (@.LastNameLow IS NULL)) AND
((LastName < @.LastNameHigh) OR (@.LastNameHigh IS NULL))

Or if you have to take a string value instead then assuming you use say '@.#@.' as the no limit token then you can use the query:

SELECT *
FROM People
WHERE ((LastName > @.LastNameLow) OR (@.LastNameLow = '@.#@.')) AND
((LastName < @.LastNameHigh) OR (@.LastNameHigh = '@.#@.'))

You can use any token that would not be provided as a legitimate range value. I hope this helps.

|||

Not exactly. This kind of query is essentially being used as a LIKE statement. For instance if the user wants to search last names and enters 'SM' for the value, the parameters would code up to be 'SM'+chr(10)+chr(10)...+chr(10) for @.LastNAme Low and 'SM{{{{...{{{' for @.LastNameHigh. the intent is to return all last names that begin with 'SM'. Like I've said though, I don't really have control over the query and can't change it to a LIKE, so I'm trying to find values that will work. If @.LastNAmeHigh is 'SM{{{{...{{{' we get 0 rows returned, but if @.LastNameHigh is 'SMzzzzzz...zzzz' it does get some rows.

I know this must have something to do with the coallation and sort order set on the sql server. As near as I can tell we are using the default coallation which is Latin 1252 with sort order 52. The LAtin 1252 code page seems to match a traditional ASCII chart, but I have no idea what sort order 52 means or how to tell specifically how it is sorting.

Bill

Problems while converting string to date.

Hi Guys,

Source Column Data type: Varchar

Destination Data Type: smalldatetime

We have 2 columns effective_Date and Expiration_Date:

the format of data in these columns is not consistent.

Sample values:

1/23/2006

Tuesday, June 21, 2005

1/0/1900

8-Mar-06,

NULL

Now, i want to convert to a standard date format like "2006-03-08 00:00:00".

please let me know the steps to do..

Thanks in Advance.

Sri

Use the Derived Column component. This is simply a string manipulation problem.

-Jamie

|||

Thanks Jamie,

Can you please eloborate the process with the same example.

|||

Hi Jamie,

As i told earlier the date column has different formats of date,

please help me in finding the solution.

how many derived column transformations i have to use..is it for every format of date i have to use one ?

for eg if date format is Wednesday, June 01, 2005 then can you please explain me how to write the code in derived column transformation?

I appreciate your help.

|||

That looks challenging....may be you can use a script component with Regular expressions to parse the date and split the rows according to their format; then you can have expressions to cast them accordingly...

This is just a thought...sorry I have not examples

Rafael Salas

|||

Thanks Rafael...atleast i have something to start..

Where can we implement case statement ..

can we do that in derived column transformation?

let me try this..

Thanks

Sri

|||

You could use a series of nested SSIS conditional operator inside of the derived columns; but the expression can get very large and hard to read/debug.

You can see an example of the conditional operator here:

http://msdn2.microsoft.com/en-us/library/ms141680.aspx


Rafael Salas