Data in two different coulmns merge into one column

I am using following script to create external table with data.
CREATE TABLE external_class(
item_no varchar2(255),
max_range varchar2(255)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY DATALOAD
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
FIELDS TERMINATED BY ','
MISSING FIELD VALUES ARE NULL
(item_no,max_range)
LOCATION ('class_newc.txt')
REJECT LIMIT UNLIMITED;
Problem is that its merge both columns into one column.
I want two seperate columns.
Data is in microsoft excel spread sheet.
I saved as txt(TAB DELIMITED) txt
Data appears in clas.txt file as below:
"400     "     4177.64
"404     "     5574.64
"406     "     5333
"408     "     
"409     "     
"450     "     10.83
"478     "     
"482     "     4820
I ran the above script to create table.
Table Created
SQL> desc external_class;
Name Null? Type
ITEM_NO VARCHAR2(255)
MAX_RANGE VARCHAR2(255)
SQL> select count(*) from external_class;
COUNT(*)
3036
but with
select * from external_class;
ITEM_NO MAX_RANGE
"400"4177.64
"404"5574.64
"406"5333
"408"
"409"
"450"10.83
"478"
"482"4820

thanks its work.
Actually I created other file as below
Item_no-----max_range
400     4177.64
404     5574.64
406     5333
408     
409     
450     10.83
and use creation script as below:
CREATE TABLE external_class(
item_no varchar2(255),
max_range varchar2(255)
ORGANIZATION EXTERNAL
TYPE ORACLE_LOADER
DEFAULT DIRECTORY DATALOAD
ACCESS PARAMETERS
RECORDS DELIMITED BY NEWLINE
fields terminated by whitespace
MISSING FIELD VALUES ARE NULL
(item_no,max_range)
LOCATION ('class_newa.txt')
REJECT LIMIT UNLIMITED;

Similar Messages

  • Writing data from two different acquisition rates into one file

    Hi,
    I'm using a compactRIO, and I have an anemometer outputting data at 4Hz to the serial port on the controller, and I am using a 9237 module to read strain from two channels at 40Hz. I would like to record all this data in one file, but I'm unsure how to have the data points match up with respect to time since they are read at different rates. Basically I have 10 strain data points for every one anemometer data point, but that one data point needs to somehow be associated with the other 10 read in the same amount of time. It would be okay to "extend" the slower data to the 10 strain points, and likewise to the next ten when the anemometer refreshes its values.
    Thanks for any input!
    Andrew

    Check out the Queue multi-plexer vi from the examples.  C:\Program Files\National Instruments\LabVIEW 2009\examples\general\queue.llb\Queue Multiplexer.vi
    If each data acquisition loop enqueues data to one file writing loop the data is writen in order.  Queues are really a good way to multiplex data sources 
    Message Edited by Jeff Bohrer on 01-29-2010 09:44 AM
    Jeff

  • Loading consolodated data from two excel files / cube into one infocube

    Hi Friends,
    I am receiving data from two sources:
    Source 1:
    Customer Product  Location                          Keyfig(Budget)
    C1            P1          L1                                     100
    C2            P1         L1                                      200
    C1           P2          L1                                      300
    Source 2:
    Product     Location                        KeyFig (Actual)
    P1               L1                                           320
    P2               L1                                           350
    I want to combinedata from two sources (or cubes) into one cube as follows:
    Customer      PRoduct       location          Budget            Actual
    C1                 P1                 L1                  100                 320
    C2                 P1                L1                   200                 320
    C1                P2                L1                   300                   350
    I tried by creating multiple data sources / infosources / transformations / updates rules and also tried with both DSO and cube. But the records are always getting updated as follows:
    Customer      PRoduct       location          Budget            Actual
    C1                 P1                 L1                  100                 320
    C2                 P1                L1                   200                 320
    C1                P2                L1                   300                   350
                        P1               L1                                           320
                       P2               L1                                           350
    Can you help me figure out if this is possible? If yes, how can I do it.
    Thanks a lot in advance.

    Hi,
    Please use the below approach.
    Load the budget data in ODS1.
    Load the actual data in ODS2.
    Create a ODS3 with same structure as ODS1 with additional key figure for Actuals,which will get data from ODS1. Here add a look up based product and location to populate actuals.
    Start Routine
    SELECT * FROM ODS2 into ITAB
    FOR ALL ENTRIES in SOURCE_PACKAGE.
    Transformation Routine:
    Read table ITAB  into WATAB
    with key location = <source_fields>-Location
    product =  <source_fields>-Product.
    If sy-subrc = 0.
    RESULT = WATAB-ACTUAL.
    ENDIF.
    -Vikram

  • Combining two different Chart types into one graph

    Hi All,
      I am developing a graphical BW report using WAD. I need to place two differnt chart types into one graph.For example, I have Volume and Quantity .Here the volume should be displayed in Bars and Quantity should be displayed in Lines in the same graph. X axis(Country) is same for these two . I am not sure how to achieve this. Please do let me know if anyone has solution for this.
    Thanks for your time.
    Thanks & Regards,
    Raja

    Hi Andreas,
      One word I can say is 'Perfect' . Even though I am out of office now,I hope the example perfectly will solve my problem.I will try it.
    Thanks for Aduri and Pcrao also for their suggestions .
    Thanks again and I assigned points to all to say my thanks
    Regards,
    Raja

  • When I save a PDF as an Excel File, all of the data in the PDF is put into one column (AdobeXI)

    Hi, thanks for taking the time...
    I'm running a machine with Windows 7, Office 2010, and Acrobat XI.  When I save a specific PDF as an Excel workbook, all of the data in the original PDF is sorted correctly in four columns.  When the same task is performed on this file on another user's machine, all of the data is sorted into one column.  The user has the same versions of Windows, Office, and Acrobat.  I've attempted the "Repair installation" option but the problem persists.  Any suggestions?  Thanks again for helping,
    -E

    Thanks for the quick reply.  I figured out how to get the desired results by using tagging.  For anyone who may reference this post in the future, I went to "Customize" in the top right corner of Adobe, then selected "Create new tool set...", looked under "accessiblity and found the "tag" option.  Hit ok, tag is added to the toolbar.  Then I highlighted the dataset in the PDF that was relevant to the output format, then clicked "tag", saved as spreadsheet.  Sorry I can't provide more details on how tagging works or if there's a more elegant solution available, but I'm sure one's out there.

  • Can I transfer Time Machine data from two separate hard drives into one new one?

    I'm using a MacBook Pro as my primary computer.  My 500 gig Time Capsule filled up a year or so ago, so I stopped using it with Time Machine for awhile so I could keep the data from those old back-ups.  There were a number of things I deleted from my computer's very limited hard drive after they were backed up to the Time Capsule.  I got a 1T external USB drive last year to use as my "filing Cabinet" to store files I didn't necessarily need all the time or that were filling up my small laptop hard drive--including my iTunes library--all organized in a way that made it relatively easy for me to find what I needed, even if I didn't remember exactly when I'd filed it or what I'd called it.  I got another 1 terabyte external (portable) drive last July and dedicated it to TimeMachine backups and labeled it "TimeMachine".
    Over the last couple of weeks, my friend has been helping me upgrade to Yosemite and clean up my laptop hard drive.  Last week he cloned my laptop hard drive to a new 1T hard drive and I exchanged it for my old drive in my computer today. All good.
    Here's the issue.  We replaced my Time Capsule hard drive with a 1 terabyte drive with the idea of transferring the data from the old Time Capsule (500G) drive and the newer USB 1T "TimeMachine" compact drive to the new 1T Time Capsule drive and beginning using the latter for my Time Machine backups going forward.  Originally he thought we could copy everything from each of my external drives (the old 500gig drive from my Time Capsule, the USB "TimeMachine" drive I've been using since July, and the "file cabinet" files) to my computer in their own folders and then start regular TimeMachine backups to the new Time Capsule drive, thus preserving all my old data and making regular backups going forward.  The "file cabinet" data was no problem at all, but when I tried to copy my USB "TimeMachine" data to my computer, I was unable to.  My friend found instructions for transferring old TimeMachine data to a new TimeCapsule, but I don't know if I can transfer the data from two separate disks to the new TimeCapsule drive. I'm afraid that one set of data will supersede the other and either my newer backups or my old ones will be lost if I try to transfer both. 
    Are my fears justified or is there a way to insure that no such problem will occur?  Of course, my data will still be on those two older drives, but that won't do me a lot of good if I can't access it when I need to. Also, the 1T drive now belongs to my friend; he used a brand new drive he'd bought for himself for my new internal hard drive and plans to take my 1T "TimeCapsule" drive in exchange, once the data has been transferred, so he will, of course, erase that drive. 

    Should we be able to bring up the old (500G) Time Capsule Drive to rename it using a SATA to FireWire harness and then copy the whole thing to the new Time Capsule drive?
    You can copy a whole sparsebundle from one drive to another. That is not a problem. Whether you can access the sparsebundle is something you should test before you even start though.
    If it's on the Desktop and I don't tell Time Machine to exclude it from backups, will it just automatically back it up?
    All drives you plug into the Mac are excluded by default.. you must include them. So no problems there.. but I hope I am understanding the question.
    Will both volumes or directories (which is the right term?) show up when I open Time Machine?
    No, Time Machine will only open what it is told to open... or its backup default location.
    You can force Time Machine to open alternative/old/no longer used backups by (now I have a problem as things have changed somewhat in Yosemite and I consider it alpha release software at this point in time). The old method was to right click on the TM icon and select a different TM backup. easy. Yosemite seems to have made easy stuff harder.
    Here it is on my current computer.. clearly not Yosemite.. Right click on the TM icon in the dock.. select Browse Other Time Machine Disks.. And supply the info of where that is located. Easy. If you cannot figure it out one of the other posters here (with more patience than me for Yosemite) will help you.
    Or will we have to partition the new drive somehow--is that even possible?
    I am getting more lost as I go down the list.. but the TC disk cannot be partitioned.
    If you have included all those USB drives in the new backup on a Time a Time Capsule.. you have made life rather hard because now your files are stored another layer deeper than they were.
    So to open a file from a disk you need to open the sparsebundle.. then dig down to the drive in question and then dig down to the backup.. and all of this means Time Machine has to work perfectly which is Yosemite is a very big ask.
    I thought you wanted to just backup your old drives to central location.. which means copying the files to a separate folder on the Time Capsule.
    One correction I need to make to my post, which will make my strategy make a bit more sense: my new Time Capsule drive is 4T
    It makes it much harder.. and I have to pose a real question of long term .. if you have put a 4TB drive in a Gen1 TC.. did you also replace its power supply because I can assure you the drive might be ok but the TC itself will not last forever.. and what happens when it dies. The Gen1 power supply is already well beyond its normal life span and the vast majority are dead. When the backup device is unreliable and the backups on it are made that much harder to get access to.. is this a great plan??
    If you are going to consolidate all your old files on one disk.. a task I find understandable. I have done much the same albeit the usefulness of files made on emac running OS9 may be questioned. A disk lying in the bottom of a draw is a more appropriate place for them.
    You want those files as easily accessible as possible (at the point of recovery) and not buried inside a sparsebundle.. particularly not a sparsebundle from the old TC disk buried inside a new sparsebundle.. keep files as accessible as possible as you can run searches.. and that is best done on a USB 3 (or faster ie thunderbolt) drive plugged into a new(ish) computer.. not network. And since the files are not being accessed on a daily/weekly or even monthly or yearly basis.. keeping them in actively running TC network storage.. I would say is a waste of space. That is only my opinion of course.. you might consider it highly important that files you will never look at are available any time of day or night when the urge comes to track down that elusive pimpernel email you sent 10 years ago... but I find it hard to justify. What the case.. the problem with TM and things like Mail is you cannot search it.. you must restore the whole library/files/program even before you can access it.. that makes file recovery out of a sparsebundle double step process.
    So.. summary.
    If you want to store files on the 4TB drive in the TC.. that is not a great strategy but it can work.. simply create a folder named.. OldFilesEMac for instance.. and do a simple copy and paste of all the file to that location. Do not use TM.. Since you have already used TM.. and from what I am reading you have already done the backup with the external drives included.. then you are going to end up needing to erase the TC and start over.. which you may not be prepared to do.. which is fair enough. (I am coming across as overbearing school master.. apologies).
    TM is to backup your main OS and current files.. not files from 10-20years ago.
    Please do read the issues involved in Pondini..
    See his FAQ. I recommend you read through Q14-17 so you understand what is involved in recovery.
    http://pondini.org/TM/FAQ.html
    I also recommend you read the first couple of articles here. http://pondini.org/TM/Home.html
    Particularly so you understand the complexity of Time Machine.
    And the articles here. http://pondini.org/TM/Time_Capsule.html
    Particularly Q3 on mixing data and backups on a TC.
    I wish I could spend an hour or two face to face and work it out.. the whole strategy to do this.. !!

  • Migration Jobs - two different SCCM sites into one

    Migration Jobs Question.  
    Migrating to SCCM 2012 R2.   I have two different Migration Source sites.    One is 2007 and one is a 2012 R2-Development.   Trying to merge both to one SCCM 2012 -Production site.        
    SCCM 2007  has been moved to 2012 Prod, now I'm looking to move 2012 DEV to prod.   Do I lose the ability to run "Objects modified after Migration" on the 2007 object data?
    As I understand, once I change the source hierarchy, all previous Migration Jobs are removed. 

    Hi Ronni
    When I add a new Source Hierarchy,  It looks like it removes the old.   
    So this is what I just tried:
    *Changed the Source Hierarchy to SCCM 2012DEV
    **Didn't rerun thought the whole process.  Noticed that the 2007 Hierarchy was removed.  Source Site Code 2012DEV,  
    Status Ready for next gathering Process"
    Then I:
    *Clicked "Specify Source Hierarchy" 
    **Noticed  that the 2007 was part of the drop down list
    previous Migration Jobs returned
    I guess the next step is to migrate a item from 2012DEV to 2012PROD and see what happens.  

  • Fetch data from two tables and insert into one table

    I have similar to the following data in two tables (@Plant, @PlantDirector) and need to consolidate into one table (@PlantNew) as follows.
    DECLARE @Plant TABLE (PlantID INT, PlantName VARCHAR(100))
    INSERT INTO @Plant (PlantID, PlantName) VALUES (1, 'Name One'),(2, 'Name Two'),(3, 'Name Three'),(4, 'Name Four'),(5, 'Name Five'),(6, 'Name Six')
    Director data for the Plants exist in the following table. Assistant value 1 means Assistant Director and 0 means Director. 
    Data exists only for subset of plants and a Plant may have one or both roles.
    DECLARE @PlantDirector TABLE (PlantID INT, PlantDirectorID INT, Assistant bit)
    INSERT INTO @PlantDirector (PlantID, PlantDirectorID, Assistant) VALUES (2, 111, 1),(2, 222, 0),(4, 333, 0),(6,444,1)
    The above data needs to be inserted into one table (@PlantNew) as follows: 
    PlantID in @Plant table is IDENTITY value and needs to be inserted as-is into this table.
    PlantDirExists will get a value of 1 if at least one record exists in @PlantDirector table for a PlantID. PlantAssistantDirID and PlantDirID should be set to the corresponding PlantDirID or NULL appropriately depending on the data.
    DECLARE @PlantNew TABLE (PlantID INT, PlantName VARCHAR(100), PlantDirExists bit, PlantAssistantDirID INT, PlantDirID INT)
    INSERT INTO @PlantNew (PlantID, PlantName, PlantDirExists, PlantAssistantDirID, PlantDirID)
    VALUES (1, 'Name One', 0, NULL, NULL),(2, 'Name Two', 1, 111, 222),(3, 'Name Three', 0, NULL, NULL),(4, 'Name Four', 1, NULL, 333),(5, 'Name Five', 0, NULL, NULL),(6, 'Name Six',1, 444, NULL)
    How do I achieve the above using SQL ? Thanks.

    like this
    INSERT @PlantNew  (PlantID, PlantName, PlantDirExists, PlantAssistantDirID, PlantDirID) 
    SELECT p.PlantID,
    p.PlantName,
    CASE WHEN pd.PlantID IS NULL THEN 0 ELSE 1 END,
    PlantAssistantDirID,
    PlantDirID
    FROM @Plant p
    LEFT JOIN (SELECT PlantID,
    MAX(CASE WHEN Assistant = 1 THEN PlantDirectorID END) AS PlantAssistantDirID,
    MAX(CASE WHEN Assistant = 0 THEN PlantDirectorID END) AS PlantDirID
    @PlantDirector
    GROUP BY PlantID)pd
    ON pd.PlantID = p.PlantID
    Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs
    You're missing a FROM
    insert into @PlantNew
    SELECT p.PlantID,
    p.PlantName,
    CASE WHEN pd.PlantID IS NULL THEN 0 ELSE 1 END,
    PlantAssistantDirID,
    PlantDirID
    FROM @Plant p
    LEFT JOIN (SELECT PlantID,
    MAX(CASE WHEN Assistant = 1 THEN PlantDirectorID END) AS PlantAssistantDirID,
    MAX(CASE WHEN Assistant = 0 THEN PlantDirectorID END) AS PlantDirID
    from @PlantDirector
    GROUP BY PlantID)pd
    ON pd.PlantID = p.PlantID

  • Recording two different size windows into one timeline

    Hello, I wonder if anyone can help.
    I'm trying to capture two different size animations, one 900
    x 600 and one much bigger, say 1280 by 700....How can I get them
    into the same timeline? It seems captivate only allows one size
    frame recording per movie.....
    Any hints?
    cheers
    zig

    Hi zig
    The only way I can fathom this happening is to take Captivate
    and record the larger. Then use the Project > Resize option to
    reduce the size of the larger to match the smaller. Then import
    that/those slide(s) into the smaller.
    Or, you could go the other way around. Record at the larger,
    leave it at that size, then import the smaller into the larger via
    File > Import > Slides/Objects.
    Cheers... Rick

  • Combining two separate libraries (with two different Apple IDs) into one

    My fiance is moving in this weekend, and we hope to get rid of her computer to make space. She has a fairly large iTunes library, some ripped from CD and about 100 purchased from iTunes. I want to move her library and combine it with mine on my computer. I've read through the help files for consolidation, backup, and moving libraries from one computer to another, but none seem to apply to this special case. Once we transfer her files, we plan to cancel her Apple ID account since it wouldn't be authorized on any computers anymore.

    Once we transfer her files, we plan to cancel her Apple ID account since it wouldn't be authorized on any computers anymore.
    You can't cancel the iTunes account.
    Besides, you still need it to authorize your computer to play the songs she purchased.
    To get the music onto your computer, just copy it over to yours, then File -> Add folder to library and select the folder whwenre you put the music.

  • PHP create array/variable for two dropdowns and insert into one column

    Hello,
    I have been trying for days to get this to work. Any help would be very appreciated.
    The dropdown code:
    <?php //Dropdowns for hours and minutes
    $hour = array (0, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16);
    $min = array (.00, .25, .50 ,.75);
    echo '<span class="red">Hours :</span><select name="hour">';
    foreach ($hour as $value1) {
    echo "<option value=\"$value1\">$value1</option>\n";
    echo '</select>';
    echo '<span class="red">Quarter Hours :</span><select name="min"';
    foreach ($min as $value2) {
    echo "<option value=\"$value2\">$value2</option>\n";
    echo '</select>';
    //Dropdowns for hours and minutes
    //Create variable to send to the time field using a hidden field
    function input_time($value1, $value2) {
    $time = count($value1 + $value2);
    return $input_time;
    ?>
    <input name="time" type="hidden" value="<?php echo "$input_time";?>" />
    The Schema:
    CREATE TABLE `ND_time_sheet` (
      `time_id` int(10) unsigned NOT NULL AUTO_INCREMENT,
      `day` varchar(10) NOT NULL DEFAULT '',
      `date` varchar(8) NOT NULL DEFAULT '',
      `project_id` varchar(8) DEFAULT NULL,
      `non_bill` tinytext,
      `staff_id` varchar(5) NOT NULL DEFAULT '',
      `time` decimal(3,2) unsigned zerofill DEFAULT NULL,
      `type` varchar(30) NOT NULL DEFAULT '',
      PRIMARY KEY (`time_id`)
    ) ENGINE=MyISAM DEFAULT CHARSET=latin1
    Thanks!

    9677670421 wrote:
    hi... i am trying to do the same but i am having the 2D array of data when first time if i clicked in table it should show the the first row values and if i again clicked same value should show in the second row and so on... but insted in my code if clicked (using insert into array ) at a time it is showing two rows of the data pl help me ..........
    This seems to be a different problem, so you should have started a new thread instead.
    Can you show us your code, tell us what you are clicking, tell us what you get and what you expect to get instead. Thanks.
    LabVIEW Champion . Do more with less code and in less time .

  • How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    How does one set up two different iTunes accounts on the same computer so that they do not merge into one?

    mparker402 wrote:
    So, when the other iTunes account needs to be used, I should log out of Windows and have the other user log in under a different Windows account, correct?  
    M Parker, 
    Yes, since you are trying to keep things separate, that is exactly what you would do.

  • Two separate iPhones got merged into one iTunes account. How to separate them. We are sharing all of each other's contacts at this time. Thanks for your help.

    Two separate iPhones got merged into one iTunes account. How can I separate them in iTunes???????. We are sharing all of each other's contacts at this time. Thanks for your help.

    The reason you are receiving each other's text messages is because you are both using the same Apple ID for iMessage.  To prevent this you need to use different IDs.  (Note: you can still share the same ID for iTunes.)  On one of the phones, go to Settings>Messages>Send & Receive, tap the ID, sign out, then sign back in with a separate ID.
    To migrate your 3GS to a new iCloud account, start by saving any photo stream photos that you want to keep on the phone to your camera roll.  To do this, open the my photo stream album, tap Edit, tap the photos, tap Share, tap Save to Camera Roll.  Next, if you have any notes that you are syncing with iCloud that you want to keep, you'll need to email these to yourself so they can be recreated after moving to the new account.
    Once this is done, go to Settings>iCloud, scroll to the bottom and tap Delete Account.  (This will only delete the account from this phone, not from iCloud.  The phone that will be keeping the account will not be effected by this.)  When prompted about what to do with the iCloud data, choose Keep On My iPhone.  Next, sign back in with a different Apple ID to create the new account, turn iCloud data syncing preferences and when prompted about merging with iCloud, choose Merge.  This will upload the data to the new account.
    Finally, if you have merged data in the two accounts that you want to separate you will have to go to icloud.com from your computer, sign into each iCloud account separately and manually delete the data you don't want from each account.

  • Two sets of faces have merged into one. How can I separate them back into two groups or delete the bunch

    Two different sets of faces have merged into one under one name. How can I separate them back or delete the bunch?

    Look at Steve MacGuire's helpful article:  http://samsoft.org.uk/iTunes/grouping.asp  It explains how to solve this much better than I can.

  • I have 20,00 images in my iphoto they have all been merged into one event. How do I restore them to the original events and dates? them

    I have 20,00 images in my iphoto they have all been merged into one event. How do I restore them to the original events and dates?

    Load the backup from before this happened
    LN

Maybe you are looking for