Datatypes in InterfaceObjects

Hi,
  Today while creating a scenario just gone through types of datatypes avaliable in while creating datastructure. And suprised to see it was around 44 as mentioned below.
<b>xsd:string>>use:to specify string >> value:" Hi"</b>
<b>xsd:integer>>use: to specify integer>>value:123</b>
<b>xsd:boolean>>use: to specify boolen value>>value:true/false or 0or1</b>
<b>xsd:short>>use:to specify short value>>value:123
xsd:byte>>use:to specify byte value>>value:123
xsd:float>>use:to specify integer with decimal>>value:123.05
xsd:base64Binary>>use:to specify base64Binary>>value:456789AB
xsd:hexBinary>>use:to specity the binaaryvalue>>value:010101</b>
xsd:decimal
<b>xsd:double>>use:tospecify double value>>value:-3.140...0E+02
xsd:time>>use:to specify the time>>value:20:15:01
xsd:dateTime>>use:to specify the timewithdate>>value:2002-02-0420:15:01</b>xsd:duration
<b>xsd:date>>use:to specify the date>>value:2002-02-04</b>
xsd:gMonth
xsd:gYear
xsd:gYearMonth
xsd:gDay
xsd:gMonthDay
xsd:QName
xsd:anyURI
xsd:NOTATION
xsd:normalizedString
xsd:token
xsd:unsignedByte
xsd:positiveInteger
xsd:negativeInteger
xsd:nonNegativeInteger
xsd:nonPositiveInteger
xsd:int
xsd:unsignedInt
xsd:long
xsd:unsignedLong
xsd:unsignedShort
xsd:Name
xsd:NCName
xsd:language
xsd:ID
xsd:IDREF
xsd:IDREFS
xsd:ENTITY
xsd:ENTITIES
xsd:NMTOKEN
If don't mine like to know the details when we will be using and few which I marked in bold was know by me as it was come in common scenario.  Like to know the same way which would be help for me in future reference.
the below is not given much detail i suppose
http://help.sap.com/saphelp_nw04/helpdata/en/a5/04623c4f69b712e10000000a114084/content.htm
http://help.sap.com/search/highlightContent.jsp
Regards,
Senthil.

Hi,
<b>anyURI</b>
The data must conform to the syntax of a Uniform Resource Identifier (URI), as defined in RFC 2396 as amended by RFC 2732. Example: "http://www.nmt.edu/tcc/" is the URI for the New Mexico Tech Computer Center's index page.
<b>base64Binary</b>
Represents a sequence of binary octets (bytes) encoded according to RFC 2045, the standard defining the MIME types (look under “6.8 Base64 Content-Transfer-Encoding”).
<b>boolean</b>
A Boolean true or false value. Representations of true are "true" and "1"; false is denoted as "false" or "0".
<b>byte</b>
A signed 8-bit integer in the range [-256, 255]. Derived from the short datatype.
<b>date</b>
Represents a specific date. The syntax is the same as that for the date part of dateTime, with an optional time zone indicator. Example: "1889-09-24".
<b>dateTime</b>
Represents a specific instant of time. It has the form YYYY-MM-DDThh:mm:ss folowed by an optional time-zone suffix.
YYYY is the year, MM is the month number, DD is the day number, hh the hour in 24-hour format, mm the minute, and ss the second (a decimal and fraction are allowed for the seconds part).
The optional zone suffix is either "Z" for Universal Coordinate Time (UCT), or a time offset of the form "hh:mm", giving the difference between UCT and local time in hours and minutes.
Example: "2004-10-31T21:40:35.5-07:00" is a time on Halloween 2004 in Mountain Standard time. The equivalent UCT would be "2004-11-01T02:40:35.5Z".
<b>decimal</b>
Any base-10 fixed-point number. There must be at least one digit to the left of the decimal point, and a leading "" or "-" sign is allowed. Examples: "42", "-3.14159", "0.004".
<b>double</b>
A 64-bit floating-point decimal number as specified in the IEEE 754-1985 standard. The external form is the same as the float datatype.
<b>duration</b>
Represents a duration of time, as a composite of years, months, days, hours, minutes, and seconds. The syntax of a duration value has these parts:
If the duration is negative, it starts with "-".
A capital "P" is always included.
If the duration has a years part, the number of years is next, followed by a capital "Y".
If there is a months part, it is next, followed by capital "M".
If there is a days part, it is next, followed by capital "D".
If there are any hours, minutes, or seconds in the duration, a capital "T" comes next; otherwise the duration ends here.
If there is an hours part, it is next, followed by capital "H".
If there is a minutes part, it is next, followed by capital "M".
If there is a seconds part, it is next, followed by capital "S". You can use a decimal point and fraction to specify part of a second.
Missing parts are assumed to be zero. Examples: "P1347Y" is a duration of 1347 Gregorian years; "P1Y2MT2H5.6S" is a duration of one year, two months, two hours, and 5.6 seconds.
<b>
float</b>
A 32-bit floating-point decimal number as specified in the IEEE 754-1985 standard. Allowable values are the same as in the decimal type, optionally followed by an exponent, or one of the special values "INF" (positive infinity), "-INF" (negative infinity), or "NaN" (not a number).
The exponent starts with either "e" or "E", optionally followed by a sign, and one or more digits.
Example: "6.0235e-23".
<b>gDay</b>
A day of the month in the Gregorian calendar. The syntax is "-DD" where DD is the day of the month. Example: the 27th of each month would be represented as "-27".
<b>gMonth</b>
A month number in the Gregorian calendar. The syntax is "MM", where MM is the month number. For example, "06" represents the month of June.
<b>gMonthDay</b>
A Gregorian month and day as "MM-DD". Example: "07-04" is the Fourth of July.
<b>gYear</b>
A Gregorian year, specified as YYYY. Example: "1889".
<b>gYearMonth</b>
A Gregorian year and month. The syntax is YYYY-MM. Example: "1995-08" represents August 1995.
<b>hexBinary</b>
Represents a sequence of octets (bytes), each given as two hexadecimal digits. Example: "0047dedbef" is five octets.
<b>ID</b>
A unique identifier as in the ID attribute type from the XML standard.
Derived from the NCName datatype.
<b>IDREF, IDREFS</b>
An IDREF value is a reference to a unique identifier as defined under attribute types in the XML standard. An IDREFS value is a space-separated sequence of such references.
Derived from the NCName datatype.
<b>int</b>
Represents a 32-bit signed integer in the range [-2,147,483,648, 2,147,483,647]. Derived from the long datatype.
<b>integer</b>
Represents a signed integer. Values may begin with an optional "+" or "-" sign. Derived from the decimal datatype.
<b>language</b>
One of the standardized language codes defined in RFC 1766. Example: "fj" for Fijian. Derived from the token type.
<b>long</b>
A signed, extended-precision integer; at least 18 digits are guaranteed. Derived from the integer datatype.
<b>Name</b>
A name as defined in the XML standard:. The first character can be a letter or underbar “_”, and the remaining characters may be letters, underbars, hyphen “-”, period “.”, or colon “:”.
Derived from the token datatype.
<b>NCName</b>
The local part of a qualified name. See the NCName definition in the document Namespaces in XML.
Derived from the name datatype.
<b>negativeInteger</b>
Represents an integer less than zero. Derived from the nonPositiveInteger datatype.
<b>NMTOKEN, NMTOKENS</b>
Any sequence of name characters, defined in the XML standard: letters, underbars “_”, hyphen “-”, period “.”, or colon “:”.
A NMTOKENS data value is a space-separated sequence of NMTOKEN values.
Derived from the NMTOKEN datatype.
<b>nonNegativeInteger</b>
An integer greater than or equal to zero. Derived from the integer datatype.
<b>nonPositiveInteger</b>
An integer less than or equal to zero. Derived from the integer datatype.
<b>normalizedString</b>
This datatype describes a “normalized” string, meaning that it cannot include newline (LF), return (CR), or tab (HT) characters.
Derived from the string type.
<b>positiveInteger</b>
An extended-precision integer greater than zero. Derived from the nonNegativeInteger datatype.
<b>QName</b>
An XML qualified name, such as "xsl:stylesheet".
<b>short</b>
A 16-bit signed integer in the range [-32,768, 32,767]. Derived from the int datatype.
<b>string</b>
Any sequence of zero or more characters.
<b>time</b>
A moment of time that repeats every day. The syntax is the same as that for dateTime, omitting everything up to and including the separator "T". Examples: "00:00:00" is midnight, and "13:04:00" is an hour and four minutes after noon.
<b>token</b>
The values of this type represent tokenized strings. They may not contain newline (LF) or tab (HT) characters. They may not start or end with whitespace. The only occurrences of whitespace allowed inside the string are single spaces, never multiple spaces together. Derived from normalizedString.
<b>unsignedByte</b>
An unsigned 16-bit integer in the range [0, 255]. Derived from the unsignedShort datatype.
<b>unsignedInt</b>
An unsigned 32-bit integer in the range [0, 4,294,967,295]. Derived from the unsignedLong datatype.
<b>unsignedLong</b>
An unsigned, extended-precision integer. Derived from the nonNegativeInteger datatype.
<b>unsignedShort</b>
An unsigned 16-bit integer in the range [0, 65,535]. Derived from the unsignedInt datatype.
<b></b>
anything missing ?
regards,
Robin

Similar Messages

  • Clob DataType, NULL and ADO

    Hello,
    First, I'm french so my english isn't very good
    I have a problem with Oracle Clob DataType. When I try to put NULL value to
    CLOB DataType with ADO, changes aren't not made.
    rs.open "SELECT ....", adocn, adOpenKeyset, adLockOptimistic
    rs.Fields("ClobField") = Null ' In this case, the Update doesn't work
    rs.update
    rs.Close
    This code works if I try to write a value which is different than Null but
    not if is equal to Null. Instead of having Null, I have the old value
    (before changes), the update of the field doesn't work.

    I experience the same, did you find a solution to your problem?
    Kind regards,
    Roel de Bruyn

  • Not seeing a DataType.ICON request when browsing with Adobe Bridge?

    Hi All,
    I have followed the instructions in the "Customizing the UI->Displaying Thumbnails" section of the Adobe Drive SDK documents, but I have a problem. When I browse through my drive with Adobe Bridge, I am not getting the expected request for DataType.ICON for any of my items; when I call item.getDataTypes() from my
    IGetAssetsHandler, I only see the DataTypes [BASIC, ASSET_PROPERTY].
    Any ideas as to why this might be is happening?

    In your ConnectHandler implementation, add the following capability:
    capabilities.add(Capability.READ_XMP_METADATA);
    I spent a week to figure it out.

  • Query results: which kind of datatype?

    Hi to all,
    I have a query which returns more more more records. I must insert this records in a string that i have to return from a function ( i have to invoke this procedure from an application visual basic 6).
    What kind of datatype i have to use? Long datatype is small for me (and for my demand i cannot use clob).
    Maybe i could return from a function (for example) a string that is concatenation of more than 2 long datatype! But could i do this? And, if yes, how could i declare my procedure (or function)?
    Thanks
    Edited by: user635881 on 8-ott-2008 11.09
    Edited by: user635881 on 8-ott-2008 11.20

    This is my code:
    declare
    risultati LONG;*
    i number;
    TYPE t_cur IS REF CURSOR;
    TYPE type_rec IS RECORD (...more code...more code...);
    cur  t_cur;
    bilancio_def_entry   type_rec;
    BEGIN
    OPEN cur FOR
    SELECT q.codicepool, q.codicefisico, q.denominazione,
    q.tipoedificio, q.tipoimpianto, q.stationtypecaminus, q.codiceateco,
    +...more code ...more code...+
    --end of select;+     
    risultati:='';
    LOOP
    FETCH cur INTO bilancio_def_entry;
    EXIT WHEN cur%NOTFOUND;
    if bilancio_def_entry.codicepool is null then
    bilancio_def_entry.codicepool := bilancio_def_entry.codicefisico;
    end if;
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita1)) || ';' || trim(to_char( bilancio_def_entry.energia1)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato1)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita2)) || ';' || trim(to_char( bilancio_def_entry.energia2)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato2)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita3)) || ';' || trim(to_char( bilancio_def_entry.energia3)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato3)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita4)) || ';' || trim(to_char( bilancio_def_entry.energia4)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato4)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita5)) || ';' || trim(to_char( bilancio_def_entry.energia5)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato5)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita6)) || ';' || trim(to_char( bilancio_def_entry.energia6)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato6)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita7)) || ';' || trim(to_char( bilancio_def_entry.energia7)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato7)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita8)) || ';' || trim(to_char( bilancio_def_entry.energia8)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato8)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita9)) || ';' || trim(to_char( bilancio_def_entry.energia9)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato9)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita10)) || ';' || trim(to_char( bilancio_def_entry.energia10)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato10)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita11)) || ';' || trim(to_char( bilancio_def_entry.energia11)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato11)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita12)) || ';' || trim(to_char( bilancio_def_entry.energia12)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato12)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita13)) || ';' || trim(to_char( bilancio_def_entry.energia13)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato13)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita14)) || ';' || trim(to_char( bilancio_def_entry.energia14)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato14)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita15)) || ';' || trim(to_char( bilancio_def_entry.energia15)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato15)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita16)) || ';' || trim(to_char( bilancio_def_entry.energia16)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato16)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita17)) || ';' || trim(to_char( bilancio_def_entry.energia17)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato17)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita18)) || ';' || trim(to_char( bilancio_def_entry.energia18)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato18)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita19)) || ';' || trim(to_char( bilancio_def_entry.energia19)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato19)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita20)) || ';' || trim(to_char( bilancio_def_entry.energia20)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato20)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita21)) || ';' || trim(to_char( bilancio_def_entry.energia21)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato21)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita22)) || ';' || trim(to_char( bilancio_def_entry.energia22)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato22)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita23)) || ';' || trim(to_char( bilancio_def_entry.energia23)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato23)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita24)) || ';' || trim(to_char( bilancio_def_entry.energia24)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato24)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita25)) || ';' || trim(to_char( bilancio_def_entry.energia25)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato25)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita26)) || ';' || trim(to_char( bilancio_def_entry.energia26)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato26)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita27)) || ';' || trim(to_char( bilancio_def_entry.energia27)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato27)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita28)) || ';' || trim(to_char( bilancio_def_entry.energia28)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato28)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita29)) || ';' || trim(to_char( bilancio_def_entry.energia29)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato29)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita30)) || ';' || trim(to_char( bilancio_def_entry.energia30)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato30)) || chr(10);*
    risultati:= risultati || trim(bilancio_def_entry.codicepool) || ';' || trim(bilancio_def_entry.codicefisico) || ';' ||  trim(bilancio_def_entry.denominazione) || ';' ||  trim(bilancio_def_entry.tipoedificio) || ';' || trim(bilancio_def_entry.tipoimpianto) || ';' ||*
    trim(bilancio_def_entry.stationtypecaminus) || ';' || trim(bilancio_def_entry.codiceateco) || ';' || trim(to_char(bilancio_def_entry.capacitatrasporto)) || ';' ||*
    trim(to_char(bilancio_def_entry.capacitaconferita31)) || ';' || trim(to_char( bilancio_def_entry.energia31)) || ';' ||   trim(to_char(bilancio_def_entry.volumeprofilato31)) || chr(10);*
    END LOOP;
    INSERT INTO APPOGGIO VALUES (risultati);
    commit;
    CLOSE cur;
    END;
    Pl sql variable is risultati (it is a long type).
    In the previous code i insert it in a table (but only to see what is results of concatenation ...it's not my purpose). When i insert this code in a procedure i want return from the procedure pl sql the variable risultati+. If risultati is longer than 32k i obtain an error. How could i do to obtain at the end a variable (or a concatenation of variables) long (for example) 2.000.000 of characters? This variable is the return variable of a procedure pl sql.
    Thanks a lot.

  • Data of column datatype CLOB is moved to other columns of the same table

    Hi all,
    I have an issue with the tables having a CLOB datatype field.
    When executing a simple query on a table with a column of type CLOB it returns error [POL-2403] value too large for column.
    SQL> desc od_stock_nbcst_notes;
    Name Null? Type
    OD_STOCKID N NUMBER
    NBC_SERVICETYPE N VARCHAR(40)
    LANGUAGECODE N VARCHAR(8)
    AU_USERIDINS Y NUMBER
    INSERTDATE Y DATE
    AU_USERIDUPD Y NUMBER
    MODIFYDATE Y DATE
    VERSION Y SMALLINT(4)
    DBUSERINS Y VARCHAR(120)
    DBUSERUPD Y VARCHAR(120)
    TEXT Y CLOB(2000000000)
    NBC_PROVIDERCODE N VARCHAR(40)
    SQL> select * from od_stock_nbcst_notes;
    [POL-2403] value too large for column
    Checking deeply, some of the rows have got the data of the CLOB column moved in another column of the table.
    When doing select length(nbc_providercode) the length is bigger than the datatype of the field (varchar(40)).
    When doing substr(nbc_providercode,1,40) to see the content of the field, a portion of the Clob data is retrieved.
    SQL> select max(length(nbc_providercode)) from od_stock_nbcst_notes;
    MAX(LENGTH(NBC_PROVIDERCODE))
    162
    Choosing one random record, this is the stored information.
    SQL> select length(nbc_providerCode), text from od_stock_nbcst_notes where length(nbc_providerCode)=52;
    LENGTH(NBC_PROVIDERCODE) | TEXT
    -------------------------+-----------
    52 | poucos me
    SQL> select nbc_providerCode from od_stock_nbcst_notes where length(nbc_providerCode)=52;
    [POL-2403] value too large for column
    SQL> select substr(nbc_providercode,1,40) from od_stock_nbcst_notes where length(nbc_providercode)=52 ;
    SUBSTR(NBC_PROVIDERCODE
    Aproveite e deixe o seu carro no parque
    The content of the field is part of the content of the field text (datatype CLOB, containts an XML)!!!
    The right content of the field must be 'MTS' (retrieved from Central DB).
    The CLOB is being inserted into the Central DB, not into the Client ODB. Data is synchronized from CDB to ODB and the data is reaching the client in a wrong way.
    The issue can be recreated all the time in the same DB, but between different users the "corrupted" records are different.
    Any idea?

    939569 wrote:
    Hello,
    I am using Oracle 11.2, I would like to use SQL to update one column based on values of other rows at the same table. Here are the details:
    create table TB_test (myId number(4), crtTs date, updTs date);
    insert into tb_test(1, to_date('20110101', 'yyyymmdd'), null);
    insert into tb_test(1, to_date('20110201', 'yyyymmdd'), null);
    insert into tb_test(1, to_date('20110301', 'yyyymmdd'), null);
    insert into tb_test(2, to_date('20110901', 'yyyymmdd'), null);
    insert into tb_test(2, to_date('20110902', 'yyyymmdd'), null);
    After running the SQL, I would like have the following result:
    1, 20110101, 20110201
    1, 20110201, 20110301
    1, 20110301, null
    2, 20110901, 20110902
    2, 20110902, null
    Thanks for your suggestion.How do I ask a question on the forums?
    SQL and PL/SQL FAQ

  • Unable to insert date and time when using date datatype

    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    Thanks

    user633278 wrote:
    Hi
    I am hitting a bit of a problem when using the date datatype. When trying to save a row to the table where the field it throws an error ora 01830 and complains about converting the date format picture ends...etc. Now when I do the insert, I use the to_date function with the format of "dd-mon-yyyy hh24:mi:ss". Of course, when I remove the time element, everything is perfect.
    Checking sysdate, I noticed that the time element wasn't be displayed, and I used alter session set nls_date_format to set the date and time I want to save to the table, which worked!
    Then based on advice in a previous thread to permanently fix the problem, I used alter system set nls_date_format ="dd-mon-yyyy hh24:mi:ss" scope=spfile; This showed that it was altered, and I can see the setting in the em. In sqlplus, I shutdown the database, and restarted with startup mount; alter database open; and then selecting sysdate, it still shows the date as dd-mon-yy, and still no time! Checking the em, and looking up the nls_date_format the setting is still shown as "dd-mon-yyyy hh24:mi:ss".
    So, my question is this - what am I doing wrong? Why can't save date and time using date in Oracle 11g?????
    ThanksYou most certainly can save the time. A DATE column, by definition stores date and time. What you describe is a presentation problem, and setting nls_date_format at the system as an init parm is the weakest of all settings as it is overridden by several other locations.
    without seeing the exact sql that produced the error (not just your description of what you think you were doing) it is impossible to say for sure.
    However, I'd suggest you read http://edstevensdba.wordpress.com/2011/04/07/nls_date_format/

  • Datatype change in RTF template

    Hi Team,
    I am not sure if this can be done, but, do we have a way in which we can change the datatype of a column in rtf template while preparing the template.
    Can you please help!
    Thanks
    Bhupendra
    Edited by: Bhupendra Gupta on Sep 9, 2009 4:21 AM

    Thanks for replying Vetsrini.
    Say i have a rtf template with which i will generate an csv report, and am not able to retain zeros in csv.(have posted one more post on this)
    So i want to convert a number column in database to character or string in rtf so that i can try if the leading zero problem is still there.
    I need CSV file because we have more 60k rows of records and csv does not do formatting.
    Sorry for posting 2 threads on this.
    But i need this to be get going as soon as i can
    Can you please help me out with this!
    Thanks
    Bhupendra

  • Insert/update japanese langunage data in a column of datatype varchar2(..)

    Hello,
    I am using ORACLE DATABASE 11g (EE) and RHEL 5.
    I want to insert/update japanese language data in a column which has the datatype as varchar2(256).
    I tried to change the NLS_LANGUAGE and NLS_TERRITORY parameters with 'ALTER SESSION set ...' command but no effect.
    I tried to bounce back ( shutdown and startup ) the DB but still no effect.
    I tried to inset the NLS_LANGUAGE and NLS_TERRITORY in init.ora file but still no use.
    If anybody knows the detail steps which i have mentioned above .... let me know. Might be that i am wrong in my method.
    Can you please guide me how to change the language of DB for a perticular session to japanese ???
    Thanks in advance...
    Edited by: VJ4 on May 9, 2011 6:21 PM

    VJ4 wrote:
    Thanks for the info.
    Yes i tried with UNISTR function and was able to insert the data successfully.
    but the point is that we can't remember unicode for each of the letter. It's their any method that we can directly insert japanese character using an insert.
    As you said :-
    Note that changing database character set is something complicated that requires many steps.
    Can you please provide me some links or some stuffs to study about the detail steps of chaining database character set.
    I have gone through the Oracle online documentation.. if you can pin point any good link in it you can else provide me some other stuff.
    Thanks .You will need to convert your database characterset to AL32UTF8. This is not a trivial exercise if your database already has data in it. See these MOS Docs
    Changing the NLS_CHARACTERSET to AL32UTF8 / UTF8 (Unicode)          (Doc ID 260192.1)
    AL32UTF8 / UTF8 (Unicode) Database Character Set Implications          (Doc ID 788156.1)
    http://download.oracle.com/docs/cd/E11882_01/server.112/e10729/ch11charsetmig.htm#g1011430
    HTH
    Srini

  • Difference between CHAR and VARCHAR2 datatype

    Difference between CHAR and VARCHAR2 datatype
    CHAR datatype
    If you have an employee name column with size 10; ename CHAR(10) and If a column value 'JOHN' is inserted, 6 empty spaces will be inserted to the right of the value. If this was a VARCHAR column; ename VARCHAR2(10). How would it handle the column value 'JOHN' ?

    The CHAR datatype stores fixed-length character strings, and Oracle compares CHAR values using blank-padded comparison semantics.
    Where as the VARCHAR2 datatype stores variable-length character strings, and Oracle compares VARCHAR2 values using nonpadded comparison semantics.
    This is important when comparing or joining on the columns having these datatypes;
    SQL*Plus: Release 10.2.0.1.0 - Production on Pzt Au 6 09:16:45 2007
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    SQL> conn hr/hr
    Connected.
    SQL> set serveroutput on
    SQL> DECLARE
    2 last_name1 VARCHAR2(10) := 'TONGUC';
    3 last_name2 CHAR(10) := 'TONGUC';
    4 BEGIN
    5 IF last_name1 = last_name2 THEN
    6 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is equal to -' || last_name2
    || '-');
    7 ELSE
    8 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is NOT equal to -' || last_n
    ame2 || '-');
    9 END IF;
    10 END;
    11 /
    -TONGUC- is NOT equal to -TONGUC -
    PL/SQL procedure successfully completed.
    SQL> DECLARE
    2 last_name1 CHAR(6) := 'TONGUC';
    3 last_name2 CHAR(10) := 'TONGUC';
    4 BEGIN
    5 IF last_name1 = last_name2 THEN
    6 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is equal to -' || last_name2
    || '-');
    7 ELSE
    8 DBMS_OUTPUT.PUT_LINE ( '-' || last_name1 || '- is NOT equal to -' || last_n
    ame2 || '-');
    9 END IF;
    10 END;
    11 /
    -TONGUC- is equal to -TONGUC -
    PL/SQL procedure successfully completed.
    Also you may want to read related asktom thread - "Char Vs Varchar" http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:1542606219593
    and http://tahitiviews.blogspot.com/2007/05/less-is-more-more-or-less.html
    Best regards.

  • Select with CLOB datatype

    Hi all....
    I must create a view to retrieve the data from a table "texto_email" ... and that table has a field named Texto - datatype CLOB. This field has some html definitions and formating tags.
    but when i create the view, i get a error in plsql saying "view created with compilation errors"
    when i coment " -- " the line responsable for the CLOB field, its created sucesful.
    what I´m doing wrong? there´s a something diferent to do in this case?
    that is my view... if someone can help...
    CREATE OR REPLACE FORCE VIEW vw_texto_email
    AS
    SELECT DISTINCT
    te.id_texto_email
    ,te.id_texto_email_tipo as id_tet
    ,te.data_cadastro
    ,te.data_inicio
    ,te.descricao
    ,te.assunto
    ,te.texto AS texto ---- that is the CLOB field -
    ,tet.descricao as tipo_email
    FROM
    texto_email te
    ,texto_email_tipo tet
    WHERE
    te.id_texto_email_tipo = tet.id_texto_email_tipo
    tnks....

    To work with LOBs you have to know something about the concept of a LOB locator( a short tour in the documentation would be appreciable).
    A LOB locator is a pointer to large object data in a database.
    Database LOB columns store LOB locators, and those locators point to the real data stored in a LOB data.
    To work with LOB data, you have to:
    1) Retrieve LOB locator
    2) Use a built-in package named DBMS_LOB to modify LOB
    2.1 Open lob
    2.2 ...
    2.3 read/write LOB
    2.4 close LOB
    Why do you want to retrieve a lob locator in a view?
    Stated that you could retreive its state in :
    1 null
    2 empty
    3 populated with a valid pointer to data

  • Query XML(CLOB) datatype

    Hello,
    I am new to XML and have been trying this for few days and get no luck ...
    First, I have an Excel file, which contains a list of bills for customers. It is a sample file to test my application.
    In the future, my application will receive data of XML-datatype, so my job here is to import this Excel file into my Oracle database 11gr2, then transform it to XML datatype one.
    I did import it by using Oracle SQL Developer and nicely stored it in a table called so_lieu.
    After that, I run the following code to convert the table data to XML datatype:
    CREATE TABLE xmlDoc(temp CLOB);
    DECLARE
      qryCtx DBMS_XMLGEN.ctxHandle;
      temp CLOB;
    BEGIN
      qryCtx := DBMS_XMLGEN.newContext('SELECT * FROM huy.so_lieu');
      -- Set the row header to be bill
      DBMS_XMLGEN.setRowTag(qryCtx, 'bill');
      -- Get the result
      temp := DBMS_XMLGEN.getXML(qryCtx);
      INSERT INTO xmlDoc VALUES(temp);
      --Close context
      DBMS_XMLGEN.closeContext(qryCtx);
    END;
    It is a success:
    table XMLDOC created.
    anonymous block completed
    When I run: SELECT * from xmlDoc; I can get a data of XML-datatype as following:
    <?xml version="1.0"?>
    <ROWSET>
    <bill>
      <MA_CQTT>5335</MA_CQTT>
      <ACCOUNT>P482668</ACCOUNT>
      <TEN_CQTT>Công ty TNHH FrieslandCampina Việt Nam</TEN_CQTT>
      <DIACHI>phường Bình Hòa, Thị xã Thuận An, Bình Dương</DIACHI>
      <MS_THUE>3700229344-   -</MS_THUE>
      <SDT>754422 ext 333</SDT>
      <LOAI_DV>48</LOAI_DV>
      <TEN>Mail - SMD</TEN>
      <CUOC_DV>0</CUOC_DV>
      <DC>0</DC>
      <CUOC_TBSD>0</CUOC_TBSD>
      <TRUY_THU>0</TRUY_THU>
      <TONG_TIEN>22254545</TONG_TIEN>
      <VAT>2225455</VAT>
    </bill>
    <bill>
      <MA_CQTT>90255</MA_CQTT>
      <ACCOUNT>P0421100</ACCOUNT>
      <TEN_CQTT>VPĐD HOME MERIDIAN INTERNATIONAL,INC TạI TP.HCM</TEN_CQTT>
      <DIACHI>Tầng trệt, Block C, Cao ốc An Khang, P. An Phú, Q.2, TP.HCM</DIACHI>
      <MS_THUE>0302199864-   -</MS_THUE>
      <SDT>838228511</SDT>
      <FAX>838293764</FAX>
      <LOAI_DV>7</LOAI_DV>
      <TEN>Internet trực tiếp</TEN>
      <CUOC_DV>0</CUOC_DV>
      <DC>0</DC>
      <CUOC_TBSD>35446000</CUOC_TBSD>
      <TRUY_THU>0</TRUY_THU>
      <TONG_TIEN>35446000</TONG_TIEN>
      <VAT>3544600</VAT>
    </bill>
    </ROWSET>
    Then I try to select/query the XML elements inside that XML data (to parse them into another tables) but cannot. I tried:
    SELECT XMLQuery('
        for $x in ora:view("xmlDoc")/ROW
           return $x/TEMP/ROWSET/bill/MA_CQTT
    ' RETURNING CONTENT) FROM DUAL;
    It gave errors
    ORA-19276: XPST0005 - XPath step specifies an invalid element/attribute name: (ROWSET)
    19276. 00000 -  "XP0005 - XPath step specifies an invalid element/attribute name: (%s)"
    *Cause:    The XPath step specified invalid element or attribute name that did not match any nodes according to the input XML schema or structure.
    *Action:   Correct the element or attribute name as the name may be mis-spelled.
    I read several threads and think that maybe my ROWSET element is not XML anymore. Thus, cannot select using XPath. How can I fix it?
    Thank you in advance,
    Huy Do.
    PS: I tried using XMLTABLE as below:
    SELECT x2.*
      from XMLDOC h,
        XMLTABLE(
          '//ROWSET/bill'
          PASSING xmltype(h.temp)
          COLUMNS ma_cqtt  varchar(20) path 'ma_cqtt'
          ) x2
    The query gave me a table of 2566 row of "ma_cqtt" but their value are all "null" (excel file has 2566 rows of record)
    Message was edited by: 2716502

    Thank you Odie I tried:
    INSERT INTO DM_TABLE (ma_cqtt, account, thang_ps)
        select x.ma_cqtt
             , x.account
             , thangps as thang
    Of course it returned an error, how silly of me to complicate thing like that
    And I have one more question about the speed to parse a xml data. Please, help me with it.
    In my code, I usually store xml data as a row in a temporary table (table mau_so_lieu). Then when doing parsing, I call the xml data from that table and the processing time is usually ~0.5s only. The code is like below:
    INSERT INTO mau_so_lieu VALUES(xmlData);
    INSERT INTO DM (                         
                                ma_kh, account, thang_ps)
        select x.ma_kh, x.account, thang
          from mau_so_lieu m, xmltable
              ('//Bao_cuoc'
                passing m.BILL
                columns
                   ma_kh varchar2(20) path '@ma_cqtt'
                  , account varchar2(20) path '@account'
              ) x;
    But one of my senior (SQL server expert) suggested to store xml data in a variable (xmlData XMLType) as he thought the processing time will be even shorter, as well as no temporary table needed (no trash left which need to be cleaned later). I tried that but somehow the processing time is > 5s with the code as below:
    INSERT INTO DM (                         
                                ma_kh, account, thang_ps)
        select x.ma_kh, x.account, thang
          from xmltable
              ('//Bao_cuoc'
                passing xmlData
                columns
                   ma_kh varchar2(20) path '@ma_cqtt'
                  , account varchar2(20) path '@account'
              ) x;
    Could you tell me why the processing time are so different? Is it because of the default RAM of Oracle XE 11g is too small to process?
    Thank you very much,
    Huy Do.

  • Error in CLOB datatype for transfering data from Excel to Oracle database

    Am using excel sheet as source and Oracle as target Database.
    For all tables the operations works smoothly except for tables containing CLOB datatype.
    Initially i have used SQL Developer to transfer some data into excell sheets, now i want to transfer those file's data into another Oracle Database.
    What other options do i have?
    Is excel not the right tool to transfer CLOB datatypes?

    well,
    I couldn't suggest an excel to do it...
    You can go from Oracle to Oracle with the PL/SQL IKM. It works fine.
    Does it help you?

  • Setting of CLOB Datatype storage space

    Hello All!
    I unble to insert more then 4000 characters in clob datatype field
    how I increate the storage size of the clob field
    I'm working in VB 6.0 and oracle 9i

    Oracle will allocate CLOB segments using some default storage options linked to column, table and tablespace.
    Example with Oracle 11.2 XE:
    SQL> select * from v$version;
    BANNER
    Oracle Database 11g Express Edition Release 11.2.0.2.0 - Beta
    PL/SQL Release 11.2.0.2.0 - Beta
    CORE    11.2.0.2.0      Production
    TNS for 32-bit Windows: Version 11.2.0.2.0 - Beta
    NLSRTL Version 11.2.0.2.0 - Production
    SQL> create user test identified by test;
    User created.
    SQL> grant create session, create table to test;
    Grant succeeded.
    SQL> alter user test quota unlimited on users;
    User altered.
    SQL> alter user test default tablespace users;
    User altered.
    SQL> connect test/test;
    Connected.
    SQL> create table tl(x clob);
    Table created.
    SQL> column segment_name format a30
    SQL> select segment_name, bytes/(1024*1024) as mb
      2  from user_segments;
    SEGMENT_NAME                           MB
    TL                                  ,0625
    SYS_IL0000020403C00001$$            ,0625
    SYS_LOB0000020403C00001$$           ,0625
    SQL> insert into tl values('01234456789');
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select segment_name, bytes/(1024*1024) as mb
      2  from user_segments;
    SEGMENT_NAME                           MB
    TL                                  ,0625
    SYS_IL0000020403C00001$$            ,0625
    SYS_LOB0000020403C00001$$           ,0625
    SQL>Same example run with Oracle XE 10.2 :Re: CLOB Datatype [About Space allocation]
    Edited by: P. Forstmann on 24 juin 2011 09:24

  • Problem on CLOB datatype after import

    I got problem and call to Oracle support and they use DUL for extract data from datafile to dump file and I import everything is done and no error but when I check in CLOB datatype that have space(blank character) separate each character see below
    Original
    Oracle
    After Import
    O R A C L E
    So the application cannot execute those data.
    Anyone have solution how to fix this problem?
    Thanks,
    Taohiko

    if you use a direct insert you are restricted to 4000 characters.
    You can put your value in a varchar2 variable and that allows you to insert up to 32767 characters.
    declare
    my_clob_variable := rpad('x','X',25000);
    begin
    insert into my_table(my_clob_column)
    values(my_clob_variable);
    end;

  • LogMiner puzzle - CLOB datatype

    Hello, everybody!
    Sorry for the cross-post here and in "Database\SQL and PL/SQL" forum, but the problem I am trying to dig is somewhere between those two areas.
    I need a bit of an advice whether the following behavior is wrong an requires SR to be initiated – or I am just missing something.
    Setting:
    -     Oracle 11.2.0.3 Enterprise Edition 64-bit on Win 2008.
    -     Database is running in ARCHIVELOG mode with supplemental logging enabled
    - DB_SECUREFILE=PERMITTED (so, by default LOBs will be created as BasicFiles - but I didn't notice any behavior difference comparing to SecureFile implementation)
    Test #1. Initial discovery of a problem
    1. Setup:
    <li> I created a table MISHA_TEST that contains CLOB column
    create table misha_test  (a number primary key, b_cl CLOB)<li> I run anonymous block that would insert into this table WITHOUT referencing CLOB column
    begin
         insert into misha_test (a) values (1);
         commit;
    end;2. I looked at generated logs via the LogMiner and found the following entries in V$LOGMNG_CONTENTS:
    SQL_REDO
    set transaction read write;
    insert into "MISHA_TEST"("A","B_CL") values ('1',EMPTY_CLOB());
    set transaction read write;
    commit;
    update "MISHA_TEST" set "B_CL" = NULL where "A" = '1' and ROWID = 'AAAj90AAKAACfqnAAA';
    commit;And here I am puzzled: why do we have two operations for a single insert – first write EMPTY_CLOB into B_CL and then update it to NULL? But I didn’t even touch the column B_CL! Seems very strange – why can’t we write NULL to B_CL from the very beginning instead of first creating a pointer and than destroying it.
    Key question:
    - why NULL value in CLOB column should be handled differently than NULL value in VARCHAR2 column?
    Test #2. Quantification
    Question:
    -     having LOB column in the table seems to cause an overhead of generating more logs. But could it be quantified?
    Assumption:
    -     My understanding is that CLOBs defined with “storage in row enabled = true” (default) up to ~ 4k of size behave like Varchar2(4000) and only when the size goes above 4k we start using real LOB mechanisms.
    Basic test:
    1.     Two tables:
    <li> With CLOB:
    create table misha_test_clob2  (a_nr number primary key, b_tx varchar2(4000), c_dt date, d_cl CLOB)<li>With VARCHAR2:
    create table misha_test_clob   (a_nr number primary key, b_tx varchar2(4000), c_dt date, d_cl VARCHAR2(4000))2.     Switch logfile/Insert 1000 rows and populate only A_NR/Switch logfile
    insert into misha_test_clob (a_nr)
    select level
    from dual
    connect by level < 10013.     Check sizes of generated logs:
    <li>With CLOB – 689,664 bytes
    <li>With Varchar2 – 509.440 (<b>or about 26% reduction</b>)
    Summary:
    <li>the overhead is real. It means that table with VARCHAR2 column is cheaper to maintain, even if you are not using that column. So adding LOB columns to a table "just in case" is a really bad idea.
    <li>Having LOB columns in the table that has tons of INSERT operations is expensive.
    Just to clarify a real business case - I have a table with some number of attributes, one attribute has CLOB datatype. Frequency of inserts in this table is pretty high, frequency of using CLOB column is pretty low (NOT NULL ~0.1%). But because of that CLOB column I generate a lot more LOG data than I need (about 30% extra). Seems like a real waste of time! For now I requested development team to split the table into two, but that's still a bandage.
    So, does anybody care? Comments/suggestions are very welcome!
    Thanks a lot!
    Michael Rosenblum

    Hello, everybody!
    Sorry for the cross-post here and in "Database\SQL and PL/SQL" forum, but the problem I am trying to dig is somewhere between those two areas.
    I need a bit of an advice whether the following behavior is wrong an requires SR to be initiated – or I am just missing something.
    Setting:
    -     Oracle 11.2.0.3 Enterprise Edition 64-bit on Win 2008.
    -     Database is running in ARCHIVELOG mode with supplemental logging enabled
    - DB_SECUREFILE=PERMITTED (so, by default LOBs will be created as BasicFiles - but I didn't notice any behavior difference comparing to SecureFile implementation)
    Test #1. Initial discovery of a problem
    1. Setup:
    <li> I created a table MISHA_TEST that contains CLOB column
    create table misha_test  (a number primary key, b_cl CLOB)<li> I run anonymous block that would insert into this table WITHOUT referencing CLOB column
    begin
         insert into misha_test (a) values (1);
         commit;
    end;2. I looked at generated logs via the LogMiner and found the following entries in V$LOGMNG_CONTENTS:
    SQL_REDO
    set transaction read write;
    insert into "MISHA_TEST"("A","B_CL") values ('1',EMPTY_CLOB());
    set transaction read write;
    commit;
    update "MISHA_TEST" set "B_CL" = NULL where "A" = '1' and ROWID = 'AAAj90AAKAACfqnAAA';
    commit;And here I am puzzled: why do we have two operations for a single insert – first write EMPTY_CLOB into B_CL and then update it to NULL? But I didn’t even touch the column B_CL! Seems very strange – why can’t we write NULL to B_CL from the very beginning instead of first creating a pointer and than destroying it.
    Key question:
    - why NULL value in CLOB column should be handled differently than NULL value in VARCHAR2 column?
    Test #2. Quantification
    Question:
    -     having LOB column in the table seems to cause an overhead of generating more logs. But could it be quantified?
    Assumption:
    -     My understanding is that CLOBs defined with “storage in row enabled = true” (default) up to ~ 4k of size behave like Varchar2(4000) and only when the size goes above 4k we start using real LOB mechanisms.
    Basic test:
    1.     Two tables:
    <li> With CLOB:
    create table misha_test_clob2  (a_nr number primary key, b_tx varchar2(4000), c_dt date, d_cl CLOB)<li>With VARCHAR2:
    create table misha_test_clob   (a_nr number primary key, b_tx varchar2(4000), c_dt date, d_cl VARCHAR2(4000))2.     Switch logfile/Insert 1000 rows and populate only A_NR/Switch logfile
    insert into misha_test_clob (a_nr)
    select level
    from dual
    connect by level < 10013.     Check sizes of generated logs:
    <li>With CLOB – 689,664 bytes
    <li>With Varchar2 – 509.440 (<b>or about 26% reduction</b>)
    Summary:
    <li>the overhead is real. It means that table with VARCHAR2 column is cheaper to maintain, even if you are not using that column. So adding LOB columns to a table "just in case" is a really bad idea.
    <li>Having LOB columns in the table that has tons of INSERT operations is expensive.
    Just to clarify a real business case - I have a table with some number of attributes, one attribute has CLOB datatype. Frequency of inserts in this table is pretty high, frequency of using CLOB column is pretty low (NOT NULL ~0.1%). But because of that CLOB column I generate a lot more LOG data than I need (about 30% extra). Seems like a real waste of time! For now I requested development team to split the table into two, but that's still a bandage.
    So, does anybody care? Comments/suggestions are very welcome!
    Thanks a lot!
    Michael Rosenblum

Maybe you are looking for

  • Lost data on /boot partition [solved]

    Lost data on /boot partition. Is there a way to recover it with Archlinux CD? Last edited by primez (2010-04-08 18:45:53)

  • Editable regions for the new BC editor

    Hi Business Catalyst have now added a new incontext editor with new editable regions that is not supported inside Dreamweaver. Will the new editable regions be added to Dreamweaver in the near future? Morten Håland - Sitespark.no

  • Broadband Suddenly Very Slow

    Hey guys, So I woke up today to find out that the connection was insanely slow, first I just assumed that other people in the house were downloading things and using up the majority of the bandwidth, but nope. I checked on SpeedTest and it was only g

  • Need help installing Canon network printer on Mountain Lion

    I am trying to install a Canon MF4270 network printer with my Macbook Air running Mountain Lion. I added the printer using its IP, and selected the MF4200 driver from the list that came installed with the OS.  The printer worked, but it would not all

  • BI design question : not uniform time granularity

    Hi all, I have some not-very-clear business requirements which I will try to simplify a lot just to make a point. some values should be stored having as dimensions : Categories and Time. the problem is with Time dimension, because there will be value