I have about 14 gbs of Other on my iPad. After searching, I notice that it is mostly photos. Years and years of photos. However, when I sync, I only sync the last 6 months. I have tried deleting all photos and syncing again. No luck. Any suggestions?

I have about 14 gbs of Other on my iPad. After searching, I notice that it is mostly photos. Years and years of photos. However, when I sync thru iTunes on my iMac, I only sync the last 6 months. I have tried deleting all photos and syncing again. No luck. Any suggestions?

Read the User Tip that razmee209 linked for you in the post above. If nothing in there works, there May be something on your iPad that is corrupt. Backup the iPad, restore to factory settings, and them restore the backup. If that doesn't fix it, restore as new and download all of your purchased content again.
Use iTunes to restore your iOS device to factory settings - Apple Support

Similar Messages

  • The calendar sync is recently not working correctly, not display "All events" but it only displays the last six months for my individual entries. My repeating entires do go back further, though. How do I fix?

    I have an iPad 5.1.1. The calendar sync has started to not work correctly. I have it checked "All events," but it only displays the last two months for my individual entries. My repeating entires do go back further, though. How do I fix?

    HI Jason269. Thanks for your reply, however I wrote that I already have "All events" checked. If All Events is checked and it doesn't diaplay all events, how do I fix? It seems this is a common issue, as I have read many others on here state the same problem.
    I believe my problem occurred when I synced my iMac calendar to my iPad calendar using yahoo. Yesterday, I unsynced them on my iMac controls. When I checked my iPad calendar, all of my old entries reappeared - but only for five seconds and disappeared again. So, the data is saved and still there but cannot be displayed, even when I have All events checked. In fact, it only shows my individual entries for the last two months, but does show all my recurring entries. If I switched to last six months, I will see everything for the last six months. If I switch back to all events, it is only for the last two months.
    As I mentioned, others on here have expressed exactly the same issue, including the two month example and having used yahoo.
    For legal purposes, I need to be able to use the information from my indidual calendar entries in an upcoming court case. So I really need to fix this ASAP!

  • HT1338 for the last 6 months my mac is crashing all the time. I think it is safari because firefox works fine. Any suggestions?

    for the last 6 months my mac is crashing all the time. I think it is safari because firefox works fine. Any suggestions?

    What is crashing, is it just Safari or is the entire computer freezing (if that's what you mean by crashing)? If the latter, are you saying it only happens when Safari is open?
    You need to explain with more detail just what is happening and when.
    Do you get a message to restart?

  • I'm unable to update my apps or download new apps to my Iphone. When I try I get a message "An unknown error has occurred".  It was happening before and after the last OS upgrade.  I've done a hard reboot with no effect.  Any suggestions???

    I'm unable to update my apps or download new apps to my Iphone. When I try I get a message "An unknown error has occurred".  It was happening before and after the last OS upgrade.  I've done a hard reboot with no effect.  Any suggestions???

    Have either of you had any luck with this issue.  It began happening to me today when I was trying to purchase music on iTunes.  I have purchased music and games in the past and have had no problem.  Any help would be appreciated.

  • HT204291 My AirPlay has suddenly stopped working!! I've been using it for the last 4 months, today I tried to watch a video from my iPad 2 iOS 5 and I have no AirPlay icon. Have also tried it on my iPhone 4 iso5 and also no icon on that. Please help.

    I have been using my appletv for the last 4 months, gone to ue it today and the airplay icon dose not appear on me ipad2 running iso5 where is has been. I have also tried on my iphone 4 running iso 5 and again no joy.
    I have compleated a soft reset on all devices and checked that they are all conected to the same wifi which they are.
    Can you Help

    Thanks Winston, restarting my router worked for me too. Seems that somehow the DCHP (maybe due to the Mountain Lion upgrade?) had assigned the same IP address to both the AppleTV and my iMac. The AppleTV stopped appearing as an AirPlay device for my iPhone and Mac, but still the AppleTV had Internet access.
    Restarting the router reassigned IPs and without fanfare, the AppleTV is now available to AirPlay.

  • I am getting a "blocked plug in" message and cannot watch videos. I have tried "deleting all" and uploading flash player again but it still doesn't work.

    blocked plug in message

    1. System Preferences >  Flash Player > Advanced >  Delete  All
         Press the "Delete All" button.
         Install Adobe Flash Player.
        http://get.adobe.com/flashplayer/
       Download it first.
       The next step is important.
       Click Safari in the menubar and select “Quit Safari”.
        Follow the prompts and install it.
        Restart computer. Relaunch Safari.
    2.  Allow  Plug-ins
        Safari > Preferences > Security
        Internet Plug-ins >  "Allow  plug-ins"
        Enable it.
    3. Safari > Preferences > Privacy
        Press the button “ Remove All Website Data”.

  • TS1139 I'm trying to process my first iPhoto order and I can't get past the fact it won't accept my telephone number. Thinking this may be a format glitch, I have tried to get around this but no success. Any suggestions? Yours in frustration:( CW

    I'm trying to process my first iPhoto order and I can't get past the fact it won't accept my telephone number. Thinking this may be a format glitch, I have tried to get around this by spacing but no success. I live in Australia and the prefix is +61.  Any suggestions welcome? Yours in frustration:( CW

    Experiment - or search these forums - someone discovered a solution and it was a format issue
    The US format for phone numbers is 10 digits  AAA-PPP-NNNN - you do not include the 01+ here typically - maybe if you can out your digites in that format it will work
    Hopefully someone from down under will tell how they do it
    LN

  • My default print size has changed to 130%.  I have tried everything to change it back to 100%.  Any suggestions?

    My Mac Mail default print size has somehow changed from 100% to 130%.  I have tried everything to change it back to 100% with no resolve.  Help!

    I'm using Tiger right now, but I believe Leopard is the same. Select Page Setup from the Menu. Input 100% in the Scale block. Then at the top of the Page Setup window, click the arrow on Settings & change from Page Attributes to Set As Default.
     Cheers, Tom

  • I'm missing thumbnails... have rebuilt twice... then did a permissions repair before I try and rebuild again... any suggestions?

    Need help with missing thumbnails...Iphoto11... have rebuilt twice, which took hours... rebuild works but when I close app and reopen, they are missing again.  Did a premission repair in disk utilty and Iphoto, getting ready to rebuild again to see if it sticks this time... if not, any suggestions?  I don't want to lose my images.  Thumbnails are blank, but clicking image shows they are there.... so I know they are still on the computer.... not sure what to try next????

    Download iPhoto Library Manager and use its rebuild function. This will create a new library based on data in the albumdata.xml file. Not everything will be brought over - no slideshows, books or calendars, for instance - but it should get all your albums and keywords back.
    Because this process creates an entirely new library and leaves your old one untouched, it is non-destructive, and if you're not happy with the results you can simply return to your old one.  

  • I installed the latest itunes 10.6.1. I get the error -42404 message saying a component was not installed anf I cannot sync my itouch. The last version worked fine...........any suggestions?

    I installed the latest version of itunes 10.6.1............I get the (-42404) error message and I cannot sync my itouch....any suggestions? Is Apple aware of this problem?

    In the course of your troubleshooting to date, have you tried a complete uninstall/reinstall as per the following documents?
    Removing and Reinstalling iTunes, QuickTime, and other software components for Windows XP
    Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7

  • I keep getting a message my computer is not authorized with the iTunes store when I try and sync my iPad. when i go to authorize it says it is the only computer authorized. tried reauthorizing and authorizing with no luck. any suggestions

    I keep getting an error message when i try and sync tv shows from my computer to my ipad. it says this computer is not authorized in the itunes store. it is my only computer authorized in the itunes store. i have authorized and deauthorized and authorized again but no luck. Any suggestions?

    Click here and follow the instructions.
    (91121)

  • I am trying to pair a Casio Gzone Ravine 2 to my IPad and not having much luck, any suggestions?

    iPad and phone pair but when I try to turn on connection IPad says not supported.

    For what purpose? The iPad only has the BT profiles for keyboards, speakers, headsets, car systems and sharing an internet connection. You can't transfer files over BT.

  • After an update to Mt.Lion, my iWeb was GONE, leaving me with my website on my host, but all my iWeb information on my computer was totally wiped out. I was able to load iWeb again, but I will have to start all over rebuilding my site...any suggestions?

    Has anyone else lost their entire iWeb information after upgrading to MT. Lion? I did manage to upload iWeb again, but it's like I've started all over with no data, so I will have to totally rebuild my site -if I ues iWeb-and upload the entier site again, and I have no guarantees that I won't lose it again.

    Did you do a clean install of Mt. Lion, i.e. an erase and install? If you didn't  do a clean instal check inside the User/Library/Applicatrion Support/iWeb folder to see if there's a file there named Domain.sites. 
    NOTE: In Lion and Mountain Lion the Home/Library folder is now invisible. To make it permanently visible enter the following in the Terminal application window: chflags nohidden ~/Library and press the Return key - 10.7: Un-hide the User Library folder.
    If you don't have a backup strategy then this would be a good time to start one.  The simplest to start is to use Time Machine with an external HD that's at least 1.5 times the size of your boot drive.
    OT

  • Only is the last value is in output instead of all

    report zexam.
    tables : mara, mbew, mard,t023t.
    type-pools:slis.
    data : ist_list_topofpage type slis_t_listheader.
    data : s_list_topofpage type slis_listheader.
    data : i_fieldcat type  slis_t_fieldcat_alv.
    data : x_fieldcat type slis_fieldcat_alv.
    **************************************selection options***********************
    select-options  mat_grp for mara-matkl.
    ********************selection from mara table*********************************
    data : it_mara type table of mara,
           wa_mara type mara.
    select matnr matkl from mara into corresponding fields of table it_mara
    where  matkl in mat_grp.
    loop at it_mara into wa_mara.
    endloop.
    ****************selection from mbew*******************************************
    data : it_mbew type table of mbew,
           wa_mbew type mbew.
    *if not wa_mara is initial.
    select matnr lbkum salk3 from mbew into corresponding fields of  table it_mbew
    where matnr = wa_mara-matnr.
    *endif.
    *loop at it_mbew into wa_mbew.
    *endloop.
    ********************grp desc from table v023***********************************************
    data : it_t023t type table of t023t,
           wa_t023t type t023t.
    *if not wa_mara is initial.
    select matkl wgbez spras from t023t into corresponding fields of table it_t023t
    where matkl = wa_mara-matkl and spras = 'EN'.
    *endif.
    *loop at it_t023t into wa_t023t.
    *endloop.
    *endloop.
    *endloop.
    ********************************itab for final output******************************************
    data : begin of it_final occurs 0,
           matkl like mara-matkl,
           lbkum like mbew-lbkum,
           salk3 like mbew-salk3,
           wgbez like t023t-wgbez,
           end of it_final.
    data : wa_final like it_final.
    loop at it_mara into wa_mara.
      wa_final-matkl = wa_mara-matkl.
      read table it_mbew into wa_mbew with key matnr = wa_mara-matnr.
      wa_final-lbkum = wa_mbew-lbkum.
      wa_final-salk3 = wa_mbew-salk3.
      read table it_t023t into wa_t023t with key matkl = wa_mara-matkl.
      wa_final-wgbez = wa_t023t-wgbez.
      append wa_final to it_final.
    endloop.
    **********************to display in ALV format*****************
    x_fieldcat-col_pos = 1.
    x_fieldcat-fieldname = 'MATKL'.
    x_fieldcat-seltext_m = 'MATERIAL GROUP'.
    append x_fieldcat to i_fieldcat.
    clear x_fieldcat.
    x_fieldcat-col_pos = 2.
    x_fieldcat-fieldname = 'WGBEZ'.
    x_fieldcat-seltext_m = 'MATERIAL GROUP DESC'.
    append x_fieldcat to i_fieldcat.
    clear x_fieldcat.
    x_fieldcat-col_pos = 3.
    x_fieldcat-fieldname = 'LBKUM'.
    x_fieldcat-seltext_m = 'TOTAL VALUED STOCK'.
    x_fieldcat-do_sum  = 'LBKUM' .
    append x_fieldcat to i_fieldcat.
    clear x_fieldcat.
    x_fieldcat-col_pos = 4.
    x_fieldcat-fieldname = 'SALK3'.
    x_fieldcat-seltext_m = 'VALUE OF STOCK(INR)'.
    x_fieldcat-do_sum  = 'SALK3' .
    append x_fieldcat to i_fieldcat.
    clear x_fieldcat.
    call function 'REUSE_ALV_LIST_DISPLAY'
      exporting
        it_fieldcat = i_fieldcat
      tables
        t_outtab    = it_final.
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:32 PM

    hi,
    pass the table name as well
    check this code
    tables : ekko,ekpo..
    type-pools slis.
    *data: i_ekko like  ekko occurs 0 with header line.
    data: begin of i_tab occurs 0,
          ebeln like ekko-ebeln,
          bukrs like ekko-bukrs,
          aedat like ekko-aedat,
          zterm like ekko-zterm,
          waers like ekko-waers,
          ebelp like ekpo-ebelp,
          TXZ01 like ekpo-txz01,
          menge like ekpo-menge,
          bprme like ekpo-bprme,
          netpr like ekpo-netpr,
          end of i_tab.
    ****Field description for ALV****
    DATA: fieldcatalog TYPE slis_t_fieldcat_alv WITH HEADER LINE,
          gd_tab_group TYPE slis_t_sp_group_alv,
          gd_layout    TYPE slis_layout_alv,
          gd_repid     LIKE sy-repid.
    DATA: repname LIKE sy-repid.
    DATA: fieldtab       TYPE slis_t_fieldcat_alv,
          fieldtab1      TYPE slis_t_fieldcat_alv,
          i_grid_title   TYPE lvc_title,
          heading        TYPE slis_t_listheader,
          f_events       TYPE slis_t_event,
          f1_event       TYPE slis_alv_event,
          gs_layout      TYPE slis_layout_alv.
    DATA:gt_sort TYPE slis_t_sortinfo_alv.
    DATA:gs_filter TYPE slis_t_filter_alv.
    select-options: s_ebeln for ekko-ebeln.
    *select EBELN BUKRS AEDAT ZTERM WAERS
    *into  corresponding fields of i_ekko from ekko where ebeln in s_ebeln.
    *append i_ekko.
    *endselect.
    start-of-selection.
    select a~ebeln a~bukrs a~aedat a~zterm a~waers
           b~ebelp b~txz01 b~txz01 b~menge b~bprme b~netpr
           into corresponding fields of table i_tab
           from ( ekko as a
           inner join ekpo as b on a~ebeln = b~ebeln ).
    perform alv_display.
    *loop at i_tab.
    *write:/ i_tab-ebeln,
    *        i_tab-bukrs,
    *        i_tab-aedat,
    *        i_tab-zterm,
    *        i_tab-waers,
    *        i_tab-ebelp,
    *        i_tab-txz01,
    *        i_tab-menge,
    *       i_tab-bprme,
    *       i_tab-netpr.
    *endloop.
    *&      Form  alv_display
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form alv_display .
    perform build_layout.
    perform build_fieldcatlog.
    PERFORM CALL_ALV.
    endform.                    " alv_display
    *&      Form  build_fieldcatlog
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form build_fieldcatlog .
    data l_fieldcat type slis_fieldcat_alv.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'EBELN'.
      l_fieldcat-outputlen   = 10.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-010.
      APPEND l_fieldcat TO fieldtab1.
      CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'BUKRS'.
      l_fieldcat-outputlen   = 4.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-011.
      APPEND l_fieldcat TO fieldtab1.
      CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'AEDAT'.
      l_fieldcat-outputlen   = 8.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-012.
      APPEND l_fieldcat TO fieldtab1.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'ZTERM'.
      l_fieldcat-outputlen   = 4.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-013.
      APPEND l_fieldcat TO fieldtab1.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'WAERS'.
      l_fieldcat-outputlen   = 5.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-014.
      APPEND l_fieldcat TO fieldtab1.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'EBELP'.
      l_fieldcat-outputlen   = 5.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-015.
      APPEND l_fieldcat TO fieldtab1.
      CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'TXZ01'.
      l_fieldcat-outputlen   = 40.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-016.
      APPEND l_fieldcat TO fieldtab1.
      CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'MENGE'.
      l_fieldcat-outputlen   = 15.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-017.
      APPEND l_fieldcat TO fieldtab1.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'BPRME'.
      l_fieldcat-outputlen   = 3.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-018.
      APPEND l_fieldcat TO fieldtab1.
    CLEAR l_fieldcat.
      l_fieldcat-fieldname = 'NETPR'.
      l_fieldcat-outputlen   = 13.
      l_fieldcat-tabname   = 'i_tab'.
      l_fieldcat-no_out    = ' '.
      l_fieldcat-seltext_l = text-019.
      APPEND l_fieldcat TO fieldtab1.
    endform.                    " build_fieldcatlog
    *&      Form  CALL_ALV
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form CALL_ALV .
    REPNAME = SY-REPID.
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    *   I_INTERFACE_CHECK                 = ' '
    *   I_BYPASSING_BUFFER                = ' '
    *   I_BUFFER_ACTIVE                   = ' '
       I_CALLBACK_PROGRAM                = REPNAME
    *   I_CALLBACK_PF_STATUS_SET          = ' '
    *   I_CALLBACK_USER_COMMAND           = ' '
    *   I_CALLBACK_TOP_OF_PAGE            = ' '
    *   I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
    *   I_CALLBACK_HTML_END_OF_LIST       = ' '
    *   I_STRUCTURE_NAME                  =
    *   I_BACKGROUND_ID                   = ' '
    *   I_GRID_TITLE                      =
    *   I_GRID_SETTINGS                   =
       IS_LAYOUT                         = gd_layout
       IT_FIELDCAT                       = fieldtab1
    *   IT_EXCLUDING                      =
    *   IT_SPECIAL_GROUPS                 =
    *   IT_SORT                           =
    *   IT_FILTER                         =
    *   IS_SEL_HIDE                       =
       I_DEFAULT                         = 'X'
       I_SAVE                            = ' '
    *   IS_VARIANT                        =
    *  IT_EVENTS                         = f_events
    *   IT_EVENT_EXIT                     =
    *   IS_PRINT                          =
    *   IS_REPREP_ID                      =
    *   I_SCREEN_START_COLUMN             = 0
    *   I_SCREEN_START_LINE               = 0
    *   I_SCREEN_END_COLUMN               = 0
    *   I_SCREEN_END_LINE                 = 0
    *   I_HTML_HEIGHT_TOP                 = 0
    *   I_HTML_HEIGHT_END                 = 0
    *   IT_ALV_GRAPHICS                   =
    *   IT_HYPERLINK                      =
    *   IT_ADD_FIELDCAT                   =
    *   IT_EXCEPT_QINFO                   =
    *   IR_SALV_FULLSCREEN_ADAPTER        =
    * IMPORTING
    *   E_EXIT_CAUSED_BY_CALLER           =
    *   ES_EXIT_CAUSED_BY_USER            =
      TABLES
        t_outtab                          = i_tab
    EXCEPTIONS
       PROGRAM_ERROR                     = 1
       OTHERS                            = 2
    IF sy-subrc <> 0.
    * MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
    *         WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
    ENDIF.
    endform.                    " CALL_ALV
    *&      Form  build_layout
    *       text
    *  -->  p1        text
    *  <--  p2        text
    form build_layout .
    gd_layout-zebra = 'X'.
    gd_layout-info_fieldname = 'ROWCOLOR'.
    endform.                    " build_layout
    thanks
    Code Formatted by: Alvaro Tejada Galindo on Jan 7, 2009 12:32 PM

  • Select only the last 12 months

    Hi all
    I need to write a query that will select only records from the last 12 months, order them by customer ID, and show one column per month, and a Total column where I need to add monthly Values.
    The table has the following fields
    •     YearMonth varchar(6)
    •     CustomerID varchar(15)
    •     Value integer
    Records example
    - 200809, 1, 10
    - 200809,2,20
    - 200808,1,15
    - 200808,2,12
    - 200501, ….
    I need to write a query and place it in a view that will select only records from the last 12 months, order them by customer ID, and show one column per month, and a Total column where I need to add monthly Values.
    The results should display the:
    •     CustomerID,
    •     one column per month displaying the Value
    • and the total column (sum monthly values for a customer)
    My questions are:
    •     How do I select records only from the last 12 months
    •     How do I name dynamically the columns, because today October,15 the list will start in November 2007 through October 2008, but next month it will move from December 2007 through October 2008
    •     How do I create a view with dynamic columns
    •     How do I create a column totals
    Please advice

    Hi,
    user631364 wrote:
    ... My questions are:
    •     How do I select records only from the last 12 monthsThere a a couple of things you could mean by "the last 12 months".
    Hkandpal showed you one way.
    Another is
    WHERE   yearmonth >= TO_CHAR (ADD_MONTHS (SYSDATE, -11), 'YYYYMM')
      AND   yearmonth <= TO_CHAR (            SYSDATE,       'YYYYMM')Storing DATEs in a VARCHAR2 column (or in any type of column other than DATE) is a bad idea. At best, it will involve lots of conversions, like those above.
    •     How do I name dynamically the columns, because today October,15 the list will start in November 2007 through October 2008, but next month it will move from December 2007 through October 2008
    •     How do I create a view with dynamic columns
    How to Pivot a Table with a Dynamic Number of Columns
    For example, you want to make a cross-tab output of
    the scott.emp table.
    Each row will represent a department.
    There will be a separate column for each job.
    Each cell will contain the number of employees in
         a specific department having a specific job.
    The exact same solution must work with any number
    of departments and columns.
    (Within reason: there's no guarantee this will work if you
    want 2000 columns.)
    PROMPT     ==========  0. Basic Pivot  ==========
    SELECT     deptno
    ,     COUNT (CASE WHEN job = 'ANALYST' THEN 1 END)     AS analyst_cnt
    ,     COUNT (CASE WHEN job = 'CLERK'   THEN 1 END)     AS clerk_cnt
    ,     COUNT (CASE WHEN job = 'MANAGER' THEN 1 END)     AS manager_cnt
    FROM     scott.emp
    WHERE     job     IN ('ANALYST', 'CLERK', 'MANAGER')
    GROUP BY     deptno
    ORDER BY     deptno
    PROMPT     ==========  1. Dynamic Pivot  ==========
    --     *****  Start of dynamic_pivot.sql  *****
    -- Suppress SQL*Plus features that interfere with raw output
    SET     FEEDBACK     OFF
    SET     PAGESIZE     0
    SPOOL     p:\sql\cookbook\dynamic_pivot_subscript.sql
    SELECT     DISTINCT
         ',     COUNT (CASE WHEN job = '''
    ||     job
    ||     ''' '     AS txt1
    ,     'THEN 1 END)     AS '
    ||     job
    ||     '_CNT'     AS txt2
    FROM     scott.emp
    ORDER BY     txt1;
    SPOOL     OFF
    -- Restore SQL*Plus features suppressed earlier
    SET     FEEDBACK     ON
    SET     PAGESIZE     50
    SPOOL     p:\sql\cookbook\dynamic_pivot.lst
    SELECT     deptno
    @@dynamic_pivot_subscript
    FROM     scott.emp
    GROUP BY     deptno
    ORDER BY     deptno
    SPOOL     OFF
    --     *****  End of dynamic_pivot.sql  *****
    EXPLANATION:
    The basic pivot assumes you know the number of distinct jobs,
    and the name of each one.  If you do, then writing a pivot query
    is simply a matter of writing the correct number of ", COUNT ... AS ..."\
    lines, with the name entered in two places on each one.  That is easily
    done by a preliminary query, which uses SPOOL to write a sub-script
    (called dynamic_pivot_subscript.sql in this example).
    The main script invokes this sub-script at the proper point.
    In practice, .SQL scripts usually contain one or more complete
    statements, but there's nothing that says they have to.
    This one contains just a fragment from the middle of a SELECT statement.
    Before creating the sub-script, remember to turn off SQL*Plus features
    that are designed to help humans read the output (such as headings and
    feedback messages like "7 rows selected.", since we do not want these
    to appear in the sub-script.
    Remember to turn these features on again before running the main query.
    •     How do I create a column totalsIn SQL*Plus, use the BREAK command.
    In SQL, "GROUP BY ROLLUP" or "GROUP BY GROUPING SETS"

Maybe you are looking for

  • Issues with connection busy functionality

    Here are a few things I've noticed with the busy connection functionality: If I want to right click in a SQL worksheet window while a tab has a query running (current or different tab) I get the "connection busy" error. Don't know why this is b/c rig

  • PHOTOSHOP CS4 SUITE START UP CRASH

    Hi everyone, I have a new system with windows 7 64bit with the latest updates of today. It as 8 gig of ram Video card x1950 512 meg with the latest ATI drivers. 500 gig hardrive which have 400 gig of space. Installation of the CS4 suite was install w

  • Eagle eyes web not working iOS 6

    i updated my iphone 3g to ios 6, i have a problem because eagle eyes web not working, appear message that push video is not compatible

  • Photoshop CS4 and nVidia 8600GT

    Just installed the latest nVidia drivers (190.38), and Photoshop CS4 (x64) keeps telling me to install the latest drivers in order to take advantage of graphics card acceleration. Why is that? What am I doing wrong? Running a GeForce 8600GT in Window

  • Loosing images when exporting to pdf file from Indesign?

    I didn't have this problem before, however as I started using the master page presets some of the pages are not saving properly to pdf version. The master sheets doesnt show up on some of the pages but shows up on others. Does anyone know why that is