How to place nulls has last rows.Find query for below problem

I have a table..MyTable(value number(10))
select * from Mytable;
value
12
null
13
null
11
null
This is the table i have and the records i have...... and i need output like this
value
12
13
11
null
null
null ..............>ike this i need output for this i use this query i.e
Query-->select value from mytable where value is not null
union all
select value from mytable where value is null
------------>and this query gives only one column result i need multiple results like below: i have table with 2 columns like below
MyTable2(value1 number(10),value2 number(10))
select * fromMyTable2
value1 value2
111 null
null 201
112 null
null 200
110 null
this is the table i have......... and i need output like below
value1 value2
111 201
112 200
110 null
null null
null null
NOTE:: If we use ORDER BY table records order must change, i don't want to change any order....please what is the query for that

I'm not able to find any sense in your request but it can be done:
select value1, value2
from (select value1, rownum rn from
         (select value1 from mytable where value1 is not null
           union all
          select value1 from mytable where value1 is null)
        ) a,
       (select value2, rownum rn from
         (select value2 from mytable where value2 is not null
           union all
          select value2 from mytable where value2 is null)
        ) b
where a.rn = b.rn;You should study some book about relational databases to understand frst of all what a record is, and then that records in a table are not ordered.
Max

Similar Messages

  • How to write sql query for below mentioned eaxmple.

    Hi,
    I have requirement.
    There are number of rows and I need the result through query as follows.Please help me to proved sql query for below mentioned requirement.
    example: table TEST.
    COLA COLB COLC COLD COLE COLF MANAGER 5 NULL NULL 3 NULL
    SR.MANAGER 6 3 NULL NULL NULL
    VP 5 5 4 5 5
    I have to write the sql query if COLA IS MANAGER THEN CONSIDER MANGER RECORD,AND IF ANY COLUMN FILED IS NULL FOR MANGER THEN CONSIDER COLA IS SR.MANGER, AND IF ANY COLUMN FILED IS NULL FOR SR,MANGER THEN CONSIDER VP records.
    I need output as below.
    COLB COLC COLD COLE COLF
    5(manager) 3(sr.manger) 4(vp) 3(manger) 3(vp)
    Please provide the for above mentioned output.
    Thanks

    Duplicate thread. please view the answer posted in your first thread.
    how to write sql query.
    And, please don't post any duplicate thread.
    Regards.
    Satyaki De.

  • How to write sql query for below example.

    Hi,
    I have requirement.
    There are number of rows and I need the result through query as follows.Please help me to proved sql query for below mentioned requirement.
    example: table TEST.
    COLA COLB COLC COLD
    MANAGER 5 NULL null
    SR.MANAGE 6 3 NULL
    VP 5 5 4
    I have to write the sql query if COLA IS MANAGER THEN CONSIDER MANGER RECORD,AND IF ANY COLUMN FILED IS NULL FOR MANGER THEN CONSIDER COLA IS SR.MANGER, AND IF ANY COLUMN FILED IS NULL FOR SR,MANGER THEN CONSIDER VP records.
    I need output as below.
    COLB COLC COLD
    5(MANGER) 3(sr.manger) 5(vp)
    Please provide the for above mentioned output.
    Thanks

    <<if COLA IS MANAGER THEN CONSIDER MANGER RECORD>>
    What does this sentence means? COLA does not cnatin a single record but the number of records with diffrent values.
    Regards
    Arun

  • My iTunes just started skipping when a song is played.   has a solution been found for this problem yet?

    My itunes started skipping when a song is played.  Has a solution been fournd for this problem yet?

    For the missing Artists on your iPod, make sure their tracks in iTunes are not marked as "Part of a compilation" in iTunes. You can do this by highlighting the track, right->clicking on them and choosing "Get Info" from the shortcut menu. When the window pops up, head over to the Info tab and make sure there is NO tick mark next to this option in the lower right hand corner. Lastly, sync the updated changes to your iPod.
    B-rock

  • How can I delete the last row of a Matrix

    Hi All,
    Does anyone know whether deleting the last row of a matrix controlled by a UDO child table gives problems? I have the strange effect that I cannot delete the very last existing row in the matrix, i.e. after updating the delete the last to-be deleted row comes back into my matrix !!
    I give you a snippet of my code (function getSelectedRow gives the selected row in the matrix):
    ==
    if (evnt.ItemUID.Equals(ViewConstants.Items.DELETEBUTTON))
      if (evnt.EventType == BoEventTypes.et_ITEM_PRESSED)
        if (evnt.BeforeAction)
          form = BusinessOne.Application.Forms.Item(formUID);
          mtx = (Matrix)form.Items.Item(ViewConstants.Items.MATRIX).Specific;
         int numRow = getSelectedRow(mtx);
         if (numRow != -1)
                                            mtx.DeleteRow(numRow);
                                            form.Mode = BoFormMode.fm_UPDATE_MODE;
                                       Item btn = (Item)form.Items.Item(ViewConstants.Items.ADDBUTTON);
                                       btn.Enabled = true;
    ==
    Cheers,
    Marcel Peek
    Alpha One
    Message was edited by: Marcel Peek
    Message was edited by: Marcel Peek

    Yes, there is a problem to delete the last row.
    It is fixed in version 2005.

  • How do I remove the last row in a csv data file

    I would like to remove the last row of data from a csv file that I have saved.  I can identify the start byte of the last row; however, I'm not sure what tool is the best one to remove it.  Should I move the EOF?  Should I open the file up to that point then save over the old one?  Is there another way I don't know about?  I am using labview 7.1.
    Thanks

    I would use the Read Text File.  You can right-click on it and tell it to read lines.  Then Delete From Array.  Leave the index and length unwired and it will delete the last item (I noticed your code is removing the second line).  Then open the file again set to replace or create and write your data.  This method allows you to propagate your errors instead of the Write/Read Spreadsheet File handling the errors for you.
    There are only two ways to tell somebody thanks: Kudos and Marked Solutions
    Unofficial Forum Rules and Guidelines
    Attachments:
    Remove last row of csv_BD.png ‏14 KB

  • How To Place/Open Multiple Images Into Separate Layers For ONE Document?

    I've been searching for the answer for a long time so I figured that someone here has to know.  I have PS Elements 9. 
    So I would like to make GIFs and I know how to do so, the problem is placing in those tens of files in layers (it's tedious).  Is there a way to select multiple image files to place into a single document?  And for them to be place into its own layer?  I've tried dragging and selecting from the Open/Place menus (won't allow), SHIFT + Direction Key from the Open/Place menus (won't allow), tried opening them to drag on the Organizer and to drag from the Project Bin (again won't allow), and I've read tutorials where they say to use scripts and actions but I'm not sure what to download them in order for them to work and the links are broken anyway.
    An example of what I'd like to do:
    Open and place in 15+ screenshots into layers but in just one document.
    Each screenshot would be one layer in said document.
    ...rest of GIF process...
    I feel like there's an easier way to get this without placing in each one at a time.  I remember being able to do this on a old PS (though not Elements).  Thanks for any help.

    The quickest method is probably opening all images together from Full Edit:
    File >> Open
    Then navigate to the folder and use shift+click to select a block of files.
    The images will appear in the photo bin. Drag and drop each one into the main editing window and a separate layer will be created for each.

  • How to display language key (0LANGU) in the query for BW report

    Hi,
    Can someone tell me how to display language key (0LANGU) in the query? I want to display which language (English or French) is used for material description in BW report. Thx.

    hi,
    check if the infoobject is kept as lang dependent or not  for material text, else you need to create a masterdata attribute with text and lang keys and do corresponding mapping, so then it can be displayed in your report
    regards
    laksh

  • Has a fix been developed for the problem with trackpad not scrolling in mail after a Maverick install?

    Has a fix been developed for the issue with Trackpad not scrolling in  Mail after a Maverick Install?

    "Fix?" To my knowledge there is no widespread problem (I have none myself).
    Barry

  • Please find solution for this problem ...pl/sql table problem

    Hi
    I am using forms 6i. Now i am having a form to insert purpose. which contain 70 fields to enter. that is there are 10 screens contain 10 fields each. Each screen contains two buttons 'next' and 'previousscreen'. Now what my problem is after entering the 20 fields and i am entering 27th field in 3rd screen i noticed that i did a mistake in 2nd field value which is in 2nd screen. when i moved from third scrren to first screen by using pushbutton previous screen. all data in second and third screen has gone. For this i used a pl/sql table and put the code in 'nextscreen' button. the code is
    declare
    type emptabtype is table of :emp%rowtype
    index by binary_integer;
    emptab emptabtype;
    begin
    insert into emptab values(:emp.eno,:emp.ename.....so on);
    commit;
    end;
    The above is the approach i used. but not successful. Is the approach followed by me is correct (I strongly believe that some mistake is there). If not, pls tell me what to do for my problem. What my ultimate requirement is i should not loss the data entered in the fields even when i modify any data on any screen.
    I hope you people understand my problem
    Thanks in Advance,
    bigginner in forms
    prasanth a.s.

    Hi there,
    I have a form which has over 150 fields (from 4 tables). I have used a tab-canvas form to handle all the input - 2 screens for the fields from the first table and 1 screen each for the remaining 3 tables. I can navigate between the tabs without trouble. When everything is done, the contents of the screens are saved to the database via a menu item. Most of the fields are database items.
    My point is that Oracle Form has no problems in handling
    such processing and I am only using its normal default capabilities.
    What type of canvas are you using? There should be no reason to use buttons to navigate betweeen screens if you are using a tab-canvas form. You should not have to use PL/SQL table to handle the data if the fields are normal database columns.
    Regards,
    John

  • VBS:How can i determine the last row of an excel-sheet

    I want to replace the chn-comments of an datafile. I pick up the chn-names and want to compare them with an excel-file and so get from the excel-file the right chn-comment and store int back in the datafile. my problem is how can i determine where the excelfile-row is on the end to load the loopounter with corr values.
    i know one solution via scan on ascii 13 and 9.but bether is to know immediately the length of the column.
    answers also in german possible.

    Peter,
    Are you using DIAdem's Excel Import Wizard? By "Excel file" do you mean a tab- or comma-delimited ASCII file that Excel can read in easily, or do you mean a file with the extension "*.xls"? You certainly could not search through an *.xls file to find CR/LF characters.
    If you use the ASCII or Excel Import Wizard to create an *.STP file for the "Excel" file in question, then after the *.STP file is loaded you have access to a whole range of variables, starting with Ascii... or Excel... which completely outline the structure of the ASCII or Excel file, including things like the row in which the channel comments are, etc.
    Why don't you send over your Excel file and I'll be able to help you a lot better.
    Regards,
    Brad Turpin
    NI

  • How do I create shortcuts in the finder sidebar for network folders?

    I used to be able to cmd-T or drag/drop a network folder to the sidebar in Finder and have a permanent alias/shortcut. After the Lion upgrade I can not figure out how to do that. I was able to drag a shortcut to the desktop but when I clicked on it, I got an error that it was not available when in fact it was still connected.

    DaniaMara wrote:
    Hi all ...
    Have finally broken down and switched to Lion....
    one of the most convenient things for me as a photoshopper about Snow Leopard was to be able to have sort cuts in the finder side bar under "Places" so i could just drag the image i wanted to open to the left onto the App icon and it would open it from there.  NOW I have drag it to the dock to open or open the
    dropdown menu... both slower.  I am not happy about this.... Is there a way to get this function back... I have looked and looked and can't find it!
    Thanks guys...
    DM
    Have you tried dragging the App icon into the sidebar of the finder?
    Pete

  • Unlucky recepient of the Troj/JSDldr-V "iTunes" trojan (turns itunes German, for starters). I have perused forums for how to remove the trojan nd cannot find anything for Mac (Sophos found, can't remove). Running a 2011 late model Macbook Pro 10.9.5

    Hi! I was the unlucky recipient of the Troj/JSDldr-V "iTunes" trojan (turns itunes German, for starters). It arrived via a FedEx email that was in my Spam folder and somehow unleashed when I moved Spam to trash. (I saw a fake itunes update, clicked the red circle to close which might have been the trigger). Anyhoo, I am perplexed as to how to remove. My Sophos found it and isolated it afterwards, but has been unable to remove it as iTunes is already compromised - and everything being in German or faux German, I'm not about to enter any info as it cleverly prompts for admin user name and password. Sneaky buggers! I have perused forums and found it is likely spyware, but have been unsuccessful at finding how to remove for Mac (Sophos found threat, can't remove it). Running a 2011 late model Macbook Pro, 10.9.5. Any support would be GREATLY appreciated. I'm broke (as in homeless broke) and even if I had money, the nearest Apple store is a five hour drive away - a tad inconvenient and inaccessible. :-(  Karma points for helping, though! And I always pay it forward!

    Read these:
    Remove unwanted adware that displays pop-up ads and graphics on your Mac - Apple Support
    http://www.adwaremedic.com/index.php
    http://www.thesafemac.com/mmg/

  • How to update to the last version of iPhoto for OS X 10.6.8

    How do I update my current iPhoto (6.0.6) to the last version of iPhoto that is compatible with 10.6.8.  I do not wish to upgarde Garageband, nor iMovie

    The latest version of iphoto 11 you can install on 10.6.8 is v9.2.3
    The version on the appstore is 9.3.x and that requires 10.7 minimum.
    So, install from the Disk and then run Software Update.
    Regards
    TD

  • Even after uninstalling and re-installing adobe, I still get this error message every time a new window opens. How do I cure this: Windows cannot find '(see details below)'.

    This started immediately after I updated the Adobe Reader for the first time. Here's the file name: C:Documents and Settings\Terrel B\Application Data\Moxilla\Firefox\Profiles\gfl6v9u5.default\extensions\{E2883E8F-472F-4fb0-9522-AC9BF37916A7}\chrome\content\getPlusPlus_Adobe_reg.exe

    I think there might be a bug in FF18. After the upgrade, I would also get the error message and couldn't open any site, though using "No proxy" worked I believe. Turns out I had something set under network.proxy.socks (and network.proxy.socks_port) (leftovers of tests done a while back) and even though they shouldn't have been used (I believe, FF17 didn't & I'm using "Use system proxy settings") they obviously were, leading to the problem.
    Just resetting those 2 options fixed things for me, and I didn't have time to look into it more, but there might be a bug in there somewhere...
    Maybe try checking under about:config if you have any proxy settings set (that you don't need/use) (You don't seem to have any set, but I can't recall if they were visible in the Preferences window or not for me...), and if so reset them. Or just look for any (network) options not using its default value... (Assuming, as it did for me, that running FF18 with a brand new profile works fine.)

Maybe you are looking for

  • Inspire P580 PSU seems dead

    Hello! I need some help. I've got an Inspire P580 Speaker set from a friend but it seems that the power supply is dead. I tested the kit with my P380's PSU justo to see if it was in fact from the PSU and the kit worked, but as would be expected, poor

  • In Read_text FM, the data after 256 characters gets truncated

    Hi All, In this FM, the internal table can't have string type field. In my case the data is in multiple lines of internal table and I am concatenating into a single field which is of type DESCRIPTIONS(string). I am passing this data to a table in sma

  • WBS Report

    Dear Friends, I am looking for a WBS report which can give me planned and budgeted figure with variance from the last year. Report should be for all the WBS elements from the top level. Regards VK

  • HT1937 i have iphone 5 carrier locked to sprint so how can it be factory unlocked ?

    i have iphone 5 carrier locked to sprint so how can it be factory unlocked ? what is a good way to unlock it as i am in UAE now

  • Can I Activate just one CS4 program alongside my CS6 programs?

    I have my CS4 Design Premium currently installed on my old Macbook and my mom's iMac (for when I go home to visit my parents), and CS6 Design Standard on my new iMac, and am planning to put the other license for my CS6 onto the replacement Macbook I