Trying to retrieve mixed data across different rows depending on row type

I have a requirement to extract data from a table which happens to have different row types (header, row1, row2) in it. I thought the best way to explain what I want is to demonstrate by example!
CREATE TABLE IFSAPP.KM_MSG_TEST (MESSAGE_ID NUMBER NOT NULL,
    MESSAGE_LINE NUMBER NOT NULL, NAME VARCHAR2(255 byte) NOT
    NULL, ERROR_MESSAGE VARCHAR2(255 byte), C00 VARCHAR2(2000
    byte), C01 VARCHAR2(2000 byte), C02 VARCHAR2(2000 byte),
    C03 VARCHAR2(2000 byte), C04 VARCHAR2(2000 byte), C05
    VARCHAR2(2000 byte), C06 VARCHAR2(2000 byte),
    N00 NUMBER, N01 NUMBER,
    D00 DATE)
    TABLESPACE IFSAPP_DATA_LARGE;
insert into ifsapp.km_msg_test values('1353078','1','HEADER','','INTRST','OKM','','380','3','30025308','9',0,0,'');
insert into ifsapp.km_msg_test values('1353078','2','ROW1','','7034724','','','1057627','43','001','331276180003',5,0,'');
insert into ifsapp.km_msg_test values('1353078','3','ROW2','','3','0','','','C62','DE','',0,5,'');
insert into ifsapp.km_msg_test values('1353078','4','ROW1','','7034724','','','1058169','26','002','331346110004',6,0,'');
insert into ifsapp.km_msg_test values('1353078','5','ROW2','','3','0','','','C62','DE','',0,6,'');
insert into ifsapp.km_msg_test values('1353078','6','ROW1','','7016169','','','1059062','14','003','331483070005',1,0,'');
insert into ifsapp.km_msg_test values('1353078','7','ROW2','','3','0','','','C62','JP','',0,1,'');
insert into ifsapp.km_msg_test values('1353078','8','ROW1','','7034724','','','1059062','41','004','331483205000',11,0,'');
insert into ifsapp.km_msg_test values('1353078','9','ROW2','','3','0','','','C62','DE','',0,11,'');
insert into ifsapp.km_msg_test values('1353078','10','ROW1','','7057032','','','1059062','43','005','331483215001',2,0,'');
insert into ifsapp.km_msg_test values('1353078','11','ROW2','','3','0','','','C62','DE','',0,2,'');
insert into ifsapp.km_msg_test values('1353078','12','ROW1','','7000235','','','1059732','1','006','331566005002',14,0,'');
insert into ifsapp.km_msg_test values('1353078','13','ROW2','','3','0','','','C62','JP','',0,14,'');
insert into ifsapp.km_msg_test values('1353078','14','ROW1','','7014091','','','1059732','10','007','331566050010',2,0,'');
insert into ifsapp.km_msg_test values('1353078','15','ROW2','','3','0','','','C62','DE','',0,2,'');
commit;
select * from ifsapp.km_msg_test;
Message_Id Message_Line Name    Error_Message C00     C01 C02 C03     C04 C05      C06            N00 N01 D00
1353078    1            HEADER                INTRST  OKM     380     3   30025308 9              0   0
1353078    2            ROW1                  7034724         1057627 43  001      331276180003   5   0
1353078    3            ROW2                  3       0               C62 DE                      0   5
1353078    4            ROW1                  7034724         1058169 26  002      331346110004   6   0
1353078    5            ROW2                  3       0               C62 DE                      0   6
1353078    6            ROW1                  7016169         1059062 14  003      331483070005   1   0
1353078    7            ROW2                  3       0               C62 JP                      0   1
1353078    8            ROW1                  7034724         1059062 41  004      331483205000   11  0
1353078    9            ROW2                  3       0               C62 DE                      0   11
1353078    10           ROW1                  7057032         1059062 43  005      331483215001   2   0
1353078    11           ROW2                  3       0               C62 DE                      0   2
1353078    12           ROW1                  7000235         1059732 1   006      331566005002   14  0
1353078    13           ROW2                  3       0               C62 JP                      0   14
1353078    14           ROW1                  7014091         1059732 10  007      331566050010   2   0
1353078    15           ROW2                  3       0               C62 DE                      0   2C03 holds a reference number for ROW1s. I want to return the following:
Master_Ref  Ref_Num  Line_No  Seq_No  Part_No   Qty
30025308    1059062  14       003     7016169   1
30025308    1059062  41       004     7034724   11
30025308    1059062  43       005     7057032   2when I select on Ref_Num being 1059062
Master_Ref=C05 from HEADER
Ref_Num=C03 from ROW1
Line_No=C04 from ROW1
Seq_No=C05 from ROW1
Part_No=Name from ROW1
Qty=N00 from ROW1

Hi,
SQL> column Master_Ref FORMAT A9
SQL> column Ref_Num FORMAT A9
SQL> column Line_No FORMAT A3
SQL> column Seq_No FORMAT A3
SQL> column Part_No FORMAT A9
SQL>
SQL> select
  2    Header.C05 as Master_Ref,
  3    Row1.C03 as Ref_Num,
  4    Row1.C04 as Line_No,
  5    Row1.C05 as Seq_No,
  6    Row1.C00 as Part_No,
  7    Row1.N00 as Qty
  8  from km_msg_test Row1, km_msg_test Header
  9  where Row1.name = 'ROW1'
10    and Header.name = 'HEADER'
11    and Row1.message_id = Header.message_id
12    and row1.C03 = '1059062'
13  ;
MASTER_RE REF_NUM   LIN SEQ PART_NO          QTY
30025308  1059062   14  003 7016169            1
30025308  1059062   41  004 7034724           11
30025308  1059062   43  005 7057032            2Regards,
Dima

Similar Messages

  • An error was encountered trying to retrieve configuration data.

    Hi All,
    I need help on this please,
    I am getting below error when I am trying to create DAD.
    An error was encountered trying to retrieve configuration data.
    Failed to initialize configuration parameter ApacheMainServer.. Entity not found. Resolution: Entity not found Base Exception: oracle.ias.sysmgmt.repository.plugin.advanced.apache.parser.ParserException Error scanning D:\OraHome_1\Apache\Apache\conf\httpd.conf. Start quote at line 346 column 12 does not have ending quote. Error scanning D:\OraHome_1\Apache\Apache\conf\httpd.conf. Start quote at line 346 column 12 does not have ending quote
    Can anyone please help me how to avoid this?
    Thanks,
    Swathi.

    Please paste the DAD entry here for review and the file name and version of your AS.
    regards

  • SQL Server Import Export Wizard fails while trying to retrieve the data from FastObjects Database

    When trying to import data from FastObjects database to SQL Server 2008 R2 using import/ export wizard we get the following error message :
    "Column information for the source and the destination data could not be retrieved, or the data types of source columns were not mapped correctly to those available on the destination provider."
    Clicked on View button, the source data is retrieved correctly.
    Clicked on Edit Mapping button, the Import Export Wizard failed with the below error message:
    ===================================
    Column information for the source and destination data could not be retrieved.
    "Test" -> [dbo].[Test]:
    - Cannot find column -1.
    (SQL Server Import and Export Wizard)
    ===================================
    Cannot find column -1. (System.Data) 
    at System.Data.DataColumnCollection.get_Item(Int32 index) at System.Data.DataRow.get_Item(Int32 columnIndex) at Microsoft.DataTransformationServices.Controls.ProviderInfos.MetadataLoader.LoadColumnsFromTable(IDbConnection myConnection, String[] strRestrictions)
    at Microsoft.SqlServer.Dts.DtsWizard.OLEDBHelpers.LoadColumnsFromTable(MetadataLoader metadataLoader, IDbConnection myConnection, String[] strRestrictions, DataSourceInfo dsi)at Microsoft.SqlServer.Dts.DtsWizard.TransformInfo.PopulateDbSourceColumnInfoFromDB(IDbConnection
    mySourceConnection) at Microsoft.SqlServer.Dts.DtsWizard.TransformInfo.PopulateDbSourceColumnInfo(IDbConnection mySourceConnection, ColumnInfoCollection& sourceColInfos)

    Hi Chennie,
    Thank you for the post.
    Does the issue persists after you use the "Write a query to specify the data to transfer" option instead of “Copy data from one or more tables or views” option? If so, the issue may occur due to incorrect data type matching between the FastObjects database
    data types and SSIS data types. In this condition, I don’t think it is necessary to upgrade the SQL Server version. Since you can open the Column Mappings dialog box, please try to modify the data type mapping manually.
    In addition, the issue seems to be the same as the issue described in the following blog:
    http://blogs.msdn.com/b/dataaccesstechnologies/archive/2010/09/09/sql-server-import-export-wizard-fails-while-trying-to-retrieve-the-data-from-pervasive-database.aspx 
    Regards,
    Mike Yin
    TechNet Community Support

  • Hide disclose icon form ADF tree row depending on row data

    Hello,
    I've got an ADF tree based on recursive View Object. So basically we don't know how many tree levels are there, but depending on a row data we know that the row is a leaf and there will be no children rows.
    But the disclose icon is there event though we definitely know it is currently useless.
    So is there any way to hide the disclose icon from ADF tree(treetable) row depending on row data?
    Thanks.
    ADF 11R2

    Great, it works.
    The only thing is suggested style just makes the icon invisible, but it is still there and can be clicked.
    I applied .hideDiscloseIcon af|treeTable::collapsed-icon-style
    display: none;
    }and there is no disclose button at all.

  • Aperture performs adjustments in a different order depending on file type

    Aperture performs Adjustments in a different order depending on file type.
    Here's an example:
    Starting with two copies of an image, one in RAW format (Canon CRW from a D60), the other in TIFF (opened the .crw file in Preview and exported an 8bit tiff file).
    {The test image is a photo of my copy of Aperture on the floor of my studio (which, for reference, is a few points of Cyan off of a neutral grey).}
    The original Image.
    http://members.arstechnica.com/x/adrien/testRAW_originalImage.jpg
    Adjustments
    http://members.arstechnica.com/x/adrien/adjustments.jpg
    The RAW file adjusted
    http://members.arstechnica.com/x/adrien/testRAW_adjusted.jpg
    The TIFF files adjusted
    http://members.arstechnica.com/x/adrien/testTIFF_adjusted.jpg
    Import both of these files (testRAW.crw & testTIFF.tiff) into Aperture.
    Make adjustments to the RAW and TIFF images:
    - Exposure: Saturation -> 0 (lowest possible value).
    - White Balance: Temp -> 3500K (from 5000K).
    It doesn't matter what order you perform these operations in.
    The RAW file is now a neutral greyscale image. With the Saturation set to 0, the White Balance makes no major difference in the image, it stays grey.
    The TIFF file, however, is now a blue tinted greyscale image - much like a sepia-tone effect. Moving the White Balance slider changes the color of the image.
    It appears that Aperture is performing the Saturation and WB operations in a different order: for the RAW file it first performs the WB, then the saturation; while in the TIFF file it performs the saturation first, then the WB.
    The result is the same for a JPEG image.
    The RAW behavior is the 'expected' behavior in photography - White Balance should happen 'before' the Saturation setting.
    I've filed the bug with Apple (number 4394125 at bugreport.apple.com). hopefully they'll fix this.
    Cross posted from this discussion at the MacAch on ArsTechnica forums:
    http://episteme.arstechnica.com/groupee/forums/a/tpc/f/8300945231/m/893007866731 /r/832001796731#832001796731

    Well, there are different ways of achieving this.
    Solution 1:
    You can create a new output type which will be triggered and call a same driver program and the new smart form. I am sure you can customize as to what Purchasing document type will trigger which output type. Get in touch with someone in the function team to get this configured.
    Solution 2:
    No Customizing, let the configuration be the same, but in the driver program change the value of  "TNAPR-FONAM" immediately after the form entry_neu to the new form name based on the Purchasing document type.

  • Best practice to develop the news web part to retrieve news data across the farms

    Hi,
    We have developed the News Web part. The functionality  it pulls the news from other SharePoint Farms and display it in the site. Currently we are using secure store service to  to connect to different FARM to retrieve the news from that FARM.
    The issue with this approach is that every time user hits the page it  will always hit the Secure Store service.There are almost 80K users who will be using this web part. Moreover this web part connects to multiple sites for multiple news from different
    division.What should be the best practice to develop such kind of web part without consuming the server resources and keep hitting the server till we get the new news.News does not change very often.
    Regards
    Rajaniesh

    Hi,
    According to your description, my understanding is that you want to know which is the best way  to handle the large complication of SharePoint cross farm retrieving data.
    If you are developing the custom web part to retrieve data from other farm, I suggest you can firstly create a custom timer job to get data hourly in the backend and restore the data in a list. Then you can create a web part to link to the list to display
    the data.
    For cross farm accessing data, I suggest you can create a custom web service to achieve it.
    Also, you can use ajax to display the web part data asynchronously. It will improve the performance and reduce the server pressure.
    Here are some detailed articles for your reference:
    Create and Deploy Custom Timer Job Definition in SharePoint Programatically
    Creating a Custom ASP.NET Web Service
    Create asynchronous web parts for Sharepoint
    Thanks
    Best Regards
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jerry Guo
    TechNet Community Support

  • Persisting Data across different WebApps/Sessions

    Hello all,
    I am developing in an environment where multiple (web & enterprise) applications
    are developed and deployed separately to the same clustered WebLogic infrastructure.
    The applications are all owned by the same company, and usually co-exist quite
    happily. I have a request from the business, for a new application I am developing,
    to persist some user info for a logged in user on one application to another application,
    acessible to the user via a link on page. The user should be able to click on
    a link and access a different application but still have their data available
    on the new app, if logged in.
    As these applications are separate, afaik they cannot simply share session information
    together. I need some mechanism, whereby one application can access the information
    in the other application's session. Thus far I have considered these options:
    1) Writing a cookie containing the info, this could be retrieved from the other
    application, back from the client.
    2) Send user data through to the second application via a query string. At the
    moment this would be possible as a limited amount of information is required to
    be shared.
    3) Send unique field, such as userid, through to the second application, then
    use this field to retrieve user's details from database shared with first application.
    This seems OK in principle but my DBA's and security people may have other ideas.
    4) Serialise a user object which could be picked up again by the second application.
    As I don't know much about serialisation, where do objects get serialised to,
    presumably the server they are running on, is there a particular location, would
    there be security manager issues and would this be possible in a cluster?
    5) Is there another way for web applications to share information with each other?
    Thanks,
    James

    James,
    All of these approaches seem legitimate. It seems like if the data is small,
    the URL Query String approach would scale and perform well. However, the database
    userid approach would entail a performance hit just like when you use JDBC persistence
    for session information.
    Additional, stateful session beans store serialized information based upon the
    persistent-store-dir in the weblogic-ejb-jar.xml file
    See
    http://edocs.bea.com/wls/docs61/ejb/reference.html#1071686
    "James Lawless" <[email protected]> wrote:
    >
    Hello all,
    I am developing in an environment where multiple (web & enterprise) applications
    are developed and deployed separately to the same clustered WebLogic
    infrastructure.
    The applications are all owned by the same company, and usually co-exist
    quite
    happily. I have a request from the business, for a new application I
    am developing,
    to persist some user info for a logged in user on one application to
    another application,
    acessible to the user via a link on page. The user should be able to
    click on
    a link and access a different application but still have their data available
    on the new app, if logged in.
    As these applications are separate, afaik they cannot simply share session
    information
    together. I need some mechanism, whereby one application can access the
    information
    in the other application's session. Thus far I have considered these
    options:
    1) Writing a cookie containing the info, this could be retrieved from
    the other
    application, back from the client.
    2) Send user data through to the second application via a query string.
    At the
    moment this would be possible as a limited amount of information is required
    to
    be shared.
    3) Send unique field, such as userid, through to the second application,
    then
    use this field to retrieve user's details from database shared with first
    application.
    This seems OK in principle but my DBA's and security people may have
    other ideas.
    4) Serialise a user object which could be picked up again by the second
    application.
    As I don't know much about serialisation, where do objects get serialised
    to,
    presumably the server they are running on, is there a particular location,
    would
    there be security manager issues and would this be possible in a cluster?
    5) Is there another way for web applications to share information with
    each other?
    Thanks,
    James

  • Querying data across different cache-clusters

    Hi,
    Say there are multiple clusters each containing DIFFERENT sets of cached data. I would like to know if someone knows how an application from within one cluster can read/query the data from the DIFFERENT clusters "DIRECTLY". Would we need to code in Coherence extend protocol API (if there is one such) in this case ? Does anyone know or done this ?

    Hi,
    Yes you would need to use Extend to be able to see one cluster from another. It is pretty straight forward, you just configure the cache mappings in the same way you would for any remote caches.
    JK

  • Is it possible to link data across different/multiple PWA sites leveraging Master Project with the Subprojects feature?

    A couple different questions /similar scenarios
    1) Is it possible with Project Server 2010 to have several sites (http://server/pwa1 and
    http://server/pwa2 for example) communicate and build a Master Project at a third (or X) site (http://server/pwa3)
    2) Is it possible with Project Server 2010 to have several sites (http://server/pwa1 and
    http://server/pwa2 for example) communicate and build a Master Project at one of the original sites (http://server/pwa1 (for example))
    OR is there a better way to do this/more preferred way to do this. 
    We found this (http://social.technet.microsoft.com/Forums/projectserver/en-US/2379c3f2-6c80-46d7-8eac-3bc2ccb2d908/master-projectsubproject-with-sites-in-pwa-2010?forum=projectserver2010general)
    but its not what we're looking for
    3a) Issue/Example -
    We want to set up a site (http://server/pwa100) for just the president of the company - all the schedules of the subsites (/pwa99 + /pwa98) create a feed into an integrated master schedule/master project with subprojects(located
    in /pwa100). 
    3b-1) We also want to set up sub sites (http://server/pwa99 and
    http://server/pwa98) for each division VPs (and specific other people). These two sites would only allow specific user's project files to be viewed by each other...
    Can their project files have linkages between the two project sites (/pwa99 and /pwa98)? Meaning if user1 logs in to /pwa99 can he see a project file (given that they have permission) from /pwa98 in the same instance?
    3b-2) Can they see the project file in ProjPro and/or PWA ???
    3c) is it possible to have:
    + /pwa100 (pres)
    ++/pwa99 & /pwa98 (two vps)
    +++/pwa97 & /pwa96 & /pwa95 & /pwa-etc (minions)
    each rolling up to the next level (level 3 rolls up to level 2 which can roll up to level 1)

    kbwrecker,
    I agree with Dale. Having multiple sites will make this difficult to set up. 
    Not knowing how your Custom Groups/Categories have been set up, have you looked into using the "Project Permissions" feature to share projects. These permissions are 'additive' to the category permissions, so you could start out with people looking at the
    projects they are authorized to via categories, and then let them share/add people as needed basis. This will also satisfy the requirement of not-loading the projects with resources..
    And finally, the department and categories need not align, except that when projects from one dept are shared t another dept resource, the visibility of custom fieds will be affected.
    Hope I did not go off on a tangent there :)
    Prasanna Adavi,PMP,MCTS,MCITP,MCT TWitter: @prasannaadavi Blog: http://www.prasannaadavi.com
    Meant to get back to this earlier - your answer is close (because its what we currently do..sort-of)
    From my understanding of this issue the users are separated by department and can only see specific projects; however, when they try to share departments between users (so they can see their projects (dept a sees dept b projects)) this works - but there
    is a bigger issue/main issue.  
    main issue: when dept B adds a new project dept. A cannot see the new project in dept B.
    This can be eliviated by removing the user/s and re-adding them to the permission structure of the deptment but overall doing this several times based on user/s and projects being added it gets to be cumbersome and just plain annoying.
    Any help/additional thoughts would be great

  • Sharing data across different webapps using JSP/Servlet

    I have two different web applications running on same WebLogic server say webapp1 and webapp2. Webapp1 has servlet which redirects the user to JSP in webapp2. While redirecting I have to pass one string value to called JSP. I have achieved this by using QueryString as follows:
    response.sendRedirect(ConfigService.getProperty("com.twofactauth.caymanlogin.caymanurl", null)) + "?userName=" + strCaymanUserName);
    but this expoes the value in browser address bar but i don't want to expose the value passed. I am searching the way to pass the value internally without exposing.
    so please tell me other way in which i can pass the value to called JSP without usign QueryString.
    I am using WebLogic 8.1 for deployments. Both applications are deployed on same WebLogic instance.

    I have two different web applications running on same
    WebLogic server say webapp1 and webapp2. Webapp1 has
    servlet which redirects the user to JSP in webapp2.
    While redirecting I have to pass one string value to
    called JSP. I have achieved this by using QueryString
    as follows:
    response.sendRedirect(ConfigService.getProperty("com.t
    wofactauth.caymanlogin.caymanurl", null)) +
    "?userName=" + strCaymanUserName);
    but this expoes the value in browser address bar but
    i don't want to expose the value passed. I am
    searching the way to pass the value internally
    without exposing.
    so please tell me other way in which i can pass the
    value to called JSP without usign QueryString.
    I am using WebLogic 8.1 for deployments. Both
    applications are deployed on same WebLogic instance.I think a big part of the problem is that you want the functionality of a web app to be available to others, but you've locked it up behind a UI.
    I think this is one of the benefits of a service-oriented architecture. You start thinking about the system functionality apart from the UI. Your JSPs become just another client of the services you expose. Anyone can call those services, as long as they can see that service on their network.
    When I've done this I've started with a Spring service interface that is completely separate from the view layer. Once I have that, I can expose it to any other client either with web services (not preferred) or Spring HTTP remoting (preferred due to its simplicity).
    %

  • Reference table data across different tables

    Hi all,
    is really impossible to have some table call the content of a cell in another table with Pages 2.0.2?
    Thanks in advance,
    Filippo

    No one has found a way of doing it, and the question has appeared repeatedly in this forum, so yes, it is likely impossible.

  • Processing raw data in different ways depending on some condition

    Hi,
    I am receiving a raw data stream through a UDP port. The values contained in the raw data are all stored in 32 bits but are of different formats i.e I have 16 bit signed integer, 32 bit signed integer, 8 bit unsigned integer and 32 bit single precision floating point number. I have a spreadsheet which tells me the measured parameter, the data type and the address of the parameter within the stream (ie parameter 1 is address 1 and is the 1st 32 bits, parameter 2 is address 2 and is the following 32 bits, and so on...) I need to use the "data type" column from the spreadhseet as a condition to a case structure which will then display the 32 bits of data in the correct format. Ideally I want my output to be an array of numbers under each Parameter (or address) so I can save to a TDMS file. I have an idea of how to do this part but I am struggling to link the 'data type' condition and case stucture successfuly. Any ideas or pointer would be greatly appreciated. I have attached my VI so far...
    Attachments:
    UDP_Case_Struct.vi ‏24 KB

    TGL wrote:
    At the moment the input to the case structure is an array of data types. Is this maybe causing a problem as a single data type is not being fed into the selector terminal?
    You are indexing out a 2D array, thus you need to wire both indices to get a scalar element suitable to be wired to the case structure. If you leave one index unwired, you get an entire row or column respectively.
    How often does the file change? If it is always the same, it would be sufficient to read it once before the loop.
    LabVIEW Champion . Do more with less code and in less time .

  • LR 5.7 - different capabilities depending on license type?

    I'm using LR on a standalone (not CC) license. After running the update to LR v 5.7, I'd like to get access to the Fujifilm Classic Chrome film simulation for the Fuji X-T1 camera model. I already asked this question in the US Fuji X camera user forum, and there are mixed reports: Some users claim they have access to this film simulation when opening a RAW file that originates from the initial (black) Fuji X-T1 camera - I have the same camera, but my LR installation doesn't grant me this access.
    Are there two different LR v. 5.7 versions out there with different functionalities, or did I make a mistake (I tried to call up the film simulation simulation via Camera Calibration/Profile) when calling up the profile?

    I see the profiles, including Classic Chrome, in LR 5.7 with a RAF from an X-T1 I downloaded from the internet.
    I am on the CC Photographer's Plan, so this doesn't verify if the serial-number version has them, and I don't feel like uninstalling this and installing the serial-number version to check.  I can say that these are internal to LR and ACR only, because unlike other extra Camera-xxxx profiles, these do not have corresponding .dcp files on disk, so it could be that they are in the CC version, only.  One bit of evidence that they should be in the non-CC version is that they ARE there in the CS6-ACR 8.7 plug-in, which isn't CC:
    Here is the entry for the LR Blog back when these profiles were first introduced that doesn't say anything about them being CC-only:
    Lightroom 5.4 now available
    One situation where the profiles wouldn't exist is if you are viewing a non-raw (a JPG instead of a RAF) photo, because these profiles are only available for raw files.
    If none of this makes sense, can we see a screenshot of your camera profile list in LR 5.7?

  • Cannot retrieve the data from excel sheet

    hi all ...
    i am trying to retrieve the data from excel sheet and at the same time i am inserting the data into mysql database.
    code is as follows
    try{             Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");             conn1=DriverManager.getConnection("jdbc:odbc:"+estr,"","");             Class.forName("com.mysql.jdbc.Driver");             conn = DriverManager.getConnection("jdbc:mysql://localhost:3306/"+ t_dsn ,"root","manager");             sql="select * from student_info";             srch2 = conn.prepareStatement(sql);             rs1 = srch2.executeQuery();             String query  = "select * from ["+einput+"$]";             String query1= "select  count(*) from ["+einput+"$]";             st  = conn1.createStatement();             rs  = st.executeQuery(query);             ResultSetMetaData rsmd = rs.getMetaData();             c = rsmd.getColumnCount();//gets the column count             rs1  = st.executeQuery(query1);             while (rs1.next())  //loop to get no. of rows             {                 r = rs1.getInt(1);             }             rs = st.executeQuery(query);             for(i=1;i<=r;i++){                 rs.next();                 for(j=1;j==c;j++) {                     a = rs.getString(j);                     b= rs.getString(j);                     d = rs.getString(j);                 }                 rs1.next();                 PreparedStatement ps2 = conn.prepareStatement("insert into materials_out values(?,?,?)");                 ps2.setString(1,a);                 ps2.setString(2,b);                 ps2.setString(3,d);                 ps2.executeUpdate();             }         }catch(Exception e){             e.printStackTrace();         }
    but it is showing error as :
    java.sql.SQLException: [Microsoft][ODBC Driver Manager] Data source name too long
    at sun.jdbc.odbc.JdbcOdbc.createSQLException(JdbcOdbc.java:6957)
    at sun.jdbc.odbc.JdbcOdbc.standardError(JdbcOdbc.java:7114)
    at sun.jdbc.odbc.JdbcOdbc.SQLDriverConnect(JdbcOdbc.java:3073)
    at sun.jdbc.odbc.JdbcOdbcConnection.initialize(JdbcOdbcConnection.java:323)
    at sun.jdbc.odbc.JdbcOdbcDriver.connect(JdbcOdbcDriver.java:174)
    at java.sql.DriverManager.getConnection(DriverManager.java:582)
    at java.sql.DriverManager.getConnection(DriverManager.java:185)
    at Outward_register.jButton2ActionPerformed(Outward_register.java:368)
    at Outward_register.access$400(Outward_register.java:23)
    at Outward_register$5.actionPerformed(Outward_register.java:312)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:1995)
    at javax.swing.AbstractButton$Handler.actionPerformed(AbstractButton.java:2318)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel.java:387)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:242)
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonListener.java:236)
    at java.awt.Component.processMouseEvent(Component.java:6038)
    at javax.swing.JComponent.processMouseEvent(JComponent.java:3260)
    at java.awt.Component.processEvent(Component.java:5803)
    at java.awt.Container.processEvent(Container.java:2058)
    at java.awt.Component.dispatchEventImpl(Component.java:4410)
    at java.awt.Container.dispatchEventImpl(Container.java:2116)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:4322)
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3986)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3916)
    at java.awt.Container.dispatchEventImpl(Container.java:2102)
    at java.awt.Window.dispatchEventImpl(Window.java:2429)
    at java.awt.Component.dispatchEvent(Component.java:4240)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:599)
    at java.awt.EventDispatchThread.pumpOneEventForFilters(EventDispatchThread.java:273)
    at java.awt.EventDispatchThread.pumpEventsForFilter(EventDispatchThread.java:183)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThread.java:173)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:168)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:160)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:121)
    please help me ...

    please help me ... The question has nothing to do with 'getting' data from excel and certainly not with putting it into MySQL.
    The stack trace specifically tells you that your connection string is wrong.
    It also tells you which connection string is wrong.
    Which you can use to determine specifically which one is wrong. And which you did not provide that info to us.

  • LDAPSEARCH utility retrieves junk data

    Hi,
    I have iplanet directory server 5.1 version 3 installed on HP-UX 11i.
    When new attributes are added with some blank values, and trying to retrieve the data through ldapsearch utility,iam getting junk data for those attributes with blank values.
    awCountry:: VVNBIA==
    Anyone had encountered this kind of problem,if so please let me know how to get this fixed.
    Thanks in advance.

    It's not junk!
    If you search with [ldapsearch -L] it will show "not ascii" data in base64. Otherwise it will just say "Not ASCII". I think the two "::" instead of one will tell that it's encoded.
    I think it will show the data in UTF8 if you choose to "[dapsearch -B -F ":"] instead of [ldapsearch -L]. And if you have UTF8 output your shell must be able to handle it, otherwise you can read it but it's not 100% correct with the extended charachters.
    Note that the Solaris ldapsearch and the ldap servers ldapsearch behaves different with the [-B -F ":"] flags.
    /Per-Olov

Maybe you are looking for

  • Power converter required for new iMac?

    I have taken my new iMac to Germany. The provided power cord does not have a converter like the Mac laptops have. Do I need to purchase a power converter that will step down the voltage when plugging into the outlets in Germany, or is there a control

  • HT201412 iPhone will not recognise my music

    I Have recently change my iPhone as I damaged my iPhone 4 - I now have iPhone 4S. Everything has set up transferred except my music, I've tried syncing with ITunes and I've checked all my settings -when I go into the music I have a cloud display and

  • Color selection display in adjustment brush

    I notice that the color palette as displayed in the adjustment brush has changed. Below is the display for 5.0 and below this is display for 5.2RC Wonder if this is signicant. I know it dosent change any thing regarding color selection. Just wonderin

  • How to 'get rid' of a page flow template

    I added a page flow template instead of a page flow and wanted to delete it (get rid of it forever) but couldn't see how to. So I selected 'exclude project content'. Then I created a new page flow with the same name but it went back to the other item

  • Brutal error message OSStatus error 2003332927 Can not record video/audio

    I have QT pro 7.6 and since a couple of weeks ago, I have been unable to record video or audio. Any Ideas what this error code means and how I can fix it? thanks everyone!