Linking three databases and combing results into one resultset

Hi Folks,
I would like to receive input of respectable members of this forum for this problem. Please see details below and let me know what would be the best approach to implement it.
Problem statement:I need to present data from three Oracle databases in the form of a report based upon parameter values entered by users.
Problem Details:I have three tables which have same structure but different data. Each table is in a different database, i-e:
DB1.TableX (say: DB1 holds data for Europe)
DB2.TableX (DB2 holds data for Asia)
DB3.TableX (DB3 holds data for North America)
User Parameters:If p_country = 'ENGLAND' then go and fetch data from DB1.TableX only
If p_country in ('ENGLAND', 'U.S.A') then go and fetch data from DB1.TableX and DB3.TableX etc.
Users:Users of DB1, DB2 ,and DB3 will be running this report from their respective dbs so users of DB1 will be able to see data of DB2 and DB3 as well and the vice versa.

dreporter wrote:
User Parameters:If p_country = 'ENGLAND' then go and fetch data from DB1.TableX only
If p_country in ('ENGLAND', 'U.S.A') then go and fetch data from DB1.TableX and DB3.TableX etc.You do not want to hit and process remote tables when they do not have the required rows.
There's an old feature, dating back to Oracle v7 and still around, called partitioned views. Simply put, you create a view on the tables by using union all.
A constraint per table specify the expected rows in that table. Oracle's CBO uses this constraint to determine which tables in the partition view to query (assuming of course the constraint column is used).
For example, you have 5 organisations (same table structure) and a table per organisation. You add a organisation column to each of the tables, with a constraint on the column specifying which organisation's data is in that table. So table1 will have a check constraint on ORG_CODE that says 'BBC', and table2 will have the same constraint with value 'CNN', and table3 will have constraint with value 'SKY', etc.
The partition view is a plain vanilla view. E.g.
<i>create or replace view organisations as
select * from table1 union all
select * from table2 union all
select * from table3 union all
select * from table4 union all
select * from table5</i>
If you now query the partition view and use ORG_CODE = 'SKY', then only table3 will be queried and the other tables will not (the CBO prunes the other tables from the view using a special predicate).
This works pretty well - especially when you only have Oracle Standard Edition. The question though is whether this will work across db links. But it is worth finding out and having a look at this option.

Similar Messages

  • SQL Query -How2bring multiple results into one field using Formatted Search

    Hi Everyone
    i am trying to bring in the results of the field dbo.Lot_ITEM.LOT using a formatted search into a row level using the following query:
    SELECT     dbo.LOT_ITEM.LOT
    FROM       dbo.DLN1 INNER JOIN dbo.LOT_ITEM ON dbo.DLN1.ItemCode = dbo.LOT_ITEM.ITEM
    WHERE     dbo.LOT_ITEM.ITEM=$[DLN1.ItemCode]
    however the result of the dbo.Lot_ITEM.LOT field could be more then one value depending on how many lots are assigned for that item
    (for example this query would be similar to assigning batch/serial numbers to an item being despatched - as you can choose multiple batches/serials depending on the quantities available and required and then move from the left to the right side of the selection window) if that makes sense!
    is it possible to bring in the multiple results into one field? and how can i amend the above query to include this?
    Thankyou in advance :o)
    Edited by: Asma Bi on Apr 23, 2008 7:22 PM
    Edited by: Asma Bi on Apr 23, 2008 7:24 PM

    Hi Suda
    Thanks for replying :o) but im not sure about the query?
    just to simplify it (as the query im working with is to do with 3rd party addons) i have used the serial/batchs field instead and used standard demo database fields from SBO 2005 sp01:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode='g1000' and dbo.ixvSerialNoFact.SRI1_BaseEntry = '193'
    The above brings me the relevant results but when i change it to be used in a formatted search:
    SELECT     dbo.ixvSerialNoFact.SRI1_IntrSerial
    FROM       dbo.DLN1 INNER JOIN
                    dbo.ixvSerialNoFact ON dbo.DLN1.DocEntry = dbo.ixvSerialNoFact.SRI1_BaseEntry
    WHERE     dbo.ixvSerialNoFact.ItemCode=$[dln1.itemcode] and dbo.ixvSerialNoFact.SRI1_BaseEntry = $[dln1.DocEntry]
    i cant seem to get it to work - now this may be because the serial number is not allocated until teh record is added to the system, however when this happens i am unable to go back in and manually trigger the query as the delivery note rows cannot be selected!
    i  think as what im originally wanting an answer for is same as this example, im wanting to know if this is even possible?
    Thanks
    Edited by: Asma Bi on Apr 24, 2008 3:53 PM
    Edited by: Asma Bi on Apr 24, 2008 3:55 PM

  • Read multiple files and save all into one output file(AGAIN)

    Hi, guys
    I need your help for reading data from multiple files and save the results into one output file. When files are selected from file chooser, my program read the data line by line , do some calculations and save the result into the output. I made an array to store input files and it seems to be working fine, but when it comes to SaveFile() function, issues NullPointException message.
    public class FileReduction1 extends JFrame implements ActionListener
       // GUI definition and layout
        /* ACTION PERFORMED */
        public void actionPerformed(ActionEvent event) {
            if (event.getActionCommand().equals("Open File")) getFileName();
        /* OPEN THE FILE */
        private void getFileName() {
            // Display file dialog so user can select file to open
         JFileChooser fileChooser = new JFileChooser();
         fileChooser.setFileSelectionMode(JFileChooser.FILES_ONLY);
            fileChooser.setMultiSelectionEnabled(true);
         int result = fileChooser.showOpenDialog(this);
         // If cancel button selected return
         if (result == JFileChooser.CANCEL_OPTION) return;
            if (result == JFileChooser.APPROVE_OPTION)
             files = fileChooser.getSelectedFiles();
                textArea.setText("");
                if(files.length>0)
                    filelist="";
                    System.out.println("files length"+files.length);
                    for(int i=0;i<files.length;i++)
                         System.out.println(files.getName());
    filelist+=files[i].getName()+" ,";
    if (checkFileName(files[i]) )
    openButton.setEnabled(true);
    readButton.setEnabled(true);
    textArea.append("file "+files[i].getName()+"is a proper file"+"\n");
    readFile(files[i]);
    textfield.setText(filelist);
    else{JOptionPane.showMessageDialog(this,"Please select file(s)",
                    "Error 5: ",JOptionPane.ERROR_MESSAGE); }
         // Obtain selected file
    /* READ FILE */
    private void readFile(File fileName_in) {
    // Disable read button
    readButton.setEnabled(false);
    // Dimension data structure
         getNumberOfLines(fileName_in);
         data = new String[numLines][4];
         // Read file
         readTheFile(fileName_in);
         // Rnable open button
         openButton.setEnabled(true);
    /* GET NUMBER OF LINES */
    /* Get number of lines in file and prepare data structure. */
    private void getNumberOfLines(File fileName_in) {
    int counter = 0;
         // Open the file
         openFile(fileName_in);
         // Loop through file incrementing counter
         try {
         String line = fileInput.readLine();
         while (line != null) {
         counter++;
              System.out.println("(" + counter + ") " + line);
    line = fileInput.readLine();
         numLines = counter;
    closeFile(fileName_in);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error reading File",
                   "Error 5: ",JOptionPane.ERROR_MESSAGE);
         closeFile(fileName_in);
         System.exit(1);
    /* READ FILE */
    private void readTheFile(File fileName_in)
    // Open the file
    //int row=0;
    int col=0;
    openFile(fileName_in);
    System.out.println("Read the file");
    // Loop through file incrementing counter
    try
    String line = fileInput.readLine();
    while (line != null)
    boolean containsDoubles = false;
    double temp;
    String[] lineParts = line.split("\t");
    try
    for (col=0;col<lineParts.length;col++)
    temp=Double.parseDouble(lineParts[col]);
    data[row][col] = lineParts[col];
    containsDoubles = true;
    System.out.print("data["+row+"]["+col+"]="+lineParts[col]+" ");
    } catch (Exception e) {row=0; col=0; temp=0.0;}
    if (containsDoubles){ row++;}
    System.out.println();
    line = fileInput.readLine();
    catch(IOException ioException)
    JOptionPane.showMessageDialog(this,"Error reading File", "Error 5: ",JOptionPane.ERROR_MESSAGE);
    closeFile(fileName_in);
    System.exit(1);
    //System.out.println("length"+data.length);
    closeFile(fileName_in);
    process(fileName_in);
    /* CHECK FILE NAME */
    /* Return flase if selected file is a directory, access is denied or is
    not a file name. */
    private boolean checkFileName(File fileName_in) {
         if (fileName_in.exists()) {
         if (fileName_in.canRead()) {
              if (fileName_in.isFile()) return(true);
              else JOptionPane.showMessageDialog(null,
                        "ERROR 3: File is a directory");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 2: Access denied");
         else JOptionPane.showMessageDialog(null,
                        "ERROR 1: No such file!");
         // Return
         return(false);
    /* OPEN FILE */
    private void openFile(File fileName_in) {
         try {
         // Open file
         FileReader file = new FileReader(fileName_in);
         fileInput = new BufferedReader(file);
         catch(IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
         textArea.append("OPEN FILE\n---------\n");
         textArea.append(fileName_in.getPath());
         textArea.append("\n");
         //System.out.println("File opened successfully");
    /* CLOSE FILE */
    private void closeFile(File fileName_in) {
    if (fileInput != null) {
         try {
              fileInput.close();
         catch (IOException ioException) {
         JOptionPane.showMessageDialog(this,"Error Opening File",
                   "Error 4: ",JOptionPane.ERROR_MESSAGE);
    System.out.println("File closed");
    private void process(File fileName_in) {
    //getNumberOfLines();
         //data = new String[numLines][3];
         // Read file
    double temp,temp1;
         //readTheFile();
    //System.out.println("row:"+row);
    //int number=data.length;
    //System.out.println(number);
    for (int i=0; i<row; i++)
    temp=Double.parseDouble(data[i][1]);
    sumx+=temp;
    temp1=Double.parseDouble(data[i][3]);
    sumy+=temp1;
    multixy+=(temp*temp1);
    square_x_sum+=(temp*temp);
    square_y_sum+=(temp1*temp1);
    //System.out.println("Sum(x)="+sumx);
    double tempup=(row*multixy)-(sumx*sumy);
    double tempdown=(row*square_x_sum)-(sumx*sumx);
    slope=tempup/tempdown;
    double tempbup=sumy-(slope*sumx);
    intb=tempbup/row;
    double tempside=(row*square_y_sum)-(sumy*sumy);
    double cordown=Math.sqrt(tempdown*tempside);
    corr=tempup/cordown;
    r_sqrt=corr*corr;
         textArea.append("Data for file"+ fileName_in.getName()+" have been processed successfully.");
         textArea.append("\n");
         textArea.append("Please enter output file name including extension.");
    System.out.println("number"+row);
    System.out.println("slope(m)="+slope);
    System.out.println("intecept b="+intb);
    System.out.println("correlation="+corr);
    System.out.println("correlation="+r_sqrt);
    saveFile();
    private void saveFile()
    textArea.append("SAVE FILE\n---------\n");
    if (openFile1())
         try {
              outputToFile();
    catch (IOException ioException) {
              JOptionPane.showMessageDialog(this,"Error Writing to File",
                   "Error",JOptionPane.ERROR_MESSAGE);
    private boolean openFile1 ()
         // search for the file path
    StringBuffer stringpath;
    title=textfield1.getText().trim();
    int temp=fileName_in.getName().length();
    int temp_path=fileName_in.getPath().length();
    int startd=(temp_path-temp);
    stringpath=new StringBuffer(fileName_in.getPath());
    stringpath.delete(startd, temp_path+1);
    //System.out.println("file-path="+temp_path);
    //System.out.println("length-file="+temp);
    path=stringpath.toString();
    fileName_out = new File(path, title);
    //System.out.println(file_out.getName());
    if (fileName_out==null || fileName_out.getName().equals(""))
         JOptionPane.showMessageDialog(this,"Invalid File name",
                   "Invalid File name",JOptionPane.ERROR_MESSAGE);
         return(false);
         else
    try
    boolean created = fileName_out.createNewFile();
    if(created)
    fileOutput = new PrintWriter(new FileWriter(fileName_out));
    fileOutput.println("File Name"+"\t"+"Slope(m)"+"\t"+"y-intercept(b)"+"\t"+"Coefficient(r)"+"\t"+"Correlation(R-Squared)");
    return(true);
    else
    fileOutput = new PrintWriter(new FileWriter(fileName_out,true));
    return(true);
    catch (IOException exc)
    JOptionPane.showMessageDialog(this,"Please enter the file name","Error",JOptionPane.ERROR_MESSAGE);
    return(false);
    private void outputToFile() throws IOException
    // Initial output
         textArea.append("File name = " + fileName_out + "\n");
         // Test if data exists
         if (data != null)
         fileOutput.println(fileName_in.getName() +"\t"+ slope+"\t"+intb+"\t"+corr+"\t"+r_sqrt);
    textArea.append("File output complete\n\n");
         else
    textArea.append("No data\n\n");
         // End by closing file
    initialcomp();
         fileOutput.close();
    private void initialcomp()
    slope=0.0;
    intb=0.0;
    corr=0.0;
    r_sqrt=0.0;
    sumx=0.0; sumy=0.0; multixy=0.0; square_x_sum=0.0; square_y_sum=0.0;
    for(int i=0;i<data.length;i++)
    for(int j=0;j<data[i].length;j++)
    data[i][j]=null;
    /* MAIN METHOD */
    public static void main(String[] args) throws IOException
         // Create instance of class FileChooser
         FileReduction1 newFile = new FileReduction1("File Reduction Program");
         // Make window vissible
         newFile.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);
         newFile.setSize(500,400);
    newFile.setVisible(true);
    Sorry about the long lines.
    As you can see, all input files saved in array called files, however when OpenFile1() function is called, it take input (fileName_in) as a single file not an array. I'm assuming this causes the exception.
    When there's muptiple inputs, program should take each file from getFileName() to outputToFile() sequentially.
    Does anybody have an idea to solve this?
    Thanks a lot!!

    you naming convention is confussing. you should follows Java naming convention..you have a getXXX but decalred the return type as "void"...get usully means to return something...
    your code is doing too much..and hard to follows..
    1. get the selected files
    for each selected file
    process the file and return the result
    write out the result.
    /** close the precious resource */
    public void closeResource(Reader in){
        if (in != null){
            try{ in.close(); }
            catch (Exception e){}
    /** get the total number of line in a file */
    public int getLineCount(File file) throws IOException{
        BufferedReader in = null;
        int lineCount = 0;
        try{
            in = new BufferedReader(new FileReader(file));
            while ((in.readLine() != null)
                lineCount++;
            return lineCount;
        finally{ closeResource (in);  }
    /** read the file */
    public void processFile(File inFile, File outFile) throws IOException{
        BufferedReader in = null;
        StringBuffer result = new StringBuffer();
        try{
            in = new BufferedReader(new FileReader(inFile));
            String line = null;
            while ((in.readLine() != null){
                .. do something with the line
                result.append(....);
            writeToFile(outFile, result.toString());
        finally{ closeResource (in);  }
    public void writeToFile(File outFile, String result) throws IOException{
        PrintWriter out = null;
        try{
            out = new PrintWriter(new FileWriter(outFile, true));  // true for appending to the end of the file
            out.println(result);
        finally{  if (out != null){ try{ out.close(); } catch (Exception e){} }  }
    }

  • Can I mix docs from document feeder and scanner glass into one PDF?

    When working with the HP Scanner software, prior to Windows 8, I was able to MIX the source of my documents, meaning I could put all the standard size docs on the document feeder, scan them, and then ADD non-standard sized documents, one at a time, to the same PDF from the scanner glass.  The Windows 8 Scan and Capture software seems to make me pick one or the other.  It was SO convenient, when doing my expense reports, to be able to scan 15 pages or so using the ADF, then use the glass for all of my receipts that were small or damaged.  Am I missing something, or is the Win8 software more limited?  Thanks for any help you might provide!!

    Hi ysroq,
    Welcome to the HP forums! I see that you are wondering if you can mix docs from document feeder and scanner glass into one PDF. I am happy to help, I have a couple questions for you: 
    What type of printer do you have? To find your printer's Product/Model Number follow instructions in this link. Finding Your HP Product Model Number.
    How is the printer connected? Wireless or USB?
    Hope to hear back from you, and have a good day!
    RnRMusicMan
    I work on behalf of HP
    Please click “Accept as Solution ” if you feel my post solved your issue, it will help others find the solution.
    Click the “Kudos Thumbs Up" to say “Thanks” for helping!

  • Multiple BI Query Results into one Table

    Hi All
    Can I embed Multiple queries into one table using VC?
    I have data in different BI sources(Info Areas) like sales and distribution,Shipments etc. Can I write any universal query to retrive data from multiple sources?(If any???)

    Hi Jan Pasha,
    My model contains two BW queries which uses UNION and sent result to one table.
    I tried using UNION also but when I use it I am able to see no records to select in result table.
    I donot have any coloums in common. Is it pre-requisite for using UNION?

  • Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it?

    Trying to drag pdf files i have and combine them into one pdf file in the account i just purchased with Adobe. when i drag a pdf file over Adobe doesn't accept it. says it can not convert this type of file. but it is an Adobe file. Do I need to change it in some other form befor dragging it?

    Hello djensen1x,
    Could you please let me know what version of Acrobat are you using.
    Also, tell me your workflow of combining those PDF files?
    Please share the screenshot of the error message that you get.
    Hope to get your response.
    Regards,
    Anubha

  • Convert different types of files and merged them into one pdf

    Hi, everyone. I'm girl from China.
    There is folder containing severl files of different types, like doc, msg, jpeg etc.   And I want to convert and merge them into one pdf following a certain order. I know that PDFmaker can do that nicely, but the problem is that I have like 3000+ fodlders that requires the same work.
    I want to do it with VBA and Acrobat. I have a Acrobat XI Standard Version and a perfect license, by the way
    And I have got the code(Thanks, Karl Heinz Kremer) of merging two pdfs into one, but how can I convert them into pdf first?
    Thank you very much.
    If I can finish this, I would like to publish my code on this forum.

    Wow, that's great news. But how should I add the Action?
    1. There is no action named "Covert files into Pdf" in the tools panel....
    And if I write Javascript code to do this action. How should I write it?
    app.openDoc({
    cPath: "/c/temp/myPic.jpg",
    bUseConv: true
    These code only works when I specify the path of the file.
    If you know how, pls tell me..........

  • How can I open all my itunes libraries and merge them into one?

    Some of my music can't be opened by itunes because it says it is in another library.  As there are several of these and they won't open,I can't see where the songs I want are.  Therefore I would like to open ALL the libraries and merge them into one.  Thanks for any help.

    Hmm, read that post of Dave Sawyer's and thought well, that's Ok I have it on my iPod, but no, it's not there either.  Then resorted to Time Machine (not used for a few months (took it away with us when we evacuated to avoid Cyclone Yasi) only to find that is playing up also, and it doesn't appear to be anywhere there either!
    One thing leads on to another - Time Machine has only backed up to 3 months back; then there is nothing beyond!  yet there is tons of stuff on it.  Maybe it backs up the whole system each time, and not just the changes made inbetween times.   The prefs. won't appear and so I can't change the setup.
    All this just because of one sone!

  • Select records from one database and insert it into another database

    Hi
    I need to write a statement to select records from one database which is on machine 1 and insert these records on a table in another database which is on machine 2. Following is what I did:
    1. I created the following script on machine 2
    sqlplus remedy_intf/test@sptd @load_hrdata.sql
    2. I created the following sql statements in file called load_hrdata.sql:
    rem This script will perform the following steps
    rem 1. Delete previous HR data/table to start w/ clean import tables
    rem 2. Create database link to HR database, and
    rem 3. Create User Data import table taking info from HR
    rem 4. Drop HRP link before exiting
    SET COPYCOMMIT 100
    delete from remedy.remedy_feed;
    commit;
    COPY FROM nav/donnelley@hrp -
    INSERT INTO remedy.remedy_feed -
    (EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR) -
    USING SELECT EMPLID, FIRST_NAME, MI, LAST_NAME, BUSINESS_TITLE, WORK_PHONE, -
    RRD_INTRNT_EMAIL, LOCATION, RRD_OFFICE_MAIL, RRD_BUS_UNIT_DESCR -
    FROM ps_rrd_intf_medium -
    where empl_status IN ('A', 'L', 'P', 'S', 'X')
    COMMIT;
    EXIT;
    However, whenever I run the statement I keep getting the following error:
    SP2-0498: missing parenthetical column list or USING keyword
    Do you have any suggestions on how I can fix this or what am I doing wrong?
    Thanks
    Ali

    This doesn't seem to relate to Adobe Reader. Please let us know the product you are using so we may redirect you or refer to the list of forums at http://forums.adobe.com/

  • Trouble with Databases and putting data into them

    I have been working on this application for about three days and choose the tool because I thought database connectivity was super simple. Provided I didn't need to anything but get data or add data I could use the WYSIWG editor to drag and drop items to make the connections. Every single sample, book, tutorial or helpful guide I have found on the internet does the same thing.
    I can always get data from the database but when I press the submit button using their examples they all fail. Plus, most of these from the beta 2 and I have not found anything useful for FB4 (Release), PHP and MySQL.
    I can provide whatever information is need to help me understand I am hoping for answer, link to current tutorial or article full explaining how it works using the automated system or confirmation it does work use this other technology that works better.
    Anything you might have would be super thanks!
    Frank

    I have some more information that I think might be helpful. I am following the samples on lynda.com for their Flex 4 and Flash Builder 4 Essential training. Attached is the code that I created as part of the example. When I press the submit button it says in the status bar transferring data to localhost like it is stuck. When I trace createCategoryResult.token.result it shows null in the console. Then I thought why not debug. I put my breakpoint on the line that calls the createCategory method. When I viewed the variables I was able to see the form picked my up items then dropped them into the object. Further, when I debugged createCategoryResult.token = categoryService.createCategory(item); line I found that it was giving me back a lot of undefined. I am not sure where I am going wrong. Can anyone confirm if the Flex and Action Script is correct or point me where to debug and what to look for. I really appreciate any assistance available.
    <s:Application xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx"
      skinClass="skins.HPAppSkin"
      xmlns:views="views.*"
      xmlns:categoryservice="services.categoryservice.*"
      xmlns:forms="forms.*">
      <fx:Script>
        <![CDATA[
          import events.CategoryEvent;
          import mx.controls.Alert;
          import mx.events.FlexEvent;
          import mx.rpc.events.ResultEvent;
          import valueObjects.Category;
          protected function categoryGrid_creationCompleteHandler(event:FlexEvent):void
            getAllCategoryResult.token = categoryService.getAllCategory();
          protected function createCategory(item:Category):void
            createCategoryResult.token = categoryService.createCategory(item);
            trace(createCategoryResult.token.result);
          protected function myForm_insertHandler(event:CategoryEvent):void
            createCategory(event.category);
            trace(event.category.category);
          protected function createCategoryResult_resultHandler(event:ResultEvent):void
            myForm.category = new Category();
            currentState = "default";
            Alert.show("Your data was inserted", "Success");
        ]]>
      </fx:Script>
      <s:states>
        <s:State name="default"/>
        <s:State name="insert"/>
      </s:states>
      <fx:Declarations>
        <s:CallResponder id="getAllCategoryResult"/>
        <categoryservice:CategoryService id="categoryService"
          fault="Alert.show(event.fault.faultString + '\n' + event.fault.faultDetail)"
          showBusyCursor="true"/>
        <s:CallResponder id="createCategoryResult" result="createCategoryResult_resultHandler(event)"/>
      </fx:Declarations>
      <s:Panel title="Categories" title.insert="Insert New Category">
        <views:CategoryGrid
          width="700" height="250"
          includeIn="default" id="categoryGrid" creationComplete="categoryGrid_creationCompleteHandler(event)" dataProvider="{getAllCategoryResult.lastResult}"/>
        <forms:CategoryForm2 id="myForm" includeIn="insert"
          cancel="currentState='default'" insert="myForm_insertHandler(event)"/>
        <s:controlBarContent>
          <s:Button
            label="Insert Category" click="currentState='insert'"
            includeIn="default"/>   
        </s:controlBarContent>
      </s:Panel>
    </s:Application>
    ______Form_______
    <?xml version="1.0" encoding="utf-8"?>
    <s:Group xmlns:fx="http://ns.adobe.com/mxml/2009"
      xmlns:s="library://ns.adobe.com/flex/spark"
      xmlns:mx="library://ns.adobe.com/flex/mx" xmlns:valueObjects="valueObjects.*">
      <fx:Metadata>
        [Event(name="insert", type="events.CategoryEvent")]
        [Event(name="cancel", type="flash.events.Event")]
      </fx:Metadata>
      <fx:Script>
        <![CDATA[
          import events.CategoryEvent;
          protected function submitBtn_clickHandler(event:MouseEvent):void
            category.category = categoryTextInput.text;
            category.description = descriptionTextInput.text;
            var ev:CategoryEvent = new CategoryEvent("insert");
            ev.category = this.category;
            dispatchEvent(ev);
          protected function cancelBtn_clickHandler(event:MouseEvent):void
            dispatchEvent(new Event("cancel"));
        ]]>
      </fx:Script>
      <fx:Declarations>
        <valueObjects:Category id="category"/>
        <!-- Place non-visual elements (e.g., services, value objects) here -->
      </fx:Declarations>
      <mx:Form defaultButton="{submitBtn}">
        <mx:FormItem label="Category">
          <s:TextInput id="categoryTextInput" text="{category.category}"/>
        </mx:FormItem>
        <mx:FormItem label="Description">
          <s:TextInput id="descriptionTextInput" text="{category.description}"/>
        </mx:FormItem>
        <mx:FormItem direction="horizontal">
        <s:Button id="submitBtn" label="Submit" click="submitBtn_clickHandler(event)"/>
         <s:Button id="cancelBtn" label="Cancel" click="cancelBtn_clickHandler(event)"/>     
        </mx:FormItem>
      </mx:Form>
    </s:Group>

  • IO - Read two image files and put them into one file

    Hi,
    i have 3 files in all. The two image files and one text file. I need to place the image in the first image file, followed by text in the text file and then the image in the second image file, into one file.
    Can anyone tell me how do i go about doing this ?
    i tried using fileinputstream and fileoutputstream, which works fine if all the 3 files have text but when the first and the third file have image, the code doesn't give any error but the result file displays only the image from the first file and nothing else.
    i am running short of time and need to do this really soon.
    if anyone has done anything like this. please let me know,
    thanx,
    poonam

    One approach would be to programmatcally create a single zip/jar file from the three input files. You can use the java.util.zip and java.util.jar packages for this purpose.
    The other apprach would be to create a single image by drawing images and text strings on a BufferedImage object.
    I think the first approach is preferable because you can easily extract the individual files from the zip/jar file

  • Assembling still photos and video clips into one video presentation.

    This is partly a Photoshop Elements and Premiere Elements (both version 7) question, so hopefully not posting to the wrong group (there doesn't seem to be a Premiere Elements forum anyway)!
    I am currently putting together a video/slideshow presentation, initially for display directly from a computer (to data projector) and then ultimately to end up on a DVD.  The presentation  consists of digital and scanned photographs (prints and transparencies) and video clips.  I successfully put together a slideshow of all the stills with Photoshop Elements, inlcuding music etc.  I then output the slideshow to Premiere Elements, so that I could merge it with my already edited video clips.
    The output process works smoothly enough, but as soon as I run the completed presentation, the quality of the imported slideshow is nothing short of woeful!  Each image is badly pixellated and all the transition effects are mangled - in short, it is unwatchable.  As it turns out, simply adding a single, still image to Premiere Elements results in a very poor final image.  Drop the exact same video clips and still images into Windows Movie Maker and the quality is spot on (as is playing the slideshow after outputting it as a WMV file and playing via any player capable of playing WMVs).
    Trying to go the other way, ie importing video clips into Photoshop Elements, pretty much always results in it crashing!
    The two products are marketed to "work together", but they are an abject failure in this regard!
    OS is 64 bit Vista Ultimate.
    I've tried searching the manuals and online help, but could find nothing of any help.  I've sent an e-mail to Adobe support, but have received no response from them (after three weeks).
    I'm hoping that someone may be able to point out something that I may have missed, or offer some tips and tricks.
    Thanks.

    There is a separate forum for Premiere Elements at
    http://forums.adobe.com/community/premiere/premiere_elements
    Also, my favorite place for Premiere Elements questions (including slideshows) is a site started by some Adobe Premiere Elements forum regulars at http://muvipix.com/phpBB3/index.php   Forum signup is free. There are multiple subforums at that site and because most of your questions are Premiere elements, I suggest that you post under the "PE version 7" subforum.
    Wherever you decide to post, I suggest that you include in your post my comments and the answers to the questions that I asked here.
    1 -- It has FAQs over to the right of the thread listing on the Adobe Premiere Elements forum. One of those FAQs that is relevant to your current workflow is
    What resolution should my photos be in Premiere Elements?
    http://forums.adobe.com/thread/431851?tstart=0
    2 -- Also, I suspect that you used Pan and/or Zoom on some of your photos when creating the Slide Show withinn Photoshop Elements.
    For those photos, you want the Premiere Elements setting of Scale to Framesize set OFF.
    3- There are also other considerations such as
    -- which Project Setting you are using in Premiere Elements?
    -- what dimensions are you using when you export from Premiere Elements to the WMV file?
    -- what is the resolution for the projector on which this video will initially be displayed?
    4 -- I do agree with your approach of adding the video in Premiere Elements.
    5 -- The mangled transitions needs more detailed info in order to discuss.
    Tthe timing of transitions is definitely different between the Photoshop Elements slideshow editor playback and the Premiere Elements output: this gives some people serious problems and for others it is not significant.  I don't know yet if that is your problem.

  • I am using the database connectivity toolkit to retrieve data using a SQL query. The database has 1 million records, I am retrieving 4000 records from the database and the results are taking too long to get, is there any way of speeding it up?

    I am using the "fetch all" vi to do this, but it is retrieving one record at a time, (if you examine the block diagram) How can i retrieve all records in a faster more efficient manner?

    If this isn't faster than your previous method, then I think you found the wrong example. If you have the Database Connectivity Toolkit installed, then go to the LabVIEW Help menu and select "Find Examples". It defaults to searching for tasks, so open the "Communicating with External Applications" and "Databases" and open the Read All Data. The List Column names just gives the correct header to the resulting table and is a fast operation. That's not what you are supposed to be looking at ... it's the DBTools Select All Data subVI that is the important one. If you open it and look at its diagram, you'll see that it uses a completely different set of ADO methods and properties to retrieve all the data.

  • How to call a SP with dynamic columns and output results into a .csv file via SSIS

    hi Folks, I have a challenging question here. I've created a SP called dbo.ResultsWithDynamicColumns and take one parameter of CONVERT(DATE,GETDATE()), the uniqueness of this SP is that the result does not have fixed columns as it's based on sales from previous
    days. For example, Previous day, customers have purchased 20 products but today , 30 products have been purchased.
    Right now, on SSMS, I am able to execute this SP when supplying  a parameter.  What I want to achieve here is to automate this process and send the result as a .csv file and SFTP to a server. 
    SFTP part is kinda easy as I can call WinSCP with proper script to handle it.  How to export the result of a dynamic SP to a .CSV file? 
    I've tried
    EXEC xp_cmdshell ' BCP " EXEC xxxx.[dbo].[ResultsWithDynamicColumns ]  @dateFrom = ''2014-01-21''"   queryout  "c:\path\xxxx.dat" -T -c'
    SSMS gives the following error as Error = [Microsoft][SQL Server Native Client 10.0]BCP host-files must contain at least one column
    any ideas?
    thanks
    Hui
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

    Hey Jakub, thanks and I did see the #temp table issue in our 2008R2.  I finally figured it out in a different way... I manage to modify this dynamic SP to output results into
    a physical table. This table will be dropped and recreated everytime when SP gets executed... After that, I used a SSIS pkg to output this table
    to a file destination which is .csv.  
     The downside is that if this table structure ever gets changed, this SSIS pkg will fail or not fully reflecting the whole table. However, this won't happen often
    and I can live with that at this moment. 
    Thanks
    --Currently using Reporting Service 2000; Visual Studio .NET 2003; Visual Source Safe SSIS 2008 SSAS 2008, SVN --

  • Using DATA_CELL and multiple queries into one table

    Hi WAD experts,
    I have been trying to work out how to combine multiple hidden query result sets in their own tables in the template, into one table displayed as if the data originated from one query.
    I have been looking at using the DATA_CELL method of "modify table" class.
    Has anyone had to do this before - and if so do you have any clues as to how best to do this ?
    Thanks
    Chris

    Here is what I want:
    Say I have a query that tells me about how many items were sold at a hardware store for each week. Then the output would look something like this:
    Week,Item,Num_Sold
    13,Hammer,15
    13,Nail,594
    13,Screw,398
    14,Hammer,16
    14,Nail,382
    14,Screw,331
    But I want my output to look like this:
    <space>,13,14 <-- these would be the week numbers
    Hammer,15,16
    Nail,594,382
    Screw,398,331
    I asked this same question in a SQL-only forum and one person responded that they did not know how to do that. But I figure that this is done often enough that there must be some Open Source program that can transform the output data into a table. As you can see, it's not a pure transform. It's more like I take one column, make that the x-axis, another column, make that the y-axis, and "plot" the data based on the two columns. It's kinda like taking 1D data and making it 2D. There's no existing open source program which does this? I figure that I could just give the program my SQL queries, specify some rule such as "Make the first column of the resultset the row, make the second column the column and create a table with the 3rd row, using the first two rows to map the 3rd row into the table". Note that I think this only works with 3 columns.
    Anyway, if there is no simple program that already does this, I can make a program to do what I just described. I just asked the question here because I figure that there are a lot of people knowledgeable about SQL and Java on this forum and that someone would know of a tool which already does what I want if one exists.

Maybe you are looking for

  • New ipod touch cant read wifi

    Just got a new iPod touch for my daughter. Have connected to Wifi as I do via my iPhone but it is unable to read the Wifi connection even though the Wifi symbol is shown. My Iphone seems to have a problem too however other devices in the house can co

  • FF 3.6 no longer works with ebay,vodafone etc when is new release likely?

    No longer works with these and other sites . Would like to know when new version will be released, will have to use IE until then..

  • Can't Configure iPod Photo

    I have an iPod Photo 60gb. I've installed the software it came with, hard reset the iPod, installed the updater, restarted my PC a million times, but still the iPod will not configure. The dialog box comes up asking me if I want to configure the iPod

  • 1TB HDD in Macbook Pro

    If any of you guys want to get a 1TB in your Macbook Pro, i can confirm that this HDD fits in well and works pretty fast. http://www.westerndigital.com/en/products/products.asp?driveid=685 It is advanced format, and seems to work fine with OS X and d

  • Problems opening .ics files in Apple Calendar

    When I open an event invitation  that arrives as a .ics file, Apple Calendar opens but on the wrong day, at the wrong time, and with the wrong information. Is there anyway of fixing this? Im running OS 10.8.5 on a MacBook Air. Many thanks JohnC