Question on XMLTABLE related to XMLSEQUENCE

Hi Mark,
Easy one for you.
recently i tried XMLTABLE which i used as a replacement for TABLE(XMLSEQUENCE) which was used with versions lower than 10g R2.
here is the test.
SQL> create table xml(data clob)
  2  /
Table created.
SQL>
SQL> insert into xml values (
  2  '<DeptList>
  3      <Dept id="1">
  4            <name>XXX</name>
  5            <EMP id="111">
  6                 <name>XXX111</name>
  7            </EMP>
  8            <EMP id="112">
  9                 <name>XXX112</name>
10            </EMP>
11      </Dept>
12      <Dept id="2">
13            <name>YYY</name>
14            <EMP id="222">
15                 <name>yyy222</name>
16            </EMP>
17            <EMP id="333">
18                 <name>yyy112</name>
19            </EMP>
20      </Dept>
21    </DeptList>')
22  /
1 row created.
SQL>
SQL> set linesize 150
SQL> column deptid format 9999
SQL> column dname format a20
SQL> column empid format 9999
SQL> column ename format a20
SQL>
SQL> select
  2     cast(extractvalue(value(a), '/Dept/@id')  as number )      deptid
  3    ,cast(extractvalue(value(a), '/Dept/name') as varchar2(20)) dname
  4    ,cast(extractvalue(value(b), '/EMP/@id') as number)         empid
  5    ,cast(extractvalue(value(b), '/EMP/name') as varchar2(20))  ename
  6  from xml
  7  ,table(xmlsequence(extract(xmltype(data), '/DeptList/Dept'))) a
  8  ,table(xmlsequence(extract(value(a), '/Dept/EMP'))) b
  9  /
DEPTID DNAME                EMPID ENAME                                                                                                              
     1 XXX                    111 XXX111                                                                                                             
     1 XXX                    112 XXX112                                                                                                             
     2 YYY                    222 yyy222                                                                                                             
     2 YYY                    333 yyy112                                                                                                             
SQL> Sofar good. Now i want to replace the TABLE(XMLSEQUENCE) with XMLTABLE operator. I got success with the usage of one XMLTABLE. But when i have requirement for 2, i.e collection within a collection i could not succeed.
here is the one i tried.
select
   deptid, dname, empid, ename
from xml
  ,xmltable('/DeptList/Dept' passing xmltype(data)
           columns
           deptid  number        path   '/Dept/@id'
          ,dname   varchar2(20)  path   '/Dept/name')  a
  ,xmltable('/Dept/EMP' passing value(a)
           columns
           empid   number        path   '/EMP/@id'
          ,ename   varchar2(20)  path   '/EMP/name')
/How can i make reference to the first collection output to pass it on to the next one.

The following demonstrates using XMLTABLE with a Nested Collection
SQL> create or replace view DEPARTMENTS_XML of XMLType
  2  with object id
  3  (
  4    'DEPARTEMENTS'
  5  )
  6  as
  7  select xmlElement
  8         (
  9           "Departments",
10           xmlAgg
11           (
12             xmlElement
13             (
14               "Department",
15               xmlAttributes( d.DEPARTMENT_ID as "DepartmentId"),
16               xmlElement("Name", d.DEPARTMENT_NAME),
17               xmlElement
18               (
19                 "Location",
20                 xmlForest
21                 (
22                    STREET_ADDRESS as "Address", CITY as "City", STATE_PROVINCE as "State",
23                    POSTAL_CODE as "Zip",COUNTRY_NAME as "Country"
24                 )
25               ),
26               xmlElement
27               (
28                 "EmployeeList",
29                 (
30                   select xmlAgg
31                          (
32                            xmlElement
33                            (
34                              "Employee",
35                              xmlAttributes ( e.EMPLOYEE_ID as "employeeNumber" ),
36                              xmlForest
37                              (
38                                e.FIRST_NAME as "FirstName", e.LAST_NAME as "LastName", e.EMAIL as "EmailAddress",
39                                e.PHONE_NUMBER as "Telephone", e.HIRE_DATE as "StartDate", j.JOB_TITLE as "JobTitle",
40                                e.SALARY as "Salary", m.FIRST_NAME || ' ' || m.LAST_NAME as "Manager"
41                              ),
42                              xmlElement ( "Commission", e.COMMISSION_PCT )
43                            )
44                          )
45                     from HR.EMPLOYEES e, HR.EMPLOYEES m, HR.JOBS j
46                    where e.DEPARTMENT_ID = d.DEPARTMENT_ID
47                      and j.JOB_ID = e.JOB_ID
48                      and m.EMPLOYEE_ID = e.MANAGER_ID
49                 )
50               )
51             )
52           )
53         ) as XML
54    from HR.DEPARTMENTS d, HR.COUNTRIES c, HR.LOCATIONS l
55   where d.LOCATION_ID = l.LOCATION_ID
56     and l.COUNTRY_ID  = c.COUNTRY_ID
57  /
View created.
SQL> set lines 140
SQL> set long 4000
SQL> --
SQL> select * from DEPARTMENTS_XML
  2  /
SYS_NC_ROWINFO$
<Departments><Department DepartmentId="60"><Name>IT</Name><Location><Address>2014 Jabberwocky Rd</Address><City>Southlake</City><St
</State><Zip>26192</Zip><Country>United States of America</Country></Location><EmployeeList><Employee employeeNumber="103"><FirstNa
der</FirstName><LastName>Hunold</LastName><EmailAddress>AHUNOLD</EmailAddress><Telephone>590.423.4567</Telephone><StartDate>1990-01
tDate><JobTitle>Programmer</JobTitle><Salary>9000</Salary><Manager>Lex De Haan</Manager><Commission></Commission></Employee><Employ
eeNumber="105"><FirstName>David</FirstName><LastName>Austin</LastName><EmailAddress>DAUSTIN</EmailAddress><Telephone>590.423.4569</
<StartDate>1997-06-25</StartDate><JobTitle>Programmer</JobTitle><Salary>4800</Salary><Manager>Alexander Hunold</Manager><Commissio
ssion></Employee><Employee employeeNumber="106"><FirstName>Valli</FirstName><LastName>Pataballa</LastName><EmailAddress>VPATABAL</E
ss><Telephone>590.423.4560</Telephone><StartDate>1998-02-05</StartDate><JobTitle>Programmer</JobTitle><Salary>4800</Salary><Manager
r Hunold</Manager><Commission></Commission></Employee><Employee employeeNumber="107"><FirstName>Diana</FirstName><LastName>Lorentz<
<EmailAddress>DLORENTZ</EmailAddress><Telephone>590.423.5567</Telephone><StartDate>1999-02-07</StartDate><JobTitle>Programmer</Job
lary>4200</Salary><Manager>Alexander Hunold</Manager><Commission></Commission></Employee><Employee employeeNumber="104"><FirstName>
SYS_NC_ROWINFO$
rstName><LastName>Ernst</LastName><EmailAddress>BERNST</EmailAddress><Telephone>590.423.4568</Telephone><StartDate>1991-05-21</Star
bTitle>Programmer</JobTitle><Salary>6000</Salary><Manager>Alexander Hunold</Manager><Commission></Commission></Employee></EmployeeL
artment><Department DepartmentId="50"><Name>Shipping</Name><Location><Address>2011 Interiors Blvd</Address><City>South San Francisc
State>California</State><Zip>99236</Zip><Country>United States of America</Country></Location><EmployeeList><Employee employeeNumbe
FirstName>Matthew</FirstName><LastName>Weiss</LastName><EmailAddress>MWEISS</EmailAddress><Telephone>650.123.1234</Telephone><Start
-07-18</StartDate><JobTitle>Stock Manager</JobTitle><Salary>8000</Salary><Manager>Steven King</Manager><Commission></Commission></E
Employee employeeNumber="122"><FirstName>Payam</FirstName><LastName>Kaufling</LastName><EmailAddress>PKAUFLIN</EmailAddress><Teleph
23.3234</Telephone><StartDate>1995-05-01</StartDate><JobTitle>Stock Manager</JobTitle><Salary>7900</Salary><Manager>Steven King</Ma
mmission></Commission></Employee><Employee employeeNumber="121"><FirstName>Adam</FirstName><LastName>Fripp</LastName><EmailAddress>
mailAddress><Telephone>650.123.2234</Telephone><StartDate>1997-04-10</StartDate><JobTitle>Stock Manager</JobTitle><Salary>8200</Sal
ger>Steven King</Manager><Commission></Commission></Employee><Employee employeeNumber="124"><FirstName>Kevin</FirstName><LastName>M
SYS_NC_ROWINFO$
astName><EmailAddress>KMOURGOS</EmailAddress><Telephone>650.123.5234</Telephone><StartDate>1999-11-16</StartDate><JobTitle>Stock Ma
bTitle><Salary>5800</Salary><Manager>Steven King</Manager><Commission></Commission></Employee><Employee employeeNumber="123"><First
ta</FirstName><LastName>Vollman</LastName><EmailAddress>SVOLLMAN</EmailAddress><Telephone>650.123.4234</Telephone><StartDate>1997-1
rtDate><JobTitle>Stock Manager</JobTitle><Salary>6500</Salary><Manager>Steven King</Manager><Commission></Commission></Employee><Em
ployeeNumber="128"><FirstName>Steven</FirstName><LastName>Markle</LastName><EmailAddress>SMARKLE</EmailAddress><Telephone>650.124.1
phone><StartDate>2000-03-08</StartDate><JobTitle>Stock Clerk</JobTitle><Salary>2200</Salary><Manager>Matthew Weiss</Manager><Commis
mmission></Employee><Employee employeeNumber="127"><FirstName>James</FirstName><
SQL> select d.DEPARTMENT_ID, d.DEPARTMENT_NAME, e.*
  2   from DEPARTMENTS_XML,
  3        xmltable
  4        (
  5           '/Departments/Department'
  6           passing object_value
  7           columns
  8           DEPARTMENT_ID   number(4)    path '@DepartmentId',
  9           DEPARTMENT_NAME varchar2(32) path 'Name',
10           EMPLOYEES       xmlType      path 'EmployeeList/Employee'
11        ) d,
12        xmlTable
13        (
14          '/Employee'
15          passing d.EMPLOYEES
16          columns
17          EMPLOYEE_ID number path '@employeeNumber',
18          FIRST_NAME  varchar2(32) path 'FirstName',
19          LAST_NANE   varchar2(32) path 'LastName'
20        ) e
21  /
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           60 IT                                       103 Alexander                        Hunold
           60 IT                                       105 David                            Austin
           60 IT                                       106 Valli                            Pataballa
           60 IT                                       107 Diana                            Lorentz
           60 IT                                       104 Bruce                            Ernst
           50 Shipping                                 120 Matthew                          Weiss
           50 Shipping                                 122 Payam                            Kaufling
           50 Shipping                                 121 Adam                             Fripp
           50 Shipping                                 124 Kevin                            Mourgos
           50 Shipping                                 123 Shanta                           Vollman
           50 Shipping                                 128 Steven                           Markle
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           50 Shipping                                 127 James                            Landry
           50 Shipping                                 126 Irene                            Mikkilineni
           50 Shipping                                 125 Julia                            Nayer
           50 Shipping                                 180 Winston                          Taylor
           50 Shipping                                 181 Jean                             Fleaur
           50 Shipping                                 182 Martha                           Sullivan
           50 Shipping                                 183 Girard                           Geoni
           50 Shipping                                 129 Laura                            Bissot
           50 Shipping                                 130 Mozhe                            Atkinson
           50 Shipping                                 131 James                            Marlow
           50 Shipping                                 132 TJ                               Olson
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           50 Shipping                                 184 Nandita                          Sarchand
           50 Shipping                                 185 Alexis                           Bull
           50 Shipping                                 186 Julia                            Dellinger
           50 Shipping                                 187 Anthony                          Cabrio
           50 Shipping                                 133 Jason                            Mallin
           50 Shipping                                 134 Michael                          Rogers
           50 Shipping                                 135 Ki                               Gee
           50 Shipping                                 136 Hazel                            Philtanker
           50 Shipping                                 188 Kelly                            Chung
           50 Shipping                                 189 Jennifer                         Dilly
           50 Shipping                                 190 Timothy                          Gates
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           50 Shipping                                 191 Randall                          Perkins
           50 Shipping                                 137 Renske                           Ladwig
           50 Shipping                                 140 Joshua                           Patel
           50 Shipping                                 139 John                             Seo
           50 Shipping                                 138 Stephen                          Stiles
           50 Shipping                                 192 Sarah                            Bell
           50 Shipping                                 193 Britney                          Everett
           50 Shipping                                 194 Samuel                           McCain
           50 Shipping                                 195 Vance                            Jones
           50 Shipping                                 144 Peter                            Vargas
           50 Shipping                                 143 Randall                          Matos
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           50 Shipping                                 142 Curtis                           Davies
           50 Shipping                                 141 Trenna                           Rajs
           50 Shipping                                 196 Alana                            Walsh
           50 Shipping                                 199 Douglas                          Grant
           50 Shipping                                 197 Kevin                            Feeney
           50 Shipping                                 198 Donald                           OConnell
           10 Administration                           200 Jennifer                         Whalen
           30 Purchasing                               114 Den                              Raphaely
           30 Purchasing                               118 Guy                              Himuro
           30 Purchasing                               117 Sigal                            Tobias
           30 Purchasing                               119 Karen                            Colmenares
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           30 Purchasing                               115 Alexander                        Khoo
           30 Purchasing                               116 Shelli                           Baida
           90 Executive                                101 Neena                            Kochhar
           90 Executive                                102 Lex                              De Haan
          100 Finance                                  108 Nancy                            Greenberg
          100 Finance                                  112 Jose Manuel                      Urman
          100 Finance                                  111 Ismael                           Sciarra
          100 Finance                                  113 Luis                             Popp
          100 Finance                                  109 Daniel                           Faviet
          100 Finance                                  110 John                             Chen
          110 Accounting                               206 William                          Gietz
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
          110 Accounting                               205 Shelley                          Higgins
           20 Marketing                                202 Pat                              Fay
           20 Marketing                                201 Michael                          Hartstein
           40 Human Resources                          203 Susan                            Mavris
           80 Sales                                    148 Gerald                           Cambrault
           80 Sales                                    149 Eleni                            Zlotkey
           80 Sales                                    145 John                             Russell
           80 Sales                                    146 Karen                            Partners
           80 Sales                                    147 Alberto                          Errazuriz
           80 Sales                                    150 Peter                            Tucker
           80 Sales                                    151 David                            Bernstein
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           80 Sales                                    152 Peter                            Hall
           80 Sales                                    153 Christopher                      Olsen
           80 Sales                                    154 Nanette                          Cambrault
           80 Sales                                    155 Oliver                           Tuvault
           80 Sales                                    161 Sarath                           Sewall
           80 Sales                                    160 Louise                           Doran
           80 Sales                                    159 Lindsey                          Smith
           80 Sales                                    158 Allan                            McEwen
           80 Sales                                    157 Patrick                          Sully
           80 Sales                                    156 Janette                          King
           80 Sales                                    167 Amit                             Banda
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           80 Sales                                    166 Sundar                           Ande
           80 Sales                                    165 David                            Lee
           80 Sales                                    164 Mattea                           Marvins
           80 Sales                                    163 Danielle                         Greene
           80 Sales                                    162 Clara                            Vishney
           80 Sales                                    173 Sundita                          Kumar
           80 Sales                                    172 Elizabeth                        Bates
           80 Sales                                    171 William                          Smith
           80 Sales                                    170 Tayler                           Fox
           80 Sales                                    169 Harrison                         Bloom
           80 Sales                                    168 Lisa                             Ozer
DEPARTMENT_ID DEPARTMENT_NAME                  EMPLOYEE_ID FIRST_NAME                       LAST_NANE
           80 Sales                                    177 Jack                             Livingston
           80 Sales                                    176 Jonathon                         Taylor
           80 Sales                                    175 Alyssa                           Hutton
           80 Sales                                    174 Ellen                            Abel
           80 Sales                                    179 Charles                          Johnson
           70 Public Relations                         204 Hermann                          Baer
105 rows selected.
SQL>

Similar Messages

  • My question is Itunes related.  How do you prevent a playlist saved in Itunes from alphabetizing the song list created. I wanted to keep the original order, and somehow everything was alphabetized without requesting it.

    My question is Itunes related.  How do you prevent a playlist saved in Itunes from automatically alphabetizing the song list.   I had a specific order of songs that I wanted, and Itunes somehow automatically alphabetized them.  Is there a way to turn that feature off, and/or get them back to the original order?   I also noticed that once a playlist has been created, I cannot manually changed the order of the songs from my desktop..  Any suggestions?

    That's just the sort order. It's displaying the media alphabetically because you have clicked on the NAME column near the top of the iTunes window.
    Click on the little triangle above the column of numbers (usually on the far left side of the main iTunes window) and the media will sort in the order in which you added each item to the playlist.
    You can easily reorder songs within a playlist: Click and HOLD on the song you wish to move, then drag-and-drop it wherever you like.

  • Questions/conditions/needs related to the PBX

    Dear Cisco,
    I act on behalf of my boss who is planning a larger IT investment, but needs some background information.
    So far, we used an open-source free PBX, but after we've recognised its deficiencies, we decided to buy a commercial product.
    To tell the truth, we hesitate between some products, and we need some confirmations related to the concerned PBXs. One of them is Cisco.
    So our questions/conditions/needs are as follows:
    The PBX needs to be an IP PBX.
    Basic PBX features that we need: conferencing, video calling, voicemail, call queuing, IVR.
    The type of all the desktop phone we use is Grandstream GXP 2000. The PBX should be compatible with this device.
    We have a special corporate VoIP SIP phone ("softphone") developed by Ozeki's third party SDK. I am confident that we will continue to use this SDK, so the PBX should be compatible with this software.
    And the last one: we would like to use Android smartphones as the part of our telephone system, so the PBX should support mobile extensions.
    Please indicate if there is a solution that fulfills the above requirements. If so, please suggest me the proper product/service here or send me an e-mail to [email protected]
    I wanted to post this message here intentionally, because any further personal comments/experiences coming from the community would be appreciated.
    Best regards, 
    Donna E. Hill
    [email protected]

    hi
    try SQADB01
    regards
    thyagarajan

  • Design Question for table - related columns

    Hi,
    I have some design question about table I am working on.
    Here are the sample fields in the table,
    process_begin_date
    process_approved_by
    process_signed_by
    process_monitor
    process_communication
    the same way I have around 10 groups, for ex
    other_begin_date
    other_approved_by
    other_signed_by
    other_email
    other_something
    Question: Is good have all 50 fields in the same table? or any better idea?

    Hi,
    Number of columns should not be any issue, but, proper normalization may be better for your design and scalability. If you can explain what you are storing in this table, you might get help if you need to have more than 2 tables in this particular scenario.
    If all these fields are related to a single entity, probably this single table is already normalized and needs not to be replaced by two tables.
    Salman

  • A few questions from a relative newby.....

    Well, I've had this Ultra5 for a little while, and have started to do some upgrading. It's a 270mhz, with 640 Mb of ram, DVD-ROM, PGX24 card on the PCI bus, and a Belkin FU5220 UBS card....Both PCI cards are in 33mhz slots. I'm running Solaris 10.
    My problems center around the USB and the PGX24.
    The USB likes to lock up the computer whenever ANYTHING is plugged in (I've tried with a Microsoft usb trackball, and a Canon Powershot camera with no luck) If the item is plugged in during boot up, the computer will not start...If I hot plug the item, it crashes the computer. According to the I/O chart the Powershot is for sure supported....Any guesses?
    Second question. I just put in the PGX24 recently. I'd originally bought it for the E250 that I have yet to start playing with...But ended up putting it in the U5 so I could get rid of the color flashing and make movies/animations a little smoother. At first I had it plugged into the 66mhz slot and the U5 suddenly was really slow....After moving it to a 33mhz slot it seemed to pick up a little bit, but still has some issues....(dragging, and acting a little funny with forum text boxes) Is there a setting for this...(I'm thinking that it's some kind of issue with the 2D acceleration...it acts somewhat like the problems I had with Red Hat Linux and trying to get 3d accel to work) Oh, almost forgot, it seems to be about the same whether its at 1152x900 or 1280x1024...(at 24bit)..
    I'm afraid that I'm somewhat a newby yet, so don't know too much (just enough to be dangerous)...so go easy.... :)
    Catchya on the Flip Side.....
    Emerald Wolf -- argh...
    PS -- Oh, I know this isn't the right area, but I thought I'd just tag it on in case. Does anybody know where I can get a cheap SCSI DVD-ROM? I need one for the E250 since I don't have time to fight with a network install....

    I don't think there are any 66MHz slots in the Ultra5. According to the service manual they are all 33MHz.
    Later versions of the U5 motherboard had PGX24 graphics built-in. I did install a PGX64 card in a U5 and it did seem to make a difference which slot it was in although I don't understand why, they all should be the same.

  • Pls send Some good question and answer related to FI

    Hi Gurus,
    Pls. send some <b>good question and answer</b> .i need urgently.
    Pls help me.
    regds
    Mahesh K Singh

    Hello
    Sent.
    Material collected from the following link
    http://www.sap-basis-abap.com/sapfi.htm
    Reg
    *assign points if useful

  • Three questions...related sharing,updating etc

    Sir! I have more than one questions...please solve them
    1>I connected my iPad with windows 8 PC through USB wire but I am unable to transfer the matters frm PC to my iPad model A1455..
    2>I want to update my ios 6 with ios7..but in setting>general>software update no any link is highlighted..and at this time only400mb data is remaining...is iOS 7 is the size of 1GB on downloading..
    3>I have iPad mini of model A1455 and version 6 but I could not find its generation...

    1>I connected my iPad with windows 8 PC through USB wire but I am unable to transfer the matters frm PC to my iPad model A1455..
    Please explain in more detail.
    2>I want to update my ios 6 with ios7..but in setting>general>software update no any link is highlighted..and at this time only400mb data is remaining...is iOS 7 is the size of 1GB on downloading..
    Again, please explain in more detail. Don't know what you mean by "no any link is highlighted," and not sure what the issue is.
    3>I have iPad mini of model A1455 and version 6 but I could not find its generation...
    See Model Identifier Utility

  • Workflow question: WS - TS relation ?  how to identify which one?

    Hi everyone,
    I need to activate a PO workflow, every PO created should be "ordered" by a purchaser.
    How can I accomplish this ?   I thought activate the event: ws140000089 (one step po approval).  But how can I identify the "ts" task ?   In this case, the purchaser should approve every PO created.
    How do you identify the worklow - task relation ?   or do you know how can I accomplish this ?
    Thanks guys and Merry Christmas =)
    Regards,
    Diego

    Hi Diego,
    Go to tcode PFTC_DIS, Select Workflow Template from Drop down, then type in 140000089, Click on Display. Then, Click on Workflow Builder in the next screen.
    In the following screen, You should be able to figure out TS the Dialog workflow task which carries the workitem to the purchaser for their approval.
    Try this and if you need further help, pls let me know.
    Otherwise, if you are working with workflow developers, they should be able to help you.
    Thanks,
    Jay

  • String to Byte convertion related question. SMS related

    Hi all
    I need to ask more indepth question regarding string to bytes convertion. I need to have a constructed message format with a length of 161 bytes. Here's are the details:-
    String message - 160 bytes allocation.
    Message length - 1 byte allocation.
    For converting the message string into byte I can use
    byte b1[] = message.getBytes();
    And i know to get the length of the message I can just use
    message.length();
    So my questions are :-
    1) I need some help on how i'm supposed to convert the length message values and assign it into the message length variables which have 1 byte allocation.
    2) Besides text, the message string can also be a hex value data. Hence it it possible that I can convert the hex data into byte and still maintain within the 160 bytes allocation ? Coz most of the times the hex data length will be > 160 but < 255 characters length. example :-
    06050415810000024a3a7d35bd35bdb995e535bd41c9bd89b194040082986417614819817624e3105d85206605e09390391394417817817819817824e40e44e5104a04a04a05205105d85206605d8938c417614819817824e40e44e5105e05e05e06605e093903913944128128128148146800
    Anyone can help ?
    Thank You in Advanced

    First of all. One character in a string can occupie
    more than one byte in the destination array, so
    String.length can be != bytes.length.
    A byte in java is always signed, so the value will be
    in the range -128 to +127.
    KajHi Kaj,
    Since you put it in that way, is there any tips u can give me on how I'm supposed to calculate the length of the string and set the value in byte ?
    Or do I need to convert the string into bytes array first and then get the length ?
    Thanks

  • Bit of an odd upgrade question (not iPhone related I swear!).

    Alright, so here is the situation. I will be the first to say I suck at figuring out the hows and whys of these things. I am hoping some of you are Verizon gurus and can explain this all to me.
    Right now I am rocking an HTC Touch Pro 2, nifty phone, for its time it was a beast, lost its edge to the Droid behemoth these days though. Anyways I am looking to upgrade. I was mulling around the idea of an iPhone but have decided against it. I did however go to the page and plugged in the information to buy an iPhone, despite my new every two/upgrade period still being six months away it said my line was eligible for an upgrade and was going to give me the promo price of $199/299 to get locked into another two year contract. I also recall recieving a text a while back saying I could do the same thing for the Droid X.
    My question is, is this promotion limited to certain phones? I really have my eye set on the Thunderbolt and I am wondering if when that phone hits it will let me lock myself into a new 2 year contract for the promo price of that phone like it would have the Droid X and iPhone.
    Thanks in advance for your help!

    Sounds like you ARE eligible for your annual upgrade (are you the primary, or only line on the account? IS you base plan $49.99 or more per month?)
    You can get the 2 yr promo pricing on a new phone, you lose any additional $30 or $50 credit you may be eligible for, and there is a $20 upgrade fee. For some, it's worth that to get the early upgrade at 12 months rather than 20 months on a 2 year contract.

  • 2 questions in one - Related to Excel Microsoft Query

    Hi ALL ,
    i want to schedule a microsoft query script to run at 4:36 am Daily and save the workbook as Remedy in a defined path  .After an hour the Remedy Excel should automatically get deleted.
    Task flow
    Excel -- > ODBC --> Remedy DB ---> Data -- > SSIS --- > Load Excel Data to Sql Server ..
    Am not able to use SSIS for this as the Data loading is taking huge amount of time using ODBC whereas excel is very fast in retrieving the Data .
    Q How can i query the current date in ODBC .
    i have tried this:
    Where ("HPD:Help Desk"."Last Modified Date" = {fn current_date()}) but its not working ( Error Message lexical 3700 not found)
    Where ("HPD:Help Desk"."Reported Date">={ts '2014-01-01 00:00:00'}) ( am using this for now )
    Please help am a newbie in excel
    Thanks
    Priya

    In Microsoft query ,we should use date() to get the current date.
    Try: Where ("HPD:Help Desk"."Reported Date">=date())
    Also please check if the method listed in the following thread is helpful:
    http://www.mrexcel.com/forum/excel-questions/479250-odbc-query-current-date.html

  • PDF Page count question (not coding related)

    Vista has numerous types of details it can display and sort with (size, date modified, etc.).
    I found "pages" in that list but it doesn't seem to be intended for pdf files.
    Can windows (or another software solution) display the page count of individual pdf files when viewing a folder containing multiple pdf's?  If so, how do I get that rolling?
    Thanks.
    Jake

    CoachW:
    Welcome to the Apple Discussions. You're right, the minimum number of pages is 20, single or double sided. You will get 4 blank pages at the end. You can check it out by going thru the ordering process and after the book if finished assembling and you're at the next window, do the following to find and copy the pdf file that iPhoto creates to upload and print:
    How to Find the iPhoto Generated PDF File:
    1 - Start the ordering process and stop after the book has been assembled and you get to the Order pane where you select the cover color, copies, etc.
    2 - Go to the Finder and select the Go->Go to Folder menu item (CommandShiftG).
    3 - copy the following, “/private/var/tmp/folders.501/TemporaryItems/iPhoto” (for Panther the path is "/private/tmp/501/TemporaryItems/iPhoto“), and paste into the Go to Folder search box.
    4 - the iPhoto folder will be brought up. In it will be the PDF file that was generated by iPhoto. You can copy it (Option-drag) to the Desktop to review and/or save.
    Note: the iPhoto folder will not exist before you start the ordering process and is deleted after the order is completed or after you cancel the order and quit iPhoto.
    You can then cancel the operation if you're not happy with the result.

  • Module pool question -table control related

    Hi All,
    I have table control with field mark some input enabled fields in it Now the problem is  when i change the content of one row and select that row then control goes to modue in PAI which is called on ON REQUEST but the changed vaule is not capturing in it only slected row with previous content come in that module . Can u suggest some solution or neccessary setting to be done in attribute of tabe control?
    If possible provide code for it
    Thanks
    Parag

    Hi,
       Please go through the following code below to solve your issue.
    REPORT demo_dynpro_tabcont_loop_at.
    CONTROLS flights TYPE TABLEVIEW USING SCREEN 100.
    DATA: cols LIKE LINE OF flights-cols,
          lines TYPE i.
    DATA: ok_code TYPE sy-ucomm,
          save_ok TYPE sy-ucomm.
    DATA: itab TYPE TABLE OF demo_conn.
    TABLES demo_conn.
    *SELECT * FROM spfli INTO CORRESPONDING FIELDS OF TABLE itab.*
    LOOP AT flights-cols INTO cols WHERE index GT 2.
      cols-screen-input = '0'.
      MODIFY flights-cols FROM cols INDEX sy-tabix.
    ENDLOOP.
    CALL SCREEN 100.
    MODULE status_0100 OUTPUT.
      SET PF-STATUS 'SCREEN_100'.
      DESCRIBE TABLE itab LINES lines.
      flights-lines = lines.
    ENDMODULE.
    MODULE cancel INPUT.
      LEAVE PROGRAM.
    ENDMODULE.
    MODULE read_table_control INPUT.
      MODIFY itab FROM demo_conn INDEX flights-current_line.
    ENDMODULE.
    MODULE user_command_0100 INPUT.
      save_ok = ok_code.
      CLEAR ok_code.
      CASE save_ok.
        WHEN 'TOGGLE'.
          LOOP AT flights-cols INTO cols WHERE index GT 2.
            IF  cols-screen-input = '0'.
              cols-screen-input = '1'.
            ELSEIF  cols-screen-input = '1'.
              cols-screen-input = '0'.
            ENDIF.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDLOOP.
        WHEN 'SORT_UP'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) ASCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'SORT_DOWN'.
          READ TABLE flights-cols INTO cols WITH KEY selected = 'X'.
          IF sy-subrc = 0.
            SORT itab STABLE BY (cols-screen-name+10) DESCENDING.
            cols-selected = ' '.
            MODIFY flights-cols FROM cols INDEX sy-tabix.
          ENDIF.
        WHEN 'DELETE'.
          READ TABLE flights-cols INTO cols WITH KEY screen-input = '1'.
          IF sy-subrc = 0.
            LOOP AT itab INTO demo_conn WHERE mark = 'X'.
              DELETE itab.
            ENDLOOP.
          ENDIF.
      ENDCASE.
    ENDMODULE.

  • Question ( command line related )

    How do you execute a .jar file on Windows without having the command line opening along with your program ? For Instance I am using a bat file that executes this command 'java -jar wahiki.jar' but when I click on it the program opens normally but the dos window remains. How can I avoid that ? Thanks a lot

    Are you doing this from a batch file? If so, then you're going to see the command prompt window, regardless of the fact that you use javaw instead of java. (Oh, yes you are, I see now that I read your original post again).
    By the way, you can also start your program by double-clicking on the executable JAR file in Windows, which is equivalent to running the command: javaw -jar myprogram.jar
    Message was edited by:
    jesperdj

  • Two unrelated questions, both finder related

    1) in the sidebar under "places" you can put your own bookmarks, etc. That's great. Unfortunately, I have a bunch of folders that all have the same name, but different locations, and I'd like to bookmark all of them. Is it possible to re-name the bookmark to something different than the name of the folder or file?
    1 B) Is it possible to have a hierarchical structure to the bookmarks? So I can have a folder with a bunch of bookmarks in it? Currently I make folders somewhere and stick links to the things I want bookmarked, but if there was a better way...
    2) now that I'm using 10.5, I use spaces. A LOT. Sometimes a window will throw up an error, or some other dialog, and everything will shift to the new window. Too often this happens when I'm in the middle of typing something, or whatever. Somecimes I don't even notice until I've hit return and made the dialog go away, or typed my password into an unsecure window or something.
    Is there a way to make this stop?
    Thanks

    Brian Postow wrote:
    2) now that I'm using 10.5, I use spaces. A LOT.
    O Man ‘Spaces’ is SO COOL and I missed having them. To make a long story short, my first Computer was a 1981 Tandy Coco running Microware's OS-9/6809 Level I. OS-9 was Unix Clone and a real-time, process-based, multitasking, multi-user, Operating System that used software paged memory management to access up to 64K of RAM in 8K Blocks. I could create 8 ‘Spaces’ to run 8 Applications at a time. At the time NO OTHER Computer could do that!
    Sometimes a window will throw up an error, or some other dialog, and everything will shift to the new window. Too often this happens when I'm in the middle of typing something, or whatever. Somecimes I don't even notice until I've hit return and made the dialog go away, or typed my password into an unsecure window or something.
    Well I know how you fell when that happens, so open 'System Preferences' and click on 'Universal Access'. Now click on the 'Hearing' tab and check 'Flash the screen when an alert sound occurs'. Then click the 'Flash Screen' test button to see how this works. This will 'Flash' your screen on ANY ERRORS! Now click the 'Adjust Volume...' tab and then 'Choose an alert sound' by clicking them. Picking a really annoying sound helps.
    If that's not enough to rise an Eye Brow then add a 'Voice Announcement' as well. Just click 'Speech', from 'System Preferences', then the 'Text to Speech' tab. Select the 'Announce when alerts are displayed' checkbox, and then click 'Set Alert Options...' to set the 'Voice', 'Phrase' and 'Delay' options. To hear the computer announce when an application needs you to do something, select the 'Announce when an application requires your attention' checkbox.
    Is there a way to make this stop?
    Hmm, the only way to STOP IT is to STOP USING IT!
    I hope this helps.
    Later ...
    !http://homepage.mac.com/buzzlightgear/Buzz.tiff!
    Buzz

Maybe you are looking for

  • Best Method For Parent/Child Form Interaction

    Can anyone advise the best way to achieve the following? * I have two forms * Form1 creates an instance of Form2 * A user action on Form2 will affect a change on Form1 At the moment, when Form1 creates Form2, it adds an event handler to a method with

  • How do you copy an equation from grapher and paste it into numbers?

    Hi, my free trial for Mathtype ran out but I still need to be able to write equations and copy them into pages and numbers for my coursework. Is there a free alternative to Mathype that also carries out this function? Or, alternatively, is there a wa

  • How do I register an iphone5 number to work on my ipad

    How do I register an iphone5 phone number to work for i-messaging on my ipad mini 2 ?

  • Stop Skype Automatic Update

    I know there have already been threads for this, but I've looked, tried many solutions, and today skype once again downgraded itself to a newer version without my consent. Here are the steps I've taken to stop automatic updates: - Disable automatic u

  • Error 1406 when Installing VPN Client

    I am attempting to install a VPN client on a customers computer and getting "Error 1406" and that it doesn't have the ability to access certain registry keys. I am logged in as an administrator in Windows 7 64 bit.  What could be causing this problem