Showing posts with label implement. Show all posts
Showing posts with label implement. Show all posts

Friday, March 23, 2012

how to use stored procedures with Sql Compact Edition

I am working on C# Windows Application and Iw ould like to know j\how can I implement stored procedure with SQL Compact Edition?Stored procedures are not available in SQL CE. For more info on SqlCeCommand limitations, see http://msdn2.microsoft.com/en-us/library/system.data.sqlserverce.sqlcecommand.aspx

Monday, March 19, 2012

How to use regular expressions on SSIS?

Hi everyone,

Is it possible? I haven't idea how to implement as if it were done from conventional .Net code

I'd like to check every field for a plan file

First field NNNNNNN

Second field XXXNNNNNNN

,,

Thanks for any input or idea,

You can use a script task ; an example of using here

About the second part of question an ideea can come from here.

|||This transform may also be of use - http://www.sqlis.com/91.aspx|||

Thanks indeed to both. It's useful.

|||

Hi Darren,

Regarding your link about Regular Expressions tasks, unfortunately, third-components are not allowed in our environment...

|||

enric vives wrote:

Hi Darren,

Regarding your link about Regular Expressions tasks, unfortunately, third-components are not allowed in our environment...

That's uunfortunate!

|||

I appreciate many organisations think that way.

I would be interested in knowing why that is the case for you?

What would it take to allow such component usage in your organisation? I'd be happy to see what could be done to help people like youself in these situations. Do you not use any non-MS products? If you are intertested then I'd be happy to discuss this further or offline, mail me darren dot green at konesans com

How To use OLE Control like MS Access on SQL Server

I need some help to use an OLE Control which found in MS Access, to save and load files directly .
so Is there any way to implement [OLE] Control with SQL SERVER vs .NET such as VB NEt or C#..
thank youany help please|||how I need a help quickly|||

Quote:

Originally Posted by jooorj

I need some help to use an OLE Control which found in MS Access, to save and load files directly .
so Is there any way to implement [OLE] Control with SQL SERVER vs .NET such as VB NEt or C#..
thank you


No there is no way to do that. You need to use a compiling language.

Friday, March 9, 2012

How to use For Each loop to Read one record and insert the same into destination

Hi,

My procedure to implement a task is like this

I will be using execute SQL task to fetch the records from source,after this wanna use For each loop to access each record one at a time,perform some trnsformations and insert that record into destination.

Help me in accessing the data stored in the Variable(SQL task) in Dataflow task of foreach loop.

Why do you need to do this one record at a time - is the transformation different for each record ?

Can you explain the transformations you need to do?

|||

In the Exec SQL task Editor:

1. General Tab - Result should be of type Full Resultset.

2. ResultSet tab - Set Result Name =0 , Variable Name= your variable of type object (you can create a new variable from the Variable Name dropdown itself, or in the main Variables Pane). Variable type =Object.

http://technet.microsoft.com/en-us/library/ms141689.aspx has details.

3. Add a For Each Loop Container.

4. In the forEach Loop editor, Collection Tab, Set Enumerator=For Each ADO Enumerator

5. In the Variable Mapping, map your column variables to index 0,1,2 (assuming you have three columns in your resultset). You can create your own variables for each column. For each iteration i.e. for each row of the resultset, these variables will hold the value of the respective columns for the current row.

6. Perform your transformations

7. Use a OLEDB Command destination to insert/update your row to the table.

HTH

Kar

|||The requriment from is in that way,I have proposed for a bulk process.But m not sure if i will get the approval.

|||

The index value to be set are in tenh order of retreival from source.

How to access those variables inTansformations can u be specific using Derived column.

|||

You'll get much better performance if you use an OLE DB Source inside a data flow, rather than iterating through a resultset with a For Each. You might want to revisit your design, or post more specifics so we can help you a little more.

|||

Hi,

I will be having a SQL query to retreive data from source,incorporated in Execute SQL task.

Result will be stored in a Result Set.

After this inside a ForEach loop i have to access single record contained in the result set apply some transformations and send the data into destination.

So my requirement is to process one row of data at a time and whole data processing must take place in a loop.

My problem is,How do i process this data in Data Flow task inside For Each loop.

|||

Hi,

You can achive this by this method(i have tried it out)

Use source query and populate the Recordset destination(variable must be of type object)

For each loop(enumerte through adonet)

Based on number of columns declare those many variables and access them in a script componet(source)

and output those variables as columns,

Do the transformations and insert into destination finally.

Any queries post it here.I will help u out.

|||Sorry, but I'm still not understanding why you have to loop through the recordset rather than using an OLEDB Source. However, if it works for you, stick with it.