Simple parameter question ie db_name and usage in an expression

Hi,
I just started with SSIS with an example containing a flat xls file with 5 columns and a source table in sql.
The example works fine no parameters etc.
What I want to try out is to make an exception that if a certain db_name = X then the flow should be redirected to another table.
Basicly I need help how to define a parameter to read from the source database like "select db_name as db_name" and use this in the package flow. When db_name=X then flow A ELSE flow B
Any help is very appreciated.
-Miracles are easy, the impossible takes a bit longer-

Hi Paul,
Create an object variable with name varObj and create a string variable with name as varDBName
Use this as source query in execute sql tasK: Select <DBNamefield> from Table. In execute sql task do the following:
On General tab: set Result set as Full Result Set
On Result Set tab: Click Add and set Result Name as 0 and select varObj as Variable Name. This variable will capture the value returned from the select statement.
Take a for each loop container and configure it as:
On Collection tab: Enumerator: for each ado enumerator; ADO Object source variable: varObj; Enumeration Mode: Rows in first table.
On Variable Mappings tab: Select varDBName as variable and set Index as 0.
Inside the for each loop put the data flow task. Configure the data flow task and use a conditional split to redirect the rows based on varDBName as : @[User::varDBName]=="x" and so on for different outputs
Nitesh Rai- Please mark the post as answered if it answers your question

Similar Messages

  • Very simple Parameter question in Eclipse

    I simply want to create a report where a user can pick a date range at runtime.  I designed a simple report, added parameter fields and ran it in the designer.  It prompted me for dates and I filled them in.  The report ran in the designer just fine.  When I publish the report to the Apache Tomcat web site, I want the prompts to pop up for the user so they can pick the date range.  There are no parameters that pop up and the parameter panel shows NO parameters.  Can someone point me to a document or process that will allow me to prompt the user for these dates?  I am invoking the report from the JSP that is generated by the plugin.

    Are you passing paramete values in your code? If you do not then it will automatically asks for parameters.
    Regards,
    Tejaswini

  • Simple layout question, shrinking TextField and TextArea inside VBox

    Given:
            VBox root = new VBox(10);
            root.getChildren().addAll(new TextField(), new TextArea());
            Scene scene = new Scene(root, 300, 250);When I shrink the application window vertically, the textfield starts to shrink first, while the text area stays its size, then when the textfield is only a narrow strip, the text area starts to shrink.
    1) Is this expected?
    2) Is it by design? If so, why?
    3) How can I avoid it, i.e. have the text area shrink first, then the textfield?
    It think the behaviour in 3) makes more sense, since a text area by its nature can have different heights; a text field on the other hand I would expect to have the height of a single line of text unless there is absolutely no space for it in its container. It doesn't make sense to have a textfield that is a fraction of the height of a line of text.
    I have tried various combinations of minHeight and prefHeight, but without luck.

    Hey,
    1) Yes, this is expected!
    2) Yes, why.. well I don't know why the minimum height of a TextField is smaller than the pref size.
    3) This can be avoid by setting your own sizes (min size - pref size - max size)
            VBox root = new VBox(10);
            root.setStyle("-fx-background-color: lightgray");
            TextField tf = new TextField();
            tf.setMinHeight(Control.USE_PREF_SIZE); //the minimum height = the preferred height
            TextArea ta = new TextArea();
            ta.setMinHeight(30);
            ta.setPrefHeight(50);
            ta.setMaxHeight(Double.MAX_VALUE); //maximum height, depends on the parent
            VBox.setVgrow(ta, Priority.ALWAYS); //use the maximum height available
            root.getChildren().addAll(tf, ta);
            Scene scene = new Scene(root, 300, 250);Edited by: FXdude on 21-jan-2013 6:13

  • Simple parameter question

    I am trying to find out if there is no paraneter posted to my Jsp
    like this but it does not work
    if (request.getParameter("pageSrc")){
    I got this error
    Can't convert java.lang.String to boolean
    how can i test for this

    request.getParameter returns a String.
    if (....) expects a boolean.
    so, retrieve the String
    then test (Boolean) to see if the string is empty or null

  • Question regarding roaming and data usage

    I am currently out of my main country of service, and as such I have a question regarding roaming and data usage.
    I am told that the airplane mode is sufficient from keeping the phone off from roaming, but does this apply to any background data usage for applications and such?
    If the phone is in airplane mode, are all use of the phone including wifi and application use through the wifi outside of all extra charges from roaming?

    Ann154 wrote:
    If you are getting charged to use the wifi, then it is possible.  Otherwise no
    Just to elaborate here, Ann154 is referring to access charges for wifi, which is nothing to do with Verizon, so if you are using it in a plane, hotel, an internet cafe etc that charges for Wifi rather than being free .   Verizon does not charge you (or indeed know about!) wifi usage, or any other usage that is not on their cellular network (such as using a foreign SIM for example in global phones)  So these charges, if any, will not show up on the verizon bill app.  Having it in airplane mode prevents all cellular data traffic so you should be fine

  • HT4623 I'm an iphone virgin (so please excuse my stupid question if that is what it transpires to be) but when I try to update my iphone 3GS when I go into SETTINGS GENERAL my display reads ABOUT and USAGE but has nothing about software upgrade in between

    Help, I've just bought a second hand iphone (my first ever) but when i try to get any apps it tells me i require ios4.3 but wen i try to update it I seeem to be missing a catorgory inbetween about and usage i should have software upgrade so i've been told i'm learning as I go lol but i have set up an itunes acc and i cant put apps on that way either has anyone come across this and a friend looked at it and said check its not been jailbreak/broked I have no idea what this means or how to check for it is it reversable any help is appreciated as i'm slowly losing the will to live lol many thanx in advance. oh I think it is a 3gs or a 3 but deff no newer cheers

    Read this: iOS 4: Updating your device to iOS 5 or later
    ... oh I think it is a 3gs or a 3
    This makes a difference. What does it say in Settings > General > About?

  • Various questions on SAP XI usage

    Hi XI Experts,
    I have few questions on SAP XI usage :
    Q1-Does SAP XI is unique - client like BW ?
    If multi - clients is possible is there any particular usage recommandations when in design, configuration and production deploiement on PRD SAP XI System ?.
    Q2-is it technically possible to restart a well processed message (with nice black & white flag in SXMB_MONI) ?
    And I know its not a good thing to try to do this...
    Q3-is it technically possible to modify XML payload in message ?
    And I know again its a very bad thing to try to do this...
    Q4-We have to work with xCBL 4.0 definitions. I think i only have to import all XSD definitions as External Definitions in Interface Objects of my repository. Does it right ?
    Great thanks for your(s) response(s).
    Best regards
    Etienne

    Hi,
    >>>>Q2 : few methods....hum hum...
    one of them I described in my weblog:
    /people/michal.krawczyk2/blog/2005/11/09/xi-restarting-successfully-processed-messages
    >>>>Q3 : i 'm in SP16. Do you think it'll be as simple as "Right click on message -> Restart message" ?.
    yes it will be that simple as WE19 for IDOCs in R3:)
    Regards,
    michal
    <a href="/people/michal.krawczyk2/blog/2005/06/28/xipi-faq-frequently-asked-questions"><b>XI / PI FAQ - Frequently Asked Questions</b></a>

  • "Missing parameter values."  --  Export and Print only...

    I have a web application and I am using CrystalReportViewer.  I am passing several parameters to Crystal using: 
    report.SetParameterValue(field.Name, Session[field.Name]);
    I have session variables which will hold parameters needed to pass into the report.  The session variables are populated from controls on my webpage after an onclick event.  This even not only populates session, but also passes parameters to the report with the following code: 
    ReportDocument report = new ReportDocument();
    Session["MapPathName"] = "./Reporting/CaseStudy.rpt";
    report.FileName = Server.MapPath(Session["MapPathName"].ToString());
    ParameterFields fields = new CrystalDecisions.Shared.ParameterFields();
    fields = report.ParameterFields;
    foreach (ParameterField field in fields)
          report.SetParameterValue(field.Name, Session[field.Name]);
    CrystalReportViewer1.ReportSource = report;
    This works great for reporting and is very extensible.  However, when clicking on the "Print" or "Export" buttons on the toolbar I get "Missing parameter values."  I attempted to export manually in code using the .ExportToStream function but I still get the error, "Missing parameter values." 
    I received this error also in Refresh, Search, and Navigate functions.  This was corrected by calling a function that supplies the above code block to these functions.  However, I do not see any events for controlling the Print nor the Export events. 
    QUESTION: How can I print or export a report when passing parameters using CrystalReportViewer?  Thanks in advance!
    P.S. - Crystal Reports XI Release 2
    Edited by: KyleSavant on Jun 18, 2009 5:42 PM

    There are no Export or Print events accessible for the viewer
    Since it sounds like you are creating the reportdocument object in your click event, the settings on this object become out of scope on successive postbacks executed by other events.
    to get around this without major changes, you can place your "report" object in session in this event and retrieve it from session on successive postbacks.  This should solve your problems around navigation, printing and exporting.  What you will need to do is check if the session object exists (usually in page_load or page_initialze) and if so, retrieve it from session and bind it to the viewer's reportsource.  If the session object does not exist, then do nothing (ie you have not clicked your button yet that retrieves the parameter values from session and loads the report).  Also, in your click event you can check if the report session object exists and if so, remove it so that it can be re-created with your new parameter values (ie i'm assuming the only time you want to set parameter values is in this event).
    Dan

  • Parameter for Current Month and Previous Month

    I'm trying to create a parameter for current month and previous month based on the ex_date, but not sure what i'm doing wrong. 
    where ex_date = @SelectDate
    I created a second dataset below for the values in the parameters.
    SELECT Month(CURRENT_TIMESTAMP) AS 'Month', 'Current Month' as 'Current Month'
    union all
    SELECT Month(CURRENT_TIMESTAMP)-1 AS Month, 'Previous Month' as 'Previous Month'
    Results
    Month Current Month
    3 Current Month
    2 Previous Month
    Once I preview it I get "Conversion failed when converting date and/ or time from character string" I changed the data type to "date/Time" but that did not make a difference. The date is convert (varchar(10), ex_date, 101) so looks like
    11/12/2014. 
    I've also tried expressions like =month(now()) to pull current month with same error so i'm not sure what i'm doing wrong. Any ideas?

    i tired this real simple report
     in the first dataset - my main report query - select name from sysdatabases where month(crdate())=@month
    in the second dataset - select month(getdate()) as Month1
    in the parameters - choose int data type and available values - select the second data set
    in the first data set- add this parameter..( i am assumming you know this, since you have done)
    in the preview you should get the drop down with current month number - 3
    and if you run the report, it will display the database names that were created in march. remember we are no checking year, so will get all that were created in march across the years.
    Hope it Helps!!
    I'm looking to have the dropdown say "Previous Month" and "Current Month" as a option. I know how to get the information in SQL, but not sure how this translates or put into a parameter.
    Current Month
    list_date BETWEEN
    DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()), 0)
    AND
    DATEADD(MONTH, DATEDIFF(MONTH, 0, GETDATE()) + 1, 0)
    Previous Month
    list_date between
    CONVERT(varchar,dateadd(d,-(day(dateadd(m,-1,getdate()-2))),dateadd(m,-1,getdate()-1)),106) /* Last Month */
    and
    CONVERT(varchar,dateadd(d,-(day(getdate())),getdate()),106)

  • Questions about db_keep_cache_size and Automatic Shared Memory Management

    Hello all,
    I'm coming upon a server that I'm needing to pin a table and some objects in, per the recommendations of an application support call.
    Looking at the database, which is a 5 node RAC cluster (11gr2), I'm looking to see how things are laid out:
    SQL> select name, value, value/1024/1024 value_MB from v$parameter
    2 where name in ('db_cache_size','db_keep_cache_size','db_recycle_cache_size','shared_pool_size','sga_max_size');
    NAME VALUE VALUE_MB
    sga_max_size 1694498816 1616
    shared_pool_size 0 0
    db_cache_size 0 0
    db_keep_cache_size 0 0
    db_recycle_cache_siz 0 0
    e
    Looking at granularity level:
    SQL> select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';
    GRANULE_SIZE/VALUE
    2048
    Then....I looked, and I thought this instance was set up with Auto Shared Mem Mgmt....but I see that sga_target size is not set:
    SQL> show parameter sga
    NAME TYPE VALUE
    lock_sga boolean FALSE
    pre_page_sga boolean FALSE
    sga_max_size big integer 1616M
    sga_target big integer 0
    So, I'm wondering first of all...would it be a good idea to switch to Automatic Shared Memory Management? If so, is this as simple as altering system set sga_target =...? Again, this is on a RAC system, is there a different way to do this than on a single instance?
    If that isn't the way to go...let me continue with the table size, etc....
    The table I need to pin is:
    SQL> select sum (blocks) from all_tables where table_name = 'MYTABLE' and owner = 'MYOWNER';
    SUM(BLOCKS)
    4858
    And block size is:
    SQL> show parameter block_size
    NAME TYPE VALUE
    db_block_size integer 8192
    So, the space I'll need in memory for pinning this is:
    4858 * 8192 /1024/1024 = 37.95.......which is well below my granularity mark of 2048
    So, would this be as easy as setting db_keep_cache_size = 2048 with an alter system call? Do I need to set db_cache_size first? What do I set that to?
    Thanks in advance for any suggestions and links to info on this.
    cayenne
    Edited by: cayenne on Mar 27, 2013 10:14 AM
    Edited by: cayenne on Mar 27, 2013 10:15 AM

    JohnWatson wrote:
    This is what you need,alter system set db_keep_cache_size=40M;I do not understand the arithmetic you do here,select granule_size/value from v$sga_dynamic_components, v$parameter where name = 'db_block_size' and component like 'KEEP%';it shows you the number of buffers per granule, which I would not think has any meaning.I'd been looking at some different sites studying this, and what I got from that, was that this granularity gave you the minimum you could set the db_keep_cache_size, that if you tried setting it below this value, it would be bumped up to it, and also, that each bump you gave the keep_cache, would be in increments of the granularity number....?
    Thanks,
    cayenne

  • A few questions about MacBooks and Parallels Desktop.

    I have a few questions about MacBooks and Parallels Desktop.
    1) I understand I need at least 1GB of RAM to run Parallels Desktop but what about the hard drive, is the stock 60GB drive big enough?
    2) Related to question 1, even if it was big enough to allow me to install and run Windows would the 60GB drive be enough if I wanted to install a Linux distribution as well?
    3) This has nothing to do with Parallels Desktop but thought I'd ask it here anyway, do Apple Stores carry just the stock MacBooks, or do they carry other configurations?
    Thanks
    Keith

    1. Depend on how intensive you use that HD for saving data on both Mac OS and XP. For standard installation on both OS X and XP, the space of 60 Gb is enough.
    2. Same answer as no 1. You can install all three on that HD space, but the extra spacce available will be less and less for your data. You can save your data on external or back up on cd/dvd and erase it from the HD to keep the free space.
    Remember to leave at least 2 or 3 Gb for virtual memory usage.
    3. Just call them, maybe they don't have it in store stock, but by appointment they might configure one for you before your pick-up date.
    Good Luck

  • How to pass simple parameter to XSLT from BPM 11g Data Association

    Is it possible to pass a simple parameter to an XSLT from a BPM 11g Data Association (11.1.1.6.0)?  Here is why I asked.  I have a transform that I want to reuse across two service activities in the same process.  The only difference is one integer ID value between the two activities.  (Happens to be running an IPM saved search, each with a different ID.)
    I tried mapping the ID value in the Data Association dialog, in addition to the XSLT mapping, but didn't work.  Or is there another method I could use to reuse this transform (besides just copying it as I've done for now)?  Thanks.

    If I understood your scenario, the point is: you always have to pass the same dataObjects as parameters to the XSL, but you can change the values of them in an association step before the transformation.
    Lets see if the following can fit your needs:
    1) your project has three BusinessObjects: "SearchParam", "CommonData" and "Result"; and five process dataObjects:
    - "search1", "search2" and "search" of type "SearchParam";
    - "commonData" of type "CommonData";
    - "result" of type "Result"
    2) your XSL has "result" as target and two sources: "search" and "commonData"
    3) In some part of the process flow you have a scriptTask with:
    - a data association from "search1" to "search";
    - a transformation with "search" and "commonData" as parameters
    4) In other part of the process flow you can use the same transformation, but using the data from "search2" as parameter, adding a scriptTask with:
    - a data association from "search2" to "search";
    - the same transformation with "search" and "commonData" as parameters
    In this scenario you are reusing the same XSL file only changing the values for one parameter.

  • 4 Simple Flash Questions that Are Stumping Me!

    What is the Frame Rate for Web Animations
    Q1. I am making an animation which will be played on the web. What is the default frame rate (fps) of Flash CS5? And what is the frame rate of for web?
    Q2. My animation needs to be 30 seconds long. So at 15 fps that would mean I need to use 600 frames in Flash?
    How Do I Mask everything so all I see is the Content on the Stage?
    I have a wide image that extends past my movies stage size so when I preview my movie the image is visible. How do I mask out anything that extends past my movies window size? I believe I can create a layer named "mask" and place it above all other layers, but I forget how to make the mask. Any help is appreciated.
    How to Fade a Graphic
    I have a graphic element (some type) and I want it to fade from 0% to 100%. In older versions of Flash I could just select the symbol and then set it's alpha value to 0%, move a few keyframes and then set the alpha to 100%. Voila! but now it doesn't seem to work that way. How can I do this in CS5?

    Ned, it says 24 fps which means there is 24 frames per second so each 24 frames is 1 second.
    Date: Fri, 4 Nov 2011 05:35:16 -0600
    From: [email protected]
    To: [email protected]
    Subject: 4 Simple Flash Questions that Are Stumping Me!
        Re: 4 Simple Flash Questions that Are Stumping Me!
        created by Ned Murphy in Flash Pro - General - View the full discussion
    1 You can create your character as a movieclip and copy/paste that movieclip from one file to another. 2. One way to create a movieclip is to copy all the frame of the animation's timeline (select them all, right click the selection, choose Copy Frames), then create a new movieclip symbol (Insert -> New Symbol...etc) right click on its only keyframe and chhose Paste Frames.  THat will put all the layers and frames you copied into the movieclip The only way to come close to being certain about the timing of you animation is to use code to keep track of the time, something like getTimer()..  The frame rate that a file plays at is not a reliable means of dictating the time it takes due to a variety of factors which include the amount of content you are trying to process and performance limits of the user's machine.
         Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4007420#4007420
         To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4007420#4007420. In the Actions box on the right, click the Stop Email Notifications link.
         Start a new discussion in Flash Pro - General by email or at Adobe Forums
      For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746.

  • Using a Simple Parameter Form Portlet with a Report Portlet to Search DB

    My organization registers clients for workshops in iLearning.We use iPortal for our web site. I would like to use a Simple Parameter Form Portlet for clients to conduct a search on the data that is in iLearning and have it displayed in a Report Portlet on a separate page. I have been able to bring the iLearning data into the Report Portlet but I have not been successful in setting up the Simple Parameter Form Portlet to do a search on the data and then have it displayed. Any suggestions.

    hi,
    i just tested this in portal 10.1.4 and it works fine. you can fire an event and pass a parameter from a simple parameter form portlet and consume this page parameter in a portlet builder reports component. there is some documented behavior in bug 3321558 that has to do with personaliziation (customization in older releases). if you enter some personalization the page parameter gets ignored. for more information on this please contact oracle support services.
    regards,
    christian

  • Simple performance question

    Simple performance question. the simplest way possible, assume
    I have a int[][][][][] matrix, and a boolean add. The array is several dimensions long.
    When add is true, I must add a constant value to each element in the array.
    When add is false, I must subtract a constant value to each element in the array.
    Assume this is very hot code, i.e. it is called very often. How expensive is the condition checking? I present the two scenarios.
    private void process(){
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             if (add)
             matrix[i][ii][iii][...]  += constant;
             else
             matrix[i][ii][iii][...]  -= constant;
    private void process(){
      if (add)
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
             matrix[i][ii][iii][...]  += constant;
    else
    for (int i=0;i<dimension1;i++)
    for (int ii=0;ii<dimension1;ii++)
      for (int iii=0;iii<dimension1;iii++)
        for (int iiii=0;iiii<dimension1;iiii++)
           matrix[i][ii][iii][...]  -= constant;
    }Is the second scenario worth a significant performance boost? Without understanding how the compilers generates executable code, it seems that in the first case, n^d conditions are checked, whereas in the second, only 1. It is however, less elegant, but I am willing to do it for a significant improvement.

    erjoalgo wrote:
    I guess my real question is, will the compiler optimize the condition check out when it realizes the boolean value will not change through these iterations, and if it does not, is it worth doing that micro optimization?Almost certainly not; the main reason being that
    matrix[i][ii][iii][...]  +/-= constantis liable to take many times longer than the condition check, and you can't avoid it. That said, Mel's suggestion is probably the best.
    but I will follow amickr advice and not worry about it.Good idea. Saves you getting flamed with all the quotes about premature optimization.
    Winston

Maybe you are looking for

  • Is there a Safari extension (or plug-in) for Acrobat Pro?

    Is there a Safari extension (or plug-in) for Acrobat Pro? I use to have one, then when I updated to the new Yosemite operating system, it disappeared.

  • Express documents - how to get list at logon?

    Hi, (4.6c release) I have a background job which creates a spool and send it to a sap-user by sap-mail with check 'Express'. However, if the user is not logged on, on his/her next logon he/she didn't get a popup with info message that there are expre

  • What does the "search" button actually search?

    You had an OTN article a couple weeks ago about using vim in SQLPlus. I wanted to look at it again. So I type "vim" in the search box and hit it. Two useless and apparently unrelated results are found. So I hunt for it myself and find the article: "V

  • WPC - Localized Content

    Hi I would like to know if it is possible to implement localized versions of content , just like the pages in WPC. Our ideia is to implement a translator role , when a author creates a new document this translator would be responsible for implementin

  • Journals posting on legal consolidation application

    Hi friends, created legal consolidation application.  Elimination are happening as per expectations. Created journal template in above application. But when i try to create journal entry, system not created . At status bar able to see, jouranl id. Bu