Module for knowledge loop can be used in the procedure of the ODI

Hello

I have a unique requirement where I need to use the procedure for ForLoop ODI.

Y at - it an option that we can use to create several instructions based on loop For and execute these instructions in particular technologies.

Below is the code I have tried to create for the MS SQL Server technology in ODI procedure. It gives the select statement several times to condition. But somehow the value of i is not passed to select statement

< % for (int i = 10001; i < = 10005; i ++)

{% >}

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

< %}; % >

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = 000000

It generates code below:

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = i

Union

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = 000000

Can you please help me to know how the value of i will impact inside.

Try this...

< %="" pour="" (int="" i="10001 ;" j’ai="">< =="" 10005 ;="" i="">

{% >

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = <%=i%>

Union

<% }; %>

Select * from [DB_SERVER]. [dbo]. [DB_TABLE] where col_1 = 000000

Tags: Business Intelligence

Similar Questions

Maybe you are looking for

  • How can I resize the window of my table using the node of furniture? Thank you

    Hello I want to first the size of the window of my table using its property node but I can't put it to "write". If anyone knows if this is possible? Thank you User

  • Windows XP asking me to activate when I connect

    Cannot connect to Windows on a virtual machine The motherboard on my Windows XP machine is dead.  The hard drive is fine.  I bought a MAC to run Parallels so that I could continue to use some windows applications only.   When I try to connect to the

  • Detect the end of audio track.

    I can't find anything that let me known when the audio track that I started using mmr_play() is complete.  I tried asking events using the following. audiodevice_request_events( 0 ); audiomixer_request_events( 0 ); I get an event of each when the app

  • Amplifier Alienware Graphics issue

    Hi all I will receive my newly ordered Alienware 17 R3 and the amplifier. In fact, now I haven't decided to buy what kind of desktop GPU in my amp, but the amplifier has the usb connectors, which can be my home station to connect the external mouse,

  • Disorder of Smartphones blackBerry installation app world

    I have the storm 9530 v 4.7.0.148 nd try to install app world. I did the installation to 1.1.0.20 and after restarting, I click on app world and I said what I did many times reinstall and is still doing the same thing. I can't go to the world of the