Formatting with partition by?

scott@ntw>with tbl as
  2      (select '01' as c1, 'Q012004' as c2, 5 as c3 from dual union all
  3       select '01', 'Q022004', 2 from dual union all
  4       select '01', 'Q032004', 10 from dual union all
  5       select '02', 'Q012004', 8 from dual union all
  6       select '02', 'Q012006', 8 from dual union all
  7       select '05', 'Q022006', 10 from dual union all
  8       select '05', 'Q032006', 10 from dual union all
  9       select '05', 'Q042006', 10 from dual )
10     select c1, c2, s1, decode(rn,1,sum(s1) over (partition by c1 order by c2)) s2
11     from (select c1, c2, sum(c3) s1, row_number() over (partition by c1 order by c2 desc) rn
12           from tbl
13           group by c1,c2)
14     order by c1,c2;
C1 C2              S1         S2
01 Q012004          5
01 Q022004          2
01 Q032004         10         17
02 Q012004          8
02 Q012006          8         16
05 Q022006         10
05 Q032006         10
05 Q042006         10         30
8 Zeilen ausgewählt.
scott@ntw>Look at the first column, please. I would like to get the following:
C1 C2              S1         S2
01 Q012004          5
   Q022004          2
   Q032004         10         17
02 Q012004          8
   Q012006          8         16
05 Q022006         10
   Q032006         10
   Q042006         10         30

in your sql*plus
break on c1
@> break on c1
@>
@> with tbl as
  2        (select '01' as c1, 'Q012004' as c2, 5 as c3 from dual union all
  3         select '01', 'Q022004', 2 from dual union all
  4         select '01', 'Q032004', 10 from dual union all
  5         select '02', 'Q012004', 8 from dual union all
  6         select '02', 'Q012006', 8 from dual union all
  7         select '05', 'Q022006', 10 from dual union all
  8         select '05', 'Q032006', 10 from dual union all
  9         select '05', 'Q042006', 10 from dual )
10       select c1, c2, s1, decode(rn,1,sum(s1) over (partition by c1 order by c2)) s2
11       from (select c1, c2, sum(c3) s1, row_number() over (partition by c1 order by c2 desc) rn
12             from tbl
13             group by c1,c2)
14       order by c1,c2;
C1 C2              S1         S2
01 Q012004          5
   Q022004          2
   Q032004         10         17
02 Q012004          8
   Q012006          8         16
05 Q022006         10
   Q032006         10
   Q042006         10         30

Similar Messages

  • External drive, how to format and partition?

    Hey everybody!
    I'm about to buy an external drive for my mac. I am reasonably capable on a computer, but I've never done formatting or partitioning so I have two questions:
    1) I just want to check that I do not need to buy a mac-formatted drive. A little big of googling told me I could do the formatting myself with Disk Utility, just wanted to double check that that was true.
    2) Once I get my external drive, what I want to do is create two partitions within that drive, one for my Time Machine backup and one for random files and movies. I'm not sure how to do that (apparently I might need to pick different formats for each in Disk Utility?) so if anybody could help out that would be brilliant.
    Thanks
    (if that helps, I have a MacBook Pro with a 512GB hardrive, and I want to buy a 1TB external drive)

    Hi,
    Here is a link that will help you set up your external drive. http://www.cnet.com/how-to/how-to-set-up-an-external-hard-drive-for-use-with-os- x/
    You won't need different formats for Time Machine backups and storage space partitions. However, given the size of your hard drive, 500 gb for Time Machine may not be enough. You could buy a separate one for Time Machine, budget permitting.
    Check the size of your startup disk, and if it is only 250 gb or less, then 500 gb for Time Machine may be OK, for a while. It will soon fill up, but the older backups will be erased.
    Regards.

  • Disk Utility unable to format or partition external HD

    Last weekend I bought Leopard and prepared everything in my iMac (PowerPC G5, 2.0 GHz) to install it. One of the things I tried was to repartition an external USB hard drive (Iomega 120 GB P/N: DHD120-C) for use with Time Machine. This drive was already formatted with HFS+ but I noticed that was using MBR, and I understand that for use with Time Machine you have to connect a disk using Apple Partition Scheme. Well, I used Disk Utility (still on Mac OS X 10.4.10), selected Partition, Options, Apple Partition Scheme instead of Master Boot Record and tried to apply changes to the drive. Disk Utility froze, I left it for more than one hour until I had to force quit it.
    When my iMac rebooted an screen appeared saying that I had a drive not recognized and gave me the option to initialize it. A second failed attempt, Disk Utility froze again.
    Finally, I decided to move to Leopard and try to fix the problem later. Everything went fine and while I was waiting I used a Windows machine to partition my external USB disk drive (used DISKPART to create a primary partition) and formatted it with NTFS because Windows told me that the drive was too large to use FAT32. In Leopard, I connected the drive, it mounted OK and used disk utility again to try to repartition it using Apple Partition Scheme and Mac OS Plus (which I understand is the same than HFS+). Disk Utility froze again, more than a couple of hours later I had to force quit it and now I'm using MacDrive in a Windows computer to format the drive, after creating again a primary partition using DISKPART, it seems to work without issues, formatted it using HFS+ in less than a minute. For me, the drive is working fine.
    I'll test it with my Leopard iMac later, I'm sure it will mount OK but I'm also pretty sure that it will be recognized as Master Boot Record, which most certainly will give me problems if I try to use it with Time Machine (or not?). Can anybody please explain me what's happening between my iMac and the external hard drive?
    Thanks in advance.

    As expected, the disk formatted with MacDrive was recognized OK by my iMac. As soon as I connected it Time Machine offered to use it, I accepted and my first backup completed some time last night (I left it working and went to sleep).
    Any ideas about what could be happening with the hard drive?

  • Task Sequence Windows Server 2012 format and partition issue when using MDT2012

    Hi all,
    Currently I'm working on a task sequence to deploy a Windows Server 2012 image. We've integrated MDT2012 Update 1 in SCCM2012 SP1 and created a default 'Server Task Sequence'. This task sequence deploys the install.wim to a server which has multiple disks
    attached.
    We've configured multiple format and partition disk steps to create the following partition layout:
    Disk 0: 499MB BDEDrive (do not assign drive letter) + 40GB OSDisk
    Disk 1: 40GB Programs
    Disk 2: 40GB Data
    Disk 3: 25GB User
    When the task sequence is finished I've noticed the drive letters assigned to the disk are not correct. In some cases the BDEdrive gets drive letter D assigned, sometimes drive letters are assigned starting with E, thus skipping drive
    letter D. 
    The smsts.log files show an error when it's re-assigning drive letters after booting into Windows. Looks like an error in the DiskPartScript.txt.
    <![LOG[==============================[ OSDSetupHook.exe ]==============================]LOG]!><time="16:59:40.889-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="osdsetuphook.cpp:186">
    <![LOG[Executing task sequence]LOG]!><time="16:59:40.905-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="osdsetuphook.cpp:279">
    <![LOG[Loading the Task Sequencing Environment from "C:\_SMSTaskSequence\TSEnv.dat".]LOG]!><time="16:59:40.920-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="basesetuphook.cpp:366">
    <![LOG[Environment scope successfully created: Global\{51A016B6-F0DE-4752-B97C-54E6F386A912}]LOG]!><time="16:59:40.936-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="environmentscope.cpp:659">
    <![LOG[Environment scope successfully created: Global\{BA3A3900-CA6D-4ac1-8C28-5073AFC22B03}]LOG]!><time="16:59:40.936-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776"
    file="environmentscope.cpp:659">
    <![LOG[Debug shell is enabled]LOG]!><time="16:59:43.806-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="basesetuphook.cpp:1440">
    <![LOG[Successfully enabled debug command shell support.]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="debugwindow.cpp:156">
    <![LOG[Configuring local administrator account]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="basesetuphook.cpp:1462">
    <![LOG[Re-assign all drive letters...]LOG]!><time="16:59:43.884-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="diskutils.cpp:1941">
    <![LOG[Executing command line: "C:\WINDOWS\system32\diskpart.exe" /s "C:\WINDOWS\TEMP\DiskPartScript.txt"]LOG]!><time="16:59:43.900-120" date="05-10-2013" component="OSDSetupHook" context=""
    type="1" thread="776" file="commandline.cpp:827">
    <![LOG[Process completed with exit code 2147942487]LOG]!><time="16:59:50.249-120" date="05-10-2013" component="OSDSetupHook" context="" type="1" thread="776" file="commandline.cpp:1123">
    <![LOG[Diskpart.exe STDOUT:
    Microsoft DiskPart version 6.1.7601
    Copyright (C) 1999-2008 Microsoft Corporation.
    On computer: SRV03
    Volume 1 is the selected volume.
    DiskPart successfully removed the drive letter or mount point.
    The volume you selected is not valid or does not exist.
    There is no volume selected.
    ]LOG]!><time="16:59:50.249-120" date="05-10-2013" component="OSDSetupHook" context="" type="3" thread="776" file="diskutils.cpp:1807">
    When I take a look at the generated diskpart_script.log file the volume D gets selected twice, which fails the second time because of the first remove drive letter command.
    This is the output in the diskpart_script.log file:
    select volume D
    remove letter=D
    select volume D
    remove letter=D
    select volume E
    remove letter=E
    select volume F
    remove letter=F
    select volume H
    remove letter=H
    select disk 0
    select partition 1
    assign
    select disk 1
    select partition 1
    assign
    select disk 2
    select partition 1
    assign
    select disk 3
    select partition 1
    assign
    It seems this error is caused by the first 'Format and Partition Disk' step before the 'Use Toolkit Package' step which is part of the default Server Task sequence. When I disable this Format and Partition step and create the partition manually
    all looks ok showing no errors in the smsts.log file.
    I've solved this by replacing the first 'Format and Partition Disk' step by an Powershell command which formats and partitions the disk. 
    Anyone seen this behavior?

    I have a similar problem when I install windows on some clients. Have you found any explanation for the behavior?

  • I am having sporadic issues after new hard drive install and recovery using Time Machine. The same sluggish response, start up screen pixelating...If I reinstall Lion will it wipe out other applications? My HD was formatted and partitioned correctly, I ha

    I am having sporadic issues after new hard drive install and recovery using Time Machine. The same sluggish response, start up screen pixelating...If I reinstall Lion will it wipe out other applications? My HD was formatted and partitioned correctly, I have a late 2009 iMac.

    Use the trackpad to scroll, thats what it was designed for. The scroll bars automatically disappear when not being used and will appear if you scroll up or down using the trackpad.
    This is a user-to-user forum and most people will post on here if they have problems. You very rarely get people posting to say there update went smooth. The fact is the vast majority of Mountain Lion users will not be experiencing any major problems with the OS, or maybe with apps which are not compatible, but thats hardly Apple's fault if developers don't update their apps.

  • MDT 2013 Fails to Format or Partition disk on Surface Pro 3

    I have been trying to image a Surface Pro 3 using MDT 2013 and have been unable to get past the Format and Partition portion of the deployment.  At first I would get an error that it was unable to format or partition the drive and then after that it
    just reboots after trying for so long.  I am able to image any other device with the same task sequence and have no issue just having an issue with the Surface Pro 3.  Any help would be great.
    Thanks in advance.
    I am getting the error FAILURE (5210)
    ZTI Error - Unhandled error returned by ZTIDISKPART: Object required (424)

    I think our problem is also hardware failure although without re-imaging a working surface pro 3 I can't be sure.
    I tried what imfusio suggested in this thread.
    https://social.technet.microsoft.com/Forums/en-US/d31384bc-4e96-4a5b-a400-637bd6006d81/failure-5456-unable-to-determine-destination-disk-partition-and-or-drive-surface-pro-3?forum=mdt
    Unfortunately the deployment failed with the same ZTI Error - Unhandled error returned by ZTIDISKPART:
    Object required (424)
    I then rebooted into WinPE and ran diskpart, I could see the two volumes (EFI and OSDisk). I then tried to format the OS disk volume using diskpart. I got a paramater is incorrect error and the disk was no longer visible with a 'list disk' command. So it's
    like the format is putting the disk offline. I'm going to try restore one of these surfaces, apply all firmware updates then re-image. If that doesn't work I'm out of ideas.

  • With Time Machine I have an external hard drive formatted with Mac

    With Time Machine I have an external hard drive formatted with Mac. The record contained files windows. How to recover?
    Serious mistake: to connect a Mac to an external drive with data (important!) Windows, the warning appears: "You want to use the disk for Time Machine?" Wrong button, so in 2-3 seconds, the disk is formatted. Now Mac "sees" the disc but empty, Windows does not see it under "My Computer" but in "Disk Management" is reported as "hard core", "healthy", "GPT protective partition" Is there a way to retrieve the files? Sorry for my English Thanks

    I'm having a difficult time following, I understand English isn't your native language. You may have good luck with Google Translate.
    Also please read Pondini's Time Machine FAQs & Time Machine Troubleshooting.

  • Problems with partitioning and install Grub. Fresh install

    All,
    First post here. I appreciate any help you can offer.
    I am having some problems when installing Arch Linux.
    I am installing Arch on a brand new (3 days old) Toshiba SatelliteC655D-S5300 Laptop.
    Hot sheet can be found at http://cdgenp01.csd.toshiba.com/content … -S5300.pdf.
    I was initially installing from 2011.08.19 x86_64 Core CD but someone suggested using the latest version.
    Now I am installing from 2011.11.13 x86_64 CD burned at 4x (the slowest my burner can go).
    I am able to complete all steps up to installing GRUB, but it fails to install.
    During partitioning I receive a few errors and I believe this is contributing to the issue.
    At first I tried automatic partitioning with 100mb boot, 1024mb swap, 10,000mb / and the rest of 320g for /home. Each partition is ext3 except /boot which is ext2.
    During the automatic partitioning an error briefly occured: /usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 355: !((partition_flag)): command not found.
    After speaking with a friend they suggested manually partitioning and using UUIDs instead.
    1) So far I have removed all partitions, rebooted.
    2) Partitioned using cFdisk. Bootable 100mb parition, 1024mb swap, 15,000mb primary (/), 3000mb logical (/var), and the rest 300949mb logical (/home).
    3) Once I write the changes and quit I reboot.
    4)I go back into the installer and complete steps 1-3.
    5) Go to step 4 and and then manually configure block devices, file systems, or mount points.
    6) I choose the option for uuid and hit ok.
    At this point 3 error messages appear at the bottom:
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'part,' : not a valid identifier
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'type,' : not a valid identifier
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'label,' : not a valid identifier
    (Screenshot: http://i.imgur.com/OHRKo.jpg)
    7) Next it prompts me to add the mount points for each partition set.
    8) Select the partition, the mount point, it asks me for label and any additional opts for mkfs.ext3.
    9) I leave the label and opts field blank. After selecting ok to the opts field I get the same 3 errors as above:
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'part,' : not a valid identifier
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'type,' : not a valid identifier
    /usr/lib/aif/core/libs/lib-ui-interactive.sh: line 602: local: 'label,' : not a valid identifier
    (Screenshot: http://i.imgur.com/QqkSP.jpg)
    I am able to successfully set a mount point and format each partition. But I receive the same set of 3 errors occur for each partition.
    10) Once I complete the formatting I proceed to step 8, install bootloader.
    It says Generating Grub device map.. This could take a while. Please be patient.
    I receivieve the following error on this screen: /usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 355: !((partition_flag)): command not found.
    (Screenshot: http://i.imgur.com/B5j4K.jpg)
    11) After the error displays it goes to the next screen, before installing grub you must review config file. etc.
    12) I hit ok and then :q the config file. Is there a critical change in the config file that I'm missing?
    13) After closing the file I select which the boot device where the GRUB bootloader will be installed. My only option is /dev/sda. I hit ok
    Then I get the following 2 errors:
    /usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 355: !((partition_flag)): command not found
    /usr/lib/aif/core/libs/lib-blockdevices-filesystems.sh: line 355: !((partition_flag)): command not found
    (Screenshot: http://i.imgur.com/ol840.jpg)
    13) Error installing GRUB. See /dev/tty7 for output. Ok
    14) GRUB was NOT successfully installed. Ok
    I checked out TTY7.
    It shows the installer issuing the following commands in GRUB.
    1) device (hd0,) /dev/sda
         Error 12: Invalid device requested
    2) root (hd0,0)
         Filesystem type is extf2, partition type 0x83
    3) setup (hd0,)
    Checking if "/boot/grub/stage1" exists... no
    Checking if "/grub/stage1" exists... yes
    Checking if "/grub/stage2" exists... yes
    Checking if "/grub/e2fs_stage1_5" exists... yes
    Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
    Running "embed /grub/e2fs_stage1_5 (hd0,0)"... failed (this is not fatal)
    Running "install /grub/stage1 (hd0,0) /grub/stage2 p /grub/menu.lst "... succeeded
    Done.
    4) quit
    I have tried rebooting from here and using the Arch CD to boot into the existing OS but it does not work.
    I tried grub-install /dev/sda
    I get Probing devices to check BIOS drives. This may take a long time.
    /dev/mapper../dm-0 does not have any corresponding BIOS drive.
    I have tried going into grub and issuing the same commands the install script did.
    Same errors.
    I'm afraid I don't have network access at the moment so I can't get a successful /arc/report-issues to run.
    I hope I've included enough information to start the troubleshooting.
    Let me know if I've missed anything!
    Thanks in advance,
    -Jason
    Last edited by username17 (2011-11-17 22:37:56)

    username17 wrote:I get Probing devices to check BIOS drives. This may take a long time.
    /dev/mapper../dm-0 does not have any corresponding BIOS drive.
    Your drive does not have an MBR to install grub to as it is a GPT disk - which is also not supported under the old GRUB.
    You need to create a small partition at the very beginning of the drive (8MB is plenty) and set the "bios_grub" flag. ie the "BIOS drive" your error refers to.
    You will then need to install the grub2-bios package following the chroot instructions on the grub2 wiki page here: https://wiki.archlinux.org/index.php/GRUB2#Installation
    ** Please note that I found the chroot mounts to be outdated - replace "/tmp/install" with "/mnt" **
    Your alternative solution is to boot a gparted liveCD and prepare your disk as MBR - this will (most likely) destroy all existing data on the disk.

  • How do I make NTFS format for partition in disk utility ?

    Hi, how would I format a external hard drive partition to NTFS for windows ? There's no option in disk utility. Only MS-DOS ( FAT ) , ExFat, free space, Mac OS extended- journaled, Mac OS extended, journaled case sensitive.
    The other partition would be mac os extended journaled . Does it have something to do with partition scheme ? I'm running mountain lion .

    anonymous4a wrote:
    ok i wasn't clear,
    That would have helped.
    I want to make a backup of my windows partition and mac partition on my macbook pro retina on to ONE external hard drive.
    Ok, so you have OS X and Windows in BootCamp on your Retina MBP.
    You want to make a backup of both to one drive and this is what you should do.
    Get another powered external drive slightly larger than your internal boot drive.
    Use Disk Utility to format this external drive with a GUID partition table and two partitions each slightly larger than your MacintoshHD and BootCamp partitions
    The first external partition formatted OS X extended journaled (MacintoshHD2) and the second one exFAT (WindowsBootcamp2) The OS X parittion is first at the top.
    Download these two programs, Carbon Copy Cloner and Winclone 3.
    Use CCC to clone the OS X MacintoshHD to the MacintoshHD2, and use Winclone 3 (runs in OS X) to backup Windows BootCamp to WindowsBootCamp2.
    The OS X clone on the external drive is bootable if you hold the option key down while booting the computer.
    The Winclone 3 partition on the external drive is not bootable, it's a backup only as Windows is copy protected and will invalidate itself if it ran.
    Warnings:
    Don't use CCC to clone BootCamp, it's not designed for that and won't restore to run Windows.
    There is no software that can do both parittions at the same time and be bootable or restore properly to a different sized drive or restore the RecoveryHD partition. Some have tried with some other softwares and have problems with lost drive space.
    Both partitions have to be cloned/backed up seperatly as there is some intelligence involved and the user needs the option to adjust partition space.
    Also, backup your files in Windows (and OS X) to a regular external exFAT drive that was formatted on the oldest Windows machine your going to connect to, OS X doesn't do exFAT correctly so Windows can't read it. The exFAT partition using Winclone likely won't be readable by a Windows PC.
    Most commonly used backup methods
    .Drives, partitions, formatting w/Mac's + PC's
    Again, you can't run Windows from a external drive, it's copy protected and takes the hardware id's into that, so it's essentially worthless to use NTFS on the external WindowsBootcamp2 partition.
    All you need is a partition format that can handle over 4GB sized files, and exFAT is ideal and free to use. FAT32 can't handle 4GB+ files and is being phased out.
    http://arstechnica.com/information-technology/2013/06/review-is-microsofts-new-d ata-sharing-system-a-cross-platform-savior/

  • Need to format the partition for Boot Camping to NTFS.  How do I do this?

    So yes, I have searched online to find a way to format the partitioned to NTFS so I can Boot Camp my Mac Mini and have found nothing that I can use.  Instead, all I have found are horror stories of others messing up their Macs when doing this.  I want to be sure I do this as correctly as possible because I do adore my computer.
    For Boot Camping, I have followed the steps and started the installation of Windows 7 but when it comes to choosing the partition it says I can't because it's not in NTFS format.  Any help on this would be greatly appreciated.

    Heh! Yes, it's one of those things that are simple, once you know where to look. Glad you got it figured out.
    You won't quite be done once Win 7 is done installing. You'll notice that the graphics in Windows likely won't be very good, and in general running kind of slow. That's because the Windows DVD had no drivers for Mac hardware.
    So you need your Snow Leopard disk. Either the first gray disk your Mac came with, it if shipped with Snow Leopard, or the retail disk you purchased.
    From the Windows 7 desktop, put the Snow Leopard disk in the drive. Windows will pop up the usual message about what you want to do with an external drive. Choose "Run Setup". It will run for a while as the drivers for your Mac hardware are installed for Win 7.
    Once that's done, you'll have menu icon for Apple Software Update. Run that to see if it needs to download and install any other Boot Camp updates, which would any updated Win 7 drivers for you Mac.

  • Problems Faced with Partitions in Oracle 9i.

    I have a doubt regarding the partitions in Oracle 9i can you please help me regarding this?
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    alter table t2 exchange partition p1 with table t1;
    SQL> alter table t2 exchange partition p1 with table t1;
    alter table t2 exchange partition p1 with table t1
    ERROR at line 1:
    ORA-14099: all rows in table do not qualify for specified partition
    WHAT DOES THIS ERROR MESSAGE MEAN? I AM NOT ABLE TO UNDERSTAND THIS? WHAT NEED's TO BE DONE TO RESOLVE THIS?
    alter table t2 exchange partition p1 with table t1 WITHOUT VALIDATION;
    SQL> SELECT * FROM T2;
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    2 2 2
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P2);
    no rows selected
    SQL> SELECT * FROM T2 PARTITION(P3);
    no rows selected
    (i) Why i am facing this error ORA-14099: while partitioning? Can you please brief me about this ?
    (ii) why there is not data's in the PARTITIONS p2 &p3 after the partitions is exchanged WITHOUT VALIDATION options?
    what is going with this method?
    (iii) Also can you please explain me with an example how to partitions a table having milliion of records with EXCHANGE PARTITION Options with MULITPLE partition segment's (say partition based on status id column with 6 differnt values i am thinking to use list partitions using status_id as partition key) ?
    Also i have tried the below approch is this a right approch? please correct me if i am wrong.
    Create table t1
    ( x number,
    y number,
    z number);
    insert into t1 values (1,1,1);
    insert into t1 values (2,2,2);
    insert into t1 values (3,3,3);
    commit;
    Create table t2
    x number,
    y number,
    z number
    partition by range(x)
    partition p1 values less than(2),
    partition p2 values less than(3),
    partition p3 values less than(4),
    partition p4 values less than(maxvalue)
    SQL> insert into t2 select * from t1;
    3 rows created.
    SQL> commit;
    Commit complete.
    SQL> SELECT * FROM T2 PARTITION(P1);
    X Y Z
    1 1 1
    SQL> SELECT * FROM T2 PARTITION(P2);
    X Y Z
    2 2 2
    SQL> SELECT * FROM T2 PARTITION(P3);
    X Y Z
    3 3 3
    SQL> SELECT * FROM T2 PARTITION(P4);
    no rows selected
    EXPLAIN PLAN
    FOR SELECT * FROM T2 WHERE X = 1
    | Id | Operation | Name | Rows | Bytes | Cost | Pstart| Pstop |
    | 0 | SELECT STATEMENT | | 1 | 9 | 2 | | |
    | 1 | TABLE ACCESS FULL | T2 | 1 | 9 | 2 | 1 | 1 |
    Now my question is what is problem instead of using EXCHANGE PARTITION why caun't we follow this above approch?
    to partition a non-partitioned table?
    Thanks,
    Rajesh.

    The value of 3 should obviously should go into the partition P3.Then why are you putting it into p1?
    Your command,
    <tt>    alter table t2 exchange partition <b>p1</b> with table t1;</tt>
    will swap partition p1 with the contents of table t1, leaving you with partition p1 containing the three values that were in t1. At first it told you there were rows in t1 that did not belong in that partition, but you used FORCE so it put them in anyway.
    btw there are notes in the FAQ about how to use ** tags to format your posts.
    ~Edited by: William Robertson on Oct 15, 2008 6:49 AM~                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Problems formatting the partition in Windows XP

    I'm trying to install Windows XP Pro (SP2, OEM version) through bootcamp. I partition the hard drive (115gb) using the assistant and then start the installation. I get the screen that asks me to select the correct partition and I choose "C: Partition 3 <BOOTCAMP> [FAT32]". However, according to the bootcamp installation guide, I should then see a screen that allows me to format the partition for Windows XP where I can select "NTFS (Quick)". The problem is, I'm not getting this screen. After I choose "C: Partition 3..." it jumps straight into the install and I never have the opportunity to format the partition. Any ideas on whats going wrong?

    Hi and welcome to Discussions,
    with newer Windows CDs/DVDs there seems to be sometimes a problem with the needed re-formatting during installation.
    Here's a solution for such problem comes up: http://discussions.apple.com/message.jspa?messageID=9771900#9771900
    Regards
    Stefan

  • Problem with partion resulting in "One of the source volumes specified has an invalid format and cannot be protected using Windows Backup. Only volumes formatted with NTFS/ReFS can be protected."

    We have two new Windows Servers 2012 R2 that I'm trying to set backups on using a script. When I used the -allCritical switch, I get the error specified in the subject. When I look at the partition information using diskpart, I see a 2048 MB partition with
    no drive letter labeled as System that is FAT32. I was never prompted to my recollection of what file system to format the partition with. Is it safe to assign this partition a letter, convert to NTFS, and then remove the drive letter?
    Thanks

    I did. I assigned the drive a letter and ran  CONVERT [drive letter]:
    /FS. I was really worried during the reboot, but it came up OK, and after it was back online, I removed the drive letter.

  • Accidentally re formatted PC partitioned hard drive. now can't use.

    Upgraded to Leopard. Installed boot camp. Runs PC side well. Accidentally re formatted PC partitioned internal hard drive (thought I was formatting an external back up hard drive). Now Windows XP gone and re installed Mac side too small to back up. Would like to combine hard drives to original Mac mini and start over. How do I do that? (I have Mac backed up on external drive from Time Machine and Windows as well as I can).

    Run the Mac OS X install DVD, go to disk utility and delete the PC partition. Then Resize the existing Partition to fill the free space.
    You don't have to re-install OS X if you don't want to, Leopard's disk utility has non-destructive resizing.
    You can also try to perform this action from within the OS, although I've had a few problems with resizing before and find it works best straight off the DVD.
    Good Luck!

  • MDT formated second partition instead of first one

    Hi
    I have diskpart script in preinstallation task sequence
    SELECT disk 0
    SELECT partition 1
    FORMAT FS=NTFS LABEL="System" QUICK
    EXIT
    And I have "Install Operating System" step configured to install OS on first disk and first partition.
    Everything works great, but there are some old WinXP computers that have OS files on disk C: and boot files on disk D:
    So, the second partition has boot files and is being active. MDT wizard wiped out this partition and installed OS there. Why?
    How to prevent it?

    Thank for replies.
    Keith Garner, my C: drive is my first partition for sure. Let me explain little bit more.
    What I had before:
    two partitions/volumes: 
    1st partition according to diskpart -- Volume C: -- 200GB size -- OS files (Windows, Program Files, etc.)
    2nd partition according to diskpart -- Volume D: -- 260Gb size -- Boot files (ntldr, boot.ini, etc) -- Active
    What I have after:
    1st partition -- Volume C: -- 200GB -- no files (seems to be formatted)
    2nd partition -- Volume D: -- 260GB -- old data is deleted, only new OS files (Windows, Program Files, etc) -- --- still Active
    fapw, yes I want to preserve second volume. And actually I do it. It works great except some old computers, that were prepared many years ago with boot files
    on the second partition.
    Unless you explicitly say to not create extra partitions your OSDisk is not the first partition.
    Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.

Maybe you are looking for