Help needed in cleaning raw data with odd delimiters in it

I am trying to write a sp, which adjust the number of columns based on the IN Parameter for the raw file.
Raw (Id Int,RawData varchar2(5000))
RawData has actual data with delimiter, this column has all the raw file imported as is.
e.g. data in RawData Column
A|B|C|D|E|F
X|B|C|D|E
Z
P|ABC|ZPD|BITX|E|ETC
Here above you can see the max number of delimiter are 5 for a 6 column table, however for some records there are less delimiter, here comes the problem
For such records I want to add the extra delimter and take values for missing column as NULL or best would be''
plz help me in writing Generic SP to clean this.
We can pass the source & target table name and column names as a parameter, and create a clean table dynamically by name CleanedRaw etc.
here the file is | delimited, actually It can have any single char delimiter or space or tab also. I am ok if we need to pass the delimiter also as a parameter to this sp

I mean padd extra delimiters to make up to the max of 6 for this file, it can vary for other file
e.g
A|B|C
x
would be some thing like
A|B|C
x||
such that target cleaned table will have values as below
Col1 Col2 Col3
A    B    C
X       Edited by: NeilCSE on Jul 28, 2012 12:54 PM

Similar Messages

  • Help needed I updated my ipad2 with iOS5 but few of my dashbaords are not working now can any one let me know how to downgrade the OS

    Help needed I updated my ipad2 with iOS5 but few of my dashbaords (HTML5) are not working now ,can any one let me know how to downgrade the OS as we have a meeting coming up .. its urgent

    Downgrading the iOS is not supported. If you are using Safari this try clearing its cache via Settings > Safari.
    If that doesn't work then try closing Safari completely and then re-open it : from the home screen (i.e. not with Safari 'open' on-screen) double-click the home button to bring up the taskbar, then press and hold any of the apps on the taskbar for a couple of seconds or so until they start shaking, then press the '-' in the top left of the Safari app to close it, and touch any part of the screen above the taskbar so as to stop the shaking and close the taskbar.
    A third option is a reset : press and hold both the sleep and home buttons for about 10 to 15 seconds (ignore the red slider), after which the Apple logo should appear - you won't lose any content, it's the iPad equivalent of a reboot.

  • Do I need an external raw editor with Aperture?

    Sorry for the simple question - I'm an unsophisticated photographer just dipping toes in RAW stuff
    Does Aperture have the same functionality as the external RAW editors like Sony Image Data Converter and the various Canon tools etc?
    What I am asking is - do I need to install these and use them as external editors or can I achieve mostly the same thing in Aperture on the raw/arw images?
    I don't agonise over the detail but I would like to tinker and experiment, but having an extra tool is a bit annoying.
    Cheers, Z

    Aperture is a generic third party raw converter, like Lightroom, Aftershot, DxO, Capture 1, and several others.
    Canon DPP, Sony IDC, etc are specific converters for their own brand of cameras only. As such they offers features that make use of manufacturer knowledge about the raw, the sensors, the lenses, the camera settings and so forth.
    The third party solutions like Aperture compete pretty well in terms of the basic raw conversion, but only have limited access to some of the camera specifics, so can't fully compete when it comes to some of the cameras advanced processing options (for example diffraction compensation offered in some recent cameras)
    Where third party solutions compete is in their ability to support raw from multiple brands of camera and by providing a much larger set of additional features.
    Aperture provides excellent features to support the entire workflow process from initial capture to final publishing.
    Its raw conversions are generally excellent in terms of the detail/noise balance. Colour and tone is usually a bit neutral or flat and needs adjusting to taste to make them pop, but the use of presets can make this fast and semi-automatic (contrast this with Lightroom which applies a profile that gives a much punchier default conversion). However, specific results will usually vary by camera; Canon, Sony and Olympus and Fuji conversions are usually well regarded, while Nikon users seem to be the most vocal about apertures flat conversions.
    The use of in camera settings (tricks) designed to extend dynamic range can impact the raw processing. Where Aperture can read and understand the settings (like Fuji's DRx00% settings) it does a good job, but I see occasional issues reported from Nikon users about issues when using its ADL feature.
    So whether you will need an additional raw tool will ultimately be down to what cameras and lenses you use and you own impressions of what you think of Apertures conversions for that equipment.
    Unfortunately, there is no longer a demo version for you to try for yourself, although I've seen some comments here about purchasing and then asking for a refund if you are not happy, but I doubt that is official policy but perhaps contact App store support and ask.
    When I bought the wrong Bourne movie in iTunes, at first I thought they'd given me the wrong one and complained. Then I realised it was my mistake so told them to forget the complaint. They emailed back saying they had refunded my purchase as it wasn't what I intended to buy. I've had several other dealings along related lines and I have to say I've never been on the wrong end of one their decisions, they have always played very fair with me.
    Andy

  • D600 raw data with CS5

    how can I edit raw data from nikon D600 with CS5

    You can't. RAW support is version specific. You need to upgrade to CS6. otehrwise you casn of course use the free DNG converter in the interim...
    Mylenium

  • Need to find test data with payments include earning from past periods

    I am new to Oracle Payroll and need to find test cases which payments include earning from past periods.
    I have an R12.1 Vision environment but cannot run Payroll due to issue with Vertex, but I do have front-end and database access.
    Wonder any Reports/ Forms I can use to locate sample data with earning from past periods?
    Thanks!

    Hi,
    You can use oracle standard form to query old processed payroll for your desired pay periods.
    Navigation is Your HRMS responsibility >View >Payroll Process Results.
    In this you need to choose payroll name,from date,to date and click find.
    for e.g. in your vision instance you can query with payroll as "Vision Monthly" from "12 2008 Calendar Month" to will be "10 2013 Calendar Month" and find the result.
    choose any of the record and view result by further click on Assignment Process button than next click on SOE Report.
    Regards,
    VISHAL DANGI
    Edited by: VISHAL DANGI on Jun 19, 2012 12:50 AM

  • Help need on inserting system date on database

    hello every body,
    I need to insert system date into database through prepared statement.
    i wrote code :
    java.util.Date d=new java.util.Date();
    Preparestatement psmt;
    psmt.setDate(8, java.sql.Date(d));
    am getting class cast exception :
    could u please tell me how to insert system date through prepared statement..
    thanks in advance..

    Surround your code with a
    try{
    //Insert date here
    catch(Exception e){
    //handle exceptions here
    e.printStackTrace();
    Who says he didn't already?
    Try this:
    java.util.Date d=new java.util.Date();
    >
    Preparestatement psmt;
    psmt.setDate(8, new
    java.sql.Date(d.getTime()));This is correct, but can be condensed (if you want)
    psmt.setDate(8, new java.sql.Date(new java.util.Date().getTime()));
    >
    It's good idea to use the JDBC escape function
    instead of using a specific DBMS function. This way,
    your code will be portable.
    sql = "INSERT INTO USERS VALUES("
    + "'" + userName + "'" + ","
    + "'" + userPw   + "'" + ","
    + "  {fn now() }  )"; e Real's How To
    (http://64.18.163.122/rgagnon/javadetails/java-0567.ht
    ml)
    And this is only marginally applicable.  If he wishes to use the same statement for the current date, as well as other dates, he cannot make use of this.  Of course, I don't really know if I would trust or recommend a tutorial site that advocates building statements that are screaming for injection attack attempts.
    Edit:  Too slow by a mile!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • Need help creating script to clear data with user inputs

    Hi experts.
    I need to create a script to clear data in a DEV system from a particular junction.
    Basically, I need the user to enter a CATEGORY, ENTITY and TIME which will then be used to delete all data in a particular table which meetes those criteria.
    I tried to write it in SSIS, but can't get a user input box.
    Also, Stored Procedures are not designed to open input boxes for these entries.
    Therefore, is there a way to do this in BPC script logic?
    I believe that I might be able to write either a Stored Procedure or DTSX package and then pass data from BPC Run Package?
    If this is correct, how would I go about it?
    Also, would it be possible to read the DISTINCT entries for Category, Time and Entity and present as a dropdown list?  (It doesn't matter too much if not, a manual entry would have to do).
    I will admit that I have no experience of script logc, so any docments and/or pointers would be appreciated.
    Thanks

    Thank Karthik, but I can't use the clear for this job.
    Specifically, I need this to delete from the LCK tables whenever data gets stuck, so if anyone can tell me the format to use, I'd be extremely grateful
    (And I appreciate that this is not recommended, but it's a DEV system and we need a way to clear these locks quickly when they occur)
    Edited by: Pie Eyed on Oct 1, 2011 2:54 PM

  • Help needed to clean odd splotches

    Hey all, I have a white 30 gig video ipod and I bought a Speck ToughSkin protector for it a couple of months ago. I have taken it off a few times and noticed that there are splotches on the white plastic (my screen is protected, so no prob there), and I was wondering how to remove them. I just read on another thread that cleaning solution for eyeglasses is good, so I used it, but it didn't remove the splotches. They kind of look like dirt smears, but I thought maybe they are from the rubber case sliding on the plastic, I don't know. Does anyone know the best way to get rid of these without further hurting my ipod?

    I am using iKlear. The only Apple approved cleaner. I use it on all my Apple stuff. Is GREAT!
    Beavis2084

  • Help - Need to Get Max(Date) from An Unrelated Table in PowerPivot

    I have two tables in my Power Pivot model:
    Table A (a many table)
    Asset    
    SerialNumber                   
    User
    CTUT111                             
    YC112233                                            
    Bob
    CTUT222                             
    ZZ221144                                            
    Susy
    CTUT222                             
    ZZ221144                                            
    Larry
    CTUT333                             
    AB332244                                           
    Bob
    Table B (a many table, a CSV import from another system)
    Asset                    
    SerialNumber                                   
    CheckIn_Date
    CTUT111                             
    YC112233                                            
    6/15/2014
    CTUT111                             
    YC112233                                            
    6/20/2014
    CTUT222                             
    ZZ221144                                            
    6/18/2014
    CTUT333                             
    AB332244                                           
    6/20/2014
    I know it appears odd that Table B would have two entries for the same Asset (CTUT111), but it does.
    I know I could write a SQL query that gave me the MAX(CheckIn_Date), but I’m not staging these datasets in a SQL server first. 
    I’m pulling directly from CSV tables.
    I don’t want to have bridge tables either, if possible. 
    So, I’m left with a many-to-many situation in Power Pivot.
    I want to add a Calculated Column to Table A, called ‘Latest CheckIn Date’ – which I get from Table B, matching on Serial Number.
    So, when I’m done, I would expect the value for Asset=CTUT111 to be 6/20/2014 (since it’s the MAX of a value of dates)
    I’m trying this pattern from Marco Russo in which you don’t need to relate two tables to exchange information, but it doesn’t appear to be working.
    =CALCULATE (
    MAX ( VALUES ( TableB[CheckIn_Date] ) ),
    FILTER (
    TableB,
    'TableA'[SerialNumber]
    = TableB[SerialNumber]
    I’ve also tried to use LOOKUPVALUE, but I can’t seem to figure it out.
    Would appreciate the help.
    Thanks in advance.
    -Eric

    Hi Eric,
    Please, try this one formula:
    =CALCULATE (
                MAXX ( VALUES( TableB[CheckIn_Date] ); TableB[CheckIn_Date] );
                FILTER (
                    TableB;
                    'TableA'[SerialNumber] = TableB[SerialNumber]
    P.S. In my locale I use ";". According to your locale you should use ",".
    Truly yours,
    Paul

  • Query help needed for querybuilder to use with lcm cli

    Hi,
    I had set up several queries to run with the lcm cli in order to back up personal folders, inboxes, etc. to lcmbiar files to use as backups.  I have seen a few posts that are similar, but I have a specific question/concern.
    I just recently had to reference one of these back ups only to find it was incomplete.  Does the query used by the lcm cli also only pull the first 1000 rows? Is there a way to change this limit somwhere?
    Also, since when importing this lcmbiar file for something 'generic' like 'all personal folders', pulls in WAY too much stuff, is there a better way to limit this? I am open to suggestions, but it would almost be better if I could create individual lcmbiar output files on a per user basis.  This way, when/if I need to restore someone's personal folder contents, for example, I could find them by username and import just that lcmbiar file, as opposed to all 3000 of our users.  I am not quite sure how to accomplish this...
    Currently, with my limited windows scripting knowledge, I have set up a bat script to run each morning, that creates a 'runtime' properties file from a template, such that the lcmbiar file gets named uniquely for that day and its content.  Then I call the lcm_cli using the proper command.  The query within the properties file is currently very straightforward - select * from CI_INFOOBJECTS WHERE SI_ANCESTOR = 18.
    To do what I want to do...
    1) I'd first need a current list of usernames in a text file, that could be read (?) in and parsed to single out each user (remember we are talking about 3000) - not sure the best way to get this.
    2) Then instead of just updating the the lcmbiar file name with a unique name as I do currently, I would also update the query (which would be different altogether):  SELECT * from CI_INFOOBJECTS where SI_OWNER = '<username>' AND SI_ANCESTOR = 18.
    In theory, that would grab everything owned by that user in their personal folder - right? and write it to its own lcmbiar file to a location I specify.
    I just think chunking something like this is more effective and BO has no built in back up capability that already does this.  We are on BO 4.0 SP7 right now, move to 4.1 SP4 over the summer.
    Any thoughts on this would be much appreciated.
    thanks,
    Missy

    Just wanted to pass along that SAP Support pointed me to KBA 1969259 which had some good example queries in it (they were helping me with a concern I had over the lcmbiar file output, not with query design).  I was able to tweak one of the sample queries in this KBA to give me more of what I was after...
    SELECT TOP 10000 static, relationships, SI_PARENT_FOLDER_CUID, SI_OWNER, SI_PATH FROM CI_INFOOBJECTS,CI_APPOBJECTS,CI_SYSTEMOBJECTS WHERE (DESCENDENTS ("si_name='Folder Hierarchy'","si_name='<username>'"))
    This exports inboxes, personal folders, categories, and roles, which is more than I was after, but still necessary to back up.. so in a way, it is actually better because I have one lcmbiar file per user - contains all their 'personal' objects.
    So between narrowing down my set of users to only those who actually have saved things to their personal folder and now having a query that actually returns what I expect it to return, along with the help below for a job to clean up these excessive amounts of promotion jobs I am now creating... I am all set!
    Hopefully this can help someone else too!
    Thanks,
    missy

  • Help need to post the datas to Tr.code - IW31

    Hi Experts,
                    <b>I have created a Zcust_req_info table and added several fields like
    Cust_req_number
    cust_req_details
    cust_address
    and I have added record to the table and now the table is filled with some datas.
    I have to upload the datas to IW31 tr code, where I have to create work request automatically. </b>
    Could anyone help me,
              <b> "FULL POINTS WILL BE AWARDED FOR THE HELPFUL ANSWERS"</b>
    Thanks and regards,
    Sunil K Shetty
    [email protected]

    Hi Sunil,
    best is to user Batch Input or Call Transaction to bring data to Tcd. IW31.
    You can use the Batch Input recorder (Tcd. SHDB) to generate example code needed für this transaction.
    Klaus

  • Help needed in Sorting Columns (date sorts alphabetically)

    Hi All,
    I have a report query as follows:
    select to_date(period,'MON-YYYY') start_date
    ,exp_type
    ,id
    ,acct_ref
    ,dept_ref
    ,item_date
    ,amt
    from test;
    I need to display the report in the same order as select statement (start_date,exp_type,id etc). I have given default sort order in report attributes and user enabled sort on all columns. The report attributes look as shown below:
    column_name / sort / sort_seq
    start_date / yes / 3
    exp_type / yes / 1
    id / yes / -
    acct_ref / yes / -
    dept_ref / yes / 2
    item_date / yes / 4
    Now my problem is that the start date sorts alphabetically (as varchar) instead of chronologically (date wise). How can I resolve this?
    If I change my default sort order so that start_date is sorted 1st, it works perfectly fine. Is there any restriction for APEX sort that says the column displayed needs to be sorted in the same order? How do I overcome it? Or is it possible to overcome it?
    Any suggestions would be appreciated.
    Thanks,
    Sumana

    Hi,
    Thanks. But no I cannot change it to date, as there are many applications using it for displaying the period. But I found an equivalent date column for that period and tried using that. It was not working.
    I did further analysis and found that even to_char(period) works fine. The problem was something else. In my region query the select statement was
    select exp_type
    ,id
    ,amt
    ,to_date(period,'MON-YYYY')
    from test.
    I then had in region attributes used the arrows to change order of display, so that period appears first. That was the culprit. When I change my region query, to match the order in region attributes the date column as well as to_date(period) both work fine.
    I never knew that the order of select statement and that in region attributes should match each other!!! And hence when posting I did not give importance to the order of my select list. Sorry for that.
    The mystery is how was it working when i changed the sort order to say "period" 1st and then exp_type (2nd)
    Thanks everyone for you help.
    Thanks,
    Sumana

  • Grus help needed in finding the queries with Cartesian  joins

    Hi
    I have a reporting tool in which users are allowed to put the joins on the views and add some sub queries that produces a Cartesian product. Is there any tool or way that I can stop the execution of those query before it is being executed for example
    Step 1 ) user creates a query
    step2 ) user submits it
    step 3) by any tool or any check if Cartesian join is found the query execution is stopped and notify the user that the query is not good if no problem executes the query.
    I really need help in step 3. I am on 9i release2.
    Any help or suggestions will be highly appreciated.

    I Agree with Gasparotto, you should limit the resource consume.
    You must understand that cartesian join, isn´t always a BAD guy, sometimes you need it.
    If your developers are in trouble with handle the join , think about NATURAL JOIN, may be it helps you
    Regards
    Helio Dias

  • Help needed in Exporting tables data through SQL query

    Hi All,
    I need to write a shell script(ksh) to take some of the tables data backup.
    The tables list is not static, and those are selecting through dynamic sql
    query.
    Can any body tell help me how to write the export command to export tables
    which are selected dynamically through SQL query.
    I tried like this
    exp ------ tables = query \" select empno from emp where ename\= \'SSS\' \"
    but its throws the following error
    EXP-00035: QUERY parameter valid only for table mode exports
    Thanks in advance,

    Hi,
    You can dynamically generate parameter file for export utility using shell script. This export parameter file can contain any table list you want every time. Then simply run the command
    $ exp parfile=myfile.txt

  • Help needed in Loading excel data to staging table from OAF Page

    Hi All,
    We have a requirement from the client on loading of a excel sheet data into staging table using OAF page.
    We were able to load a CSV file into staging table via OAF. The approach we used is we created a item of style 'messageFileUpload', which would pick the CSV file from desktop and we wrote the logic on the controller to place the file into server and then sumit a concurrent program to load the data into the staging table.
    But client wants data from the excel file to be loaded into staging table. Is there any way(approach) by which we can convert the excel file data into .CSV file using OAF?
    Any help or pointers on this will be highly apperciated.
    Thanks,
    Chethana

    Hi,
    Read through this :
    Need to upload a CSV/Excel to a table in OAF page
    Thanks,
    Gaurav

Maybe you are looking for

  • Safari 5.1.2 keeps changing text field randomly on text input

    Hello everybody. Safari keeps changing the text field on input, do you know how to correct this issue? Here is an example: Let's say I load www.google.com, it appears in the safari window as usual. Suppose I begin to type a search in the google searc

  • How to Update Comment List in Reader

    I have written a plug-in that manages user annotations. The issue that I have is I am able to manipulate the annotations on the page, but the information in the Comment List does not update. Is there a seperate array for what shows up in the comment

  • Acess to USB harddisk on Neatgear WGT634U WLAN router

    Hello folks! Hoping someone can help me, pleeeeeaaaase! Until recently, I have been using an iBook (MacOS 10.3.9), that is connecting wireless to a Netgear WGT634U router. On this router, I have an external harddisk, connected via USB. On the iBook,

  • Mountain Lion iCal Exchange Shared Calendars

    From the delegates tab inside the accounts preferences, I get no access to a calendar that I am sure I have access to. is this a problem with shared Exchange 2007 calendars or a problem with iCal?

  • HT5625 Dear, I want to buying a app Photon Flash? But there have a problem. so help me

    Dear Sir, I want to buy a app Photon Flash. But ther have a problem. I don't know what is the problem. They have a massage to contact for iTunes support. Please help me to buy the app. <Edited by Host>