Sqlloader to_number - signed numbers

We have a sqlloader control file that will sucessfully load signed numbers coming from mainframe into oracle table using the following:
Amount          POSITION (68:78) "to_number(:Amount, '9999999.99MI')")
for a COBOL FD:
05 COST-AMOUNT-OUT PIC 9(7).99.
05 COST-AMT-SIGN-OUT PIC X.
Now they come to us with the following new COBOL FD:
05 COST-AMOUNT-SIGN-OUT PIC X(01).
05 FILLER PIC X(01) VALUE ';'.
05 COST-AMOUNT-OUT PIC 9(17).
The sign preceeds the number, but there is this pesky semicolon that is part of a new "It is a semicolon delimited TSO text file" format.
Any ideas about how to get this into the database column -
AMOUNT NUMBER(15,2)
Any suggestions will be greatly appreciated

Hello,
Can you post your sqlldr control file? You said now it's semicolon delimited TSO text file format or ";" just at the very end of amount field.
If is ';' delimited then you need to change your sqlldr control file, see if this example helps you out.
load data
Truncate into table employee
fields terminated by ";"
optionally enclosed by '"'
TRAILING NULLCOLS
empId INTEGER EXTERNAL,
FName char(20),
LName char(20),
FullName char(30)
{code}
If that's not the case then you can write simple function to strip off ';' from the field
Regards                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

Similar Messages

  • How do you Invert signed numbers?

    Hi there.
    A simple question: How can I invert the sign of an integer? ie) convert -12 to +12? No doubt there is a really simple way to do this, but I'm stumped, I cannot find anything and I've been working on this program all day.
    I'll be very grateful to anyone who can let me know if Java provides a way to do this, or point me in the right direction if it takes some tweaking of binary numbers using the Math package or something.
    Cheers!

    sabre150 wrote:
    paul.miner wrote:
    n = -n
    Not obscure enough! I prefer
    int n = ....;
    n = (0xffffffff ^ n) + 1;
    Bah, that +1 operation is way too clear; better make that:
    n^= 0xffffffff;
    int m;
    for (m= 1; m != 0 && ((n&m) != 0); m<<= 1);
    n|= m;
    if (m == 0) n= m;
    else for (m >>= 1; m != 0; n^= m, m>>=1);kind regards,
    Jos ;-)

  • Logical shift negative numbers

    So, I think i have found a bug in Labview.  I am using Labview 8.5
    I have a very very simple Vi Where i want to Right shift a negative number.  For example:
    -16 >> 2 = -4
    What i get is 16380.  If I mismatch the data types.  Meaning I right shift from a 16 integar and place the result into a 8 bit integar I get -4.  
    It would appear that the function is padding with leading zeros and not ones when handling negative numbers.   
    Is this an issue that has been fixed already?  Or am i using the function incorrectly?
    Attachments:
    Logical Shift bug.vi ‏7 KB

    Gruntboy,
         What I think you're looking for is an arithmetic shift function, while the function in Labview is a logical shift.  The difference is in the leading bit of the result when they shift a number to the right.  A logical shift right pads the numbers with '0's and an arithmetic shift right pads the numbers with their copies of their most significant bit.  This is very important when dealing with signed numbers, because the most significant bit (in standard two's complement notation) denotes whether or not a number is negative. 
         The number four (4) represented in six bits would be: 000100, and in two's complement negative four (-4) would be 111100.
    A logical shift right, which pads the numbers with a '0' on the left would be:
    000100 --> 000010  (4 --> 2)
    111100 --> 011110  (-4 --> 30)
    An arithmetic shift right, which pads the numbers with whatever their most significant bit is would be: 
    000100 --> 000010  (4 --> 2)
    111100 --> 111110  (-4 --> -2) 
    I don't see  an arithmetic shift function in Labview, but you could build one by converting the number to an array of booleans and shifting to your heart's content.
    When operating on signed numbers Arithmetic shift operations tend to be more useful, but I'm sure there would be quite a bit of confusion if the unsigned number 60 ("111110") gets right shifted and becomes 127! ("111111").
    Finally, there is "one" (heh I'm so punny) special case for arithmetic shifting.  Consider how right shifting (logical and arithmetic) 8 results in 4, then 2, then 1, then 0.  What about arithmetic right shifting of -8?  The results would be -4, then -2, then -1...... then -1, then -1, then -1, etc. 
    Worthwhile resources:
    Two's compliment notation for negative binary numbers: http://en.wikipedia.org/wiki/Two's_complement
    Logical shift explanation (w/ pictures!): http://en.wikipedia.org/wiki/Logical_shift
    Arithmetic shift explanation (w/ pictures!): http://en.wikipedia.org/wiki/Arithmetic_shift
    I hope this helps!
    Hugs,
    memoryleak 
    P.S. I noticed that you mentioned you were modeling number operations of an ASIC.  This book (ISBN: 978-0534378042) was used in the Intro to Digital Logic class I took way too long ago, and I remember it hitting very hard on binary, signs and bit operations.  Looks like a used copy can be had on Amazon for less than $40 
    Message Edited by memoryleak on 10-09-2009 11:00 AM

  • Trying to Understand the Base64 implementation.

    I'm a bit confused. I know that using a byte back to an int you can either return it or "zero" it by using 0xff. But in Base64DecoderStream, I see they do use "0xfc". What does that do?
    Also, on a side note. I know how to use binary numbers, but why is it ok that -12 is the same as 124? In binary numbers there's no way to tell the difference, why doesn't this cause problems?

    Got it!!!
    Our bytes are really 8-bit (that's what Java uses), but Base64 sent them as
    6-bit. So we have: [--aaaaaa], [--bbbbbb], [--cccccc], [--dddddd], we need
    to combine these to make three 8-bit bytes. They are combined like this:
    [aaaaaabb], [bbbbcccc], [ccdddddd]. Thus, the first 6-bit is the 6
    highest-order bits of the first 8-bit number (byte), and the second 6-bit
    includes the lowest 2 bits of that first byte as well as the highest 4 of
    the second 8-bit byte.
    So we shift "a" two to the left (since Java uses 8-bits by default for
    bytes) and so we go from: [--aaaaaa] to [aaaaaa--] (approx. I'll talk in a
    minute about the possible trailing 1's from shifting with signs and
    conversion). We also shift "b" 4 to the right: b >>> 4. ">>>" Shifts it
    right in an unsigned manner (don't want any 1's put in to keep the sign, or
    0's - it will mess us up.) We shift 4, because we need to make three 8-bit
    numbers from the 4 6-bit numbers we started with, and this will be the last
    two in the first 8-bit.
    The reason we use 0xFC (i.e. 252) and 3 in "&"'s with the two numbers is to
    ensure we don't get any trailing shifted 1's where we don't want them. When
    we shift, especially with signed numbers, we can get 1's on the ends
    (depending which way we shift). 0xFC in binary is: 11111100. So when we "&"
    this, we know that the two lowest-order bits will be zeroed out, since "&"
    of 1 and 0 is 0. This means, when we "|" (or) it with the two highest bits
    from "b" (i.e. the second 6-bit number), we'll just be adding in the actual
    two bits from "b" with no bits carried over from "a". So we'll get
    [aaaaaabb] instead of (incorrectly):
    [aaaaaaSS] (where S = Shifted bit)
    & [------bb]
    In the shift on the right, 3 in binary is 00000011, so we zero out all the
    left 6 bits in this 8-bit number, again insuring no interference with the
    first 6 bits from "a".

  • Mac Pro Tower - Which Fans Cool All of What?

    So I have a 2008, 2.8 GHz 8-core Mac Pro tower.  I'm one of the many people who have problems with the fans.  In my case, I can get really high fan speeds, and the problem seems to be due to a faulty temperature sensor.  (Using iStat, it will sometimes show unreasonably high temps on a couple cores [or the heat sinks, apparently] immediately after turning it on, whether or not it's been off for awhile.  Sometimes, it will even show negative temperatures, in which case the fans will really go into overdrive.  Yes, I've already tried resetting the SMC and cleaning it out - nothing.)
    What I've ended up doing so far is download Macs Fan Control and setting it to base the fan speeds off CPU temps that don't give faulty readings.  This works really well for lowering the fan speed (and thus noise), but I understand that different fans cool parts of the system besides just the CPU.  The fan names give basic descriptions, but not a lot of detail beyond that.  I've been trying to find a diagram showing which fans cool which parts of the system, but I mostly get results about fan noise, or minimalist diagrams that don't tell me all I want to know.  I'd like to make sure my settings are fairly optimal before I do anything intensive.
    Can anyone help me with this?

    I think you are "barking up the wrong tree".
    The fans in the Mac Pro are controlled by Software in the System Management Controller. They make a feedback loop based on measured temperatures. If you are getting racing fans, that is probably based on Bad Temperature inputs. Fixing the temperature inputs is where you should place your energy. The fans are slaves in this process.
    One possible exception: Most of the fans do have an RPM output indicator, which tells whether they are spinning properly. If the diagnostic indicates a MOT error, that is likely to be a Fan Motor that is not showing high RPMs at High speed settings, and may be defective. The power supply fans were designed by a different team, and may not have the same controls.
    What SMC Fan Control and similar software allows you to do is put a new Floor under the fan speeds. They will spin faster at idle, and it is possible they may move up to even higher speeds more slowly. What is does NOT allow you to do is any actual reduction in minimum fan speeds, regardless of whether it allows you to set lower numbers.
    When the numbers get extremely large, the magnitude bits overflow into what is sometimes considered the sign bit. That has no meaning in this context -- all numbers should be treated as positive numbers. That probably indicates they took a shortcut and used general-purpose routines for signed numbers that were lying around instead of writing more correct versions for positive numbers from scratch.

  • How to create a decimal object in a class?

    Post Author: farnaz
    CA Forum: WebIntelligence Reporting
    Hi,
    I have two fileds in database, one field is sign (-,+) and another is value( for example 73.92), I want to create an object with these two fields (-73.92).In Object Properties, in select window , I use " to_number(( SIGN )||to_char( VALUE))" but it rounds the value (-74) although when I use this select in database it returns (-73.92) . what I should do to have this value as an object in universe?
    Best Regards
    Farnaz

    Post Author: jsanzone
    CA Forum: WebIntelligence Reporting
    Farnaz,
    I don't have a real-life example that I can use to "play" with this, so here is a suggestion.  In your formula "to_char(VALUE)" portion, first format VALUE with the number format capability:
    FormatNumber(VALUE;"##.##")
    So maybe: to_char(FormatNumber(VALUE;"##.##"))

  • Loading unpacked Zoned data into NUMBER data types

    I need to use SQL*Loader to load data created on an MVS machine (EBCDIC) which is FTP'd to AIX (converted to ASCII during the FTP). Some of the data elements have signed unpacked numeric data. These need to be loaded into two types of fields in Oracle - 1) defined as data type NUMBER(19) 2) - defined as data type NUMBER (38,2) (i.e. dollar field with 2 decimal positions). For the dollar data I am loading there is an implied decimal. I need to know how to code SQL*Loader statements to handle these two situations. Because I have zoned unpacked source the resulting data loaded into the table must have a trailing sign (only if negative). Also the dollar fields need to have an explicit decimal inserted - and these dollar fields could also end up being negative.
    Any help would be appreciated. Various google searches have not given me the answers I need.

    979755 wrote:
    Most helpful. Pardon a few follow-on questions:
    1. The Zoned definition refers (I hope) to the data on the input file - regardless of the definition of the field field being loaded in the table (in my case the field in the table is defined as NUMBER) - is this a true statement?
    True, in your controlfile you set (for example): , zonedCol POSITION(x:y) ZONED(precision,scale)
    2. If I am correct on item 1, if I have a negative number in the input file (let's say a negative 10) is a trailing sign loaded into the database (so it will be 10-)?
    NO, to deal with signed numbers, you set trailing signs as table column in a staging table and then apply to real table.
    3. What happens to any leading zeroes when the data is loaded into the table?
    Ignored.
    4. For dollar fields where the source has an implied decimal but I want an implicit decimal in loaded into the table and the number can be positive or negative, can I specify this as ZONED (10.2) in the control file?
    See answer #2.
    ZONED (10,2) implies field is 10 characters long and the last two are decimals.
    5. And finally, regarding item 4 my understanding is that ZONED (10.2) would result in 12345678.12 (with a negative sign if appropriate) - is this a correct understanding?
    Nope, only the digits. That is why we use staging table to capture the sign.
    PS: The best would be to create external table on the source file.
    Edited by: L-MachineGun on Jan 4, 2013 3:12 PM

  • Unsigned Long in java

    Hi all,
    I have a code in C which i want to convert into java.. Iam facing problem because java does not support
    unsigned long.The code in c look like this:
    WCD.cardno = ( SerBuf[3]* 0x00010000UL+
    SerBuf[4]* 0x00000100UL+
    SerBuf[5]* 0x00000001UL);
    I want to convert this code into java. What i have done is something like this
    cardno = (tempBuffer[3]*0x01000000 + tempBuffer[4]*0x00010000 + tempBuffer[5]*0x00000100 +tempBuffer[6]*0x00000001);
    Can anyone help me out. This program is for serial port implementation.
    Thanks
    Kiran

    kiranJNI wrote:
    Basically how can we achieve unsigned long in java???In your case, this isn't going to be a problem for two reasons.
    AFAIK, there aren't any numbers where multiplying them as unsigned numbers is going to be different from multiplying them as signed numbers and still give a valid result. To make this easier, let's work with signed vs unsigned bytes. Negative numbers are those in the range 0x80 to 0xFF; these are the only numbers where the "value" of the byte differs between signed and unsigned. Now think of those numbers as unsigned numbers. The only unsigned numbers you could multiply them by and still remain within the range of a byte are 0 and 1. If you multiply by 2, the result is 0x100, which is larger than what a byte can represent. If the result will remain within the range of the data type, it don't think there are any numbers where signed and unsigned multiplication return a different bit pattern.
    Furthermore, your example doesn't even need multiplication. You're multiplying by powers of 2, so all you really need is a series of shifts and adds.

  • Why is the difference in +ve & -ve Vlaues? Very BASIC question!

    Can anyone tell me why there is a differene in -ve and +ve values of integers/floats etc?
    I mean to say that as in C++, an character's max ve value is 127. While its -ve value is -128.
    I need 2's complement procedure remembering that in 8-bit pattern in RAM, most significant bit is sign bit.
    Please, answer with exapmles. (Same is true for java)

    hasan_asd,
    Lets take 8 bits for example. With 8 bits there are 256 different combinations, correct. 2 ^ 8 = 256. To a computer, this is just a collection of 8 ones or zeros. We as humans want it to represent a number. We can up with two different ways to approach it. The first way is to have the 8 bits represent an unsigned number. That is, all the numbers are positive. so that possible values that could exist for 256 combinations would be 0 to 255. The second way is for us to say, oh but our we want a negative number as well. So, we made up the rule that the far left bit would represent a negative sign. We then called this a signed number. For a signed number to be positive, the far left bit will be 0. So, the highest positive number we can have is 01111111 and that equals 127. Now, if we change the far left bit to a 1. The remaining seven bits are the value in the negative direction. So, 11111111 = -127 for a signed number. That leaves one combination left for signed numbers and that is 10000000. What number is this suppose to be. Keep in mind that the far left bit represents negativity for signed numbers, so It can't be +128. Also, keep in mind that we have only used up 255 possible combinations of our 256, so, since it is a negative number, it must be -128. I hope this helped. Just remember that the eight-bit pattern you have depends on what the programming language considers it to be. With C++ you can physically declare it as signed or unsigned, but in Java it is unsigned.
    tajenkins

  • Run javascript in adobe live cycle work bench

    Hi All,
    Is there anyway we can execute the javascript in workbench?
    or is there any method to convert javascript to adobe script(execute script activity)?
    Actually i have written javascript in live cycle designer while pdf designing. now i want the same javascript at server end.
    Kindly someone help me to get this functionality.
    Regards
    Abhishek

    Hi Jasmin,
    Thanks for your quick reply.
    I have a javascript which generate sha1hash output for input string.
    I am getting an error while executing it in workbench.
    If i want to use same algorithm in execute script how can i able to use it.
    How should i convert this code in java?
    Please find the javascript below for sha1hash algorithm
    function sha1Hash(msg)
        // constants [§4.2.1]
        var K = [0x5a827999, 0x6ed9eba1, 0x8f1bbcdc, 0xca62c1d6];
        // PREPROCESSING
        msg += String.fromCharCode(0x80); // add trailing '1' bit (+ 0's padding) to string [§5.1.1]
        // convert string msg into 512-bit/16-integer blocks arrays of ints [§5.2.1]
        var l = msg.length/4 + 2;  // length (in 32-bit integers) of msg + ‘1’ + appended length
        var N = Math.ceil(l/16);   // number of 16-integer-blocks required to hold 'l' ints
        var M = new Array(N);
        for (var i=0; i<N; i++) {
            M[i] = new Array(16);
            for (var j=0; j<16; j++) {  // encode 4 chars per integer, big-endian encoding
                M[i][j] = (msg.charCodeAt(i*64+j*4)<<24) | (msg.charCodeAt(i*64+j*4+1)<<16) |
                          (msg.charCodeAt(i*64+j*4+2)<<8) | (msg.charCodeAt(i*64+j*4+3));
        // add length (in bits) into final pair of 32-bit integers (big-endian) [5.1.1]
        // note: most significant word would be (len-1)*8 >>> 32, but since JS converts
        // bitwise-op args to 32 bits, we need to simulate this by arithmetic operators
        M[N-1][14] = ((msg.length-1)*8) / Math.pow(2, 32); M[N-1][14] = Math.floor(M[N-1][14])
        M[N-1][15] = ((msg.length-1)*8) & 0xffffffff;
        // set initial hash value [§5.3.1]
        var H0 = 0x67452301;
        var H1 = 0xefcdab89;
        var H2 = 0x98badcfe;
        var H3 = 0x10325476;
        var H4 = 0xc3d2e1f0;
        // HASH COMPUTATION [§6.1.2]
        var W = new Array(80); var a, b, c, d, e;
        for (var i=0; i<N; i++) {
            // 1 - prepare message schedule 'W'
            for (var t=0;  t<16; t++) W[t] = M[i][t];
            for (var t=16; t<80; t++) W[t] = ROTL(W[t-3] ^ W[t-8] ^ W[t-14] ^ W[t-16], 1);
            // 2 - initialise five working variables a, b, c, d, e with previous hash value
            a = H0; b = H1; c = H2; d = H3; e = H4;
            // 3 - main loop
            for (var t=0; t<80; t++) {
                var s = Math.floor(t/20); // seq for blocks of 'f' functions and 'K' constants
                var T = (ROTL(a,5) + f(s,b,c,d) + e + K[s] + W[t]) & 0xffffffff;
                e = d;
                d = c;
                c = ROTL(b, 30);
                b = a;
                a = T;
            // 4 - compute the new intermediate hash value
            H0 = (H0+a) & 0xffffffff;  // note 'addition modulo 2^32'
            H1 = (H1+b) & 0xffffffff;
            H2 = (H2+c) & 0xffffffff;
            H3 = (H3+d) & 0xffffffff;
            H4 = (H4+e) & 0xffffffff;
        return H0.toHexStr() + H1.toHexStr() + H2.toHexStr() + H3.toHexStr() + H4.toHexStr();
    // function 'f' [§4.1.1]
    function f(s, x, y, z)
        switch (s) {
        case 0: return (x & y) ^ (~x & z);           // Ch()
        case 1: return x ^ y ^ z;                    // Parity()
        case 2: return (x & y) ^ (x & z) ^ (y & z);  // Maj()
        case 3: return x ^ y ^ z;                    // Parity()
    // rotate left (circular left shift) value x by n positions [§3.2.5]
    function ROTL(x, n)
        return (x<<n) | (x>>>(32-n));
    // extend Number class with a tailored hex-string method
    //   (note toString(16) is implementation-dependant, and
    //   in IE returns signed numbers when used on full words)
    Number.prototype.toHexStr = function()
        var s="", v;
        for (var i=7; i>=0; i--) { v = (this>>>(i*4)) & 0xf; s += v.toString(16); }
        return s;
    Please reply for this
    Thanks in advance.

  • How to get nested table meta data

    how to get nested table column name, column type and column size
    by using java. i need code for this.
    please help me.

    The Follopwing program does display the the details of table. Hope you get the solution
    import java.sql.Connection;
    import java.sql.DriverManager;
    import java.sql.ResultSet;
    import java.sql.ResultSetMetaData;
    import java.sql.Statement;
    public class Main {
      public static void main(String[] args) throws Exception {
        Connection conn = getOracleConnection();
        System.out.println("Got Connection.");
        Statement st = conn.createStatement();
        st = conn.createStatement();
        ResultSet rs = st.executeQuery("SELECT * FROM SCHEDULE_SET");
        ResultSetMetaData rsMetaData = rs.getMetaData();
        int numberOfColumns = rsMetaData.getColumnCount();
        System.out.println("resultSet MetaData column Count=" + numberOfColumns);
        for (int i = 1; i <= numberOfColumns; i++) {
          System.out.println("column MetaData ");
          System.out.println("column number " + i);
          // indicates the designated column's normal maximum width in
          // characters
          System.out.println(rsMetaData.getColumnDisplaySize(i));
          // gets the designated column's suggested title
          // for use in printouts and displays.
          System.out.println(rsMetaData.getColumnLabel(i));
          // get the designated column's name.
          System.out.println(rsMetaData.getColumnName(i));
          // get the designated column's SQL type.
          System.out.println(rsMetaData.getColumnType(i));
          // get the designated column's SQL type name.
          System.out.println(rsMetaData.getColumnTypeName(i));
          // get the designated column's class name.
          System.out.println(rsMetaData.getColumnClassName(i));
          // get the designated column's table name.
          System.out.println(rsMetaData.getTableName(i));
          // get the designated column's number of decimal digits.
          System.out.println(rsMetaData.getPrecision(i));
          // gets the designated column's number of
          // digits to right of the decimal point.
          System.out.println(rsMetaData.getScale(i));
          // indicates whether the designated column is
          // automatically numbered, thus read-only.
          System.out.println(rsMetaData.isAutoIncrement(i));
          // indicates whether the designated column is a cash value.
          System.out.println(rsMetaData.isCurrency(i));
          // indicates whether a write on the designated
          // column will succeed.
          System.out.println(rsMetaData.isWritable(i));
          // indicates whether a write on the designated
          // column will definitely succeed.
          System.out.println(rsMetaData.isDefinitelyWritable(i));
          // indicates the nullability of values
          // in the designated column.
          System.out.println(rsMetaData.isNullable(i));
          // Indicates whether the designated column
          // is definitely not writable.
          System.out.println(rsMetaData.isReadOnly(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isCaseSensitive(i));
          // Indicates whether a column's case matters
          // in the designated column.
          System.out.println(rsMetaData.isSearchable(i));
          // indicates whether values in the designated
          // column are signed numbers.
          System.out.println(rsMetaData.isSigned(i));
          // Gets the designated column's table's catalog name.
          System.out.println(rsMetaData.getCatalogName(i));
          // Gets the designated column's table's schema name.
          System.out.println(rsMetaData.getSchemaName(i));
        st.close();
        conn.close();
      public static Connection getOracleConnection() throws Exception {
        String driver = "oracle.jdbc.driver.OracleDriver";
        String url = "jdbc:oracle:thin:@son15644:1521:CXPqa1";
        String username = "ess4qa2";
        String password = "ess4qa2pw";
        Class.forName(driver); // load Oracle driver
        Connection conn = DriverManager.getConnection(url, username, password);
        return conn;
    }

  • Disasterous Home Move experience (so far)

    Back in April, I knew I would be moving from my old address (Home 1) at the end of June, so.. in May, I contacted BT's Home Move Team to arrange for my services to be installed at my new address (Home 2) a couple of days after I was due to move in (an engineer was booked for 28/06 pm). In total, I have a phone line, call sign, anonymous call reject, call minder extentions, caller display, ring back and call waiting.
    When I placed the order in May, I was told I could move my old numbers to the new address without problem. Anyway, the 28th came and went and no engineer visited although we did have a dialing tone when tested. However, the phone didn't ring when either line or Call Sign numbers were called and the caller would just get a single ring tone and then the line would drop.
    I called 150 the following day and was put through to, what seemed like a customer call centre in India. After 30 minutes of waiting on the phone whilst the operator tried to get through to an engineer, I had to give in as I had somewhere else to be. I left my mobile number with the operator and asked for someone to call me back when she finally managed to get through to the engineers. No call ever came.
    I called 150 again on the 30th which was again replied by some gentleman in India and was told the hold up was due to an issue with activating the call sign service. I was asked again for my call sign tel. number as they did not appear to have it on their system and I was assured that the issued would be resolved "within 24 hours" now that they had the number.
    I called 150 again Thursday pm and elected to be put through to the Home Move team this time round to find out why my order had still not been fulfilled. I was promptly told that the order had obviously not been completed correctly and that the issue would be passed to a manger who would phone me back within 2 hours. I gave my mobile number again and waited. No call ever came.
    Friday AM. I contacted the Home Move Team yet again on 150 and was told that the order could not be fulfilled as they had received "conflicting information" from me. I asked what this was and I was told that I had given my Call Sign number but I was unable to take that with me because a new number would have to be generated if I opted to transfer the call sign service despite the fact that a) I had previously moved my call sign number before on a previous move and b) BT customer service reps had constantly asked for my call sign number up to this point. I was told that my original order would have to be cancelled and a new order generated. How long was I expected to wait? Well, as it was BT's mess up in the first place by not placing the order correctly, they would be able to get the line on by Tuesday 6th! Oh, but they would have to allocate me a ghost number temporarily because my original number had now been assigned to the previous order but no fear, they would be able to get it reallocated by the 7th. Feeling the issue had been resolved, albeit delayed, I felt somewhat happier UNTIL....
    A nagging feeling in the back of my mind was saying to me to log in to the BT Order Tracking system online with the new order number I'd been given. I inputted the VOL number and new postcode. NOTHING. Order could not be found. I inputted the VOL number and my old postcode. VOILA. There was the order. A quick check to 150 yesterday morning confirmed my worst fears. The order had been allocated to my old address!!!!! The apologetic BT customer services rep. told me, once again, my order had to be cancelled and another one raised for new address. Oh, and, the system is telling me "we won't be able to complete this order until 19th July" WHAT!!!!????? I announced. "Don't worry" I was told, "due to the error/circumstances we'll be able to bring the order forward but I can't offer you an earlier date at the moment because the order has to be accepted by Open Reach". I was then asked to call back later on in the afternoon so that Open Reach had opportunity to accept order and an earlier date could be arranged.
    Guess what! I did that and Steve the Customer Service guy promptly told me there was nothing they could do to bring the order forward because it was not an Open Reach error but a BT one and Open Reach can't prioritise BT customers over other customers. I was offered 1 month's free line rental for my inconvenience and "was there anything else I could help you with?" I exclaimed "so, you're telling me that, despite no fault of my own, you are leaving me without a phone line and other subsequent services for 3 weeks and there is nothing you can do to alleviate the situation". I was then, quite curtly told, that I had received one month's line rental free for the inconvenience and that, in the past, BT might have had some sway with Open Reach, but not any longer. And that ended the call.
    If this is what BT determines as, I quote "moving with less stress", I think they need to re-evaluate their competences, customer service and what the customer considers satisfactory!!!!!!
    Mark (and very peeved off)

    Hi Mark,
    This doesn't sound good at all. If you'd like us to look into this email me your details and a link to this thread at [email protected] and I'll make sure there aren't any further problems with the order.
    Stephanie
    Stephanie
    BTCare Community Manager
    If you like a post, or want to say thanks for a helpful answer, please click on the Ratings star on the left-hand side of the post. If someone answers your question correctly please let other members know by clicking on ’Mark as Accepted Solution’.

  • ResutSetMetada example

    You can enter your ResutSetMetada, for it, you must do the next:
    java.sql.ResultSet rs = yourStatement.executeQuery();
    java.sql.ResultSetMetaData rsmd = rs.getMetadata();
    printResultSetMetada(rsmd);
    public static void printResultSetMetada(ResultSetMetaData rsmd){
    int column = 1;
    try{
    String getCatalogName = rsmd.getCatalogName(column);
    System.out.println("Gets the designated column's table's catalog name" + ": " + getCatalogName);
    String getColumnClassName = rsmd.getColumnClassName(column);
    System.out.println("Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column" + ": " + getColumnClassName);
    int getColumnCount = rsmd.getColumnCount();
    System.out.println("Returns the number of columns in this ResultSet object" + ": " + getColumnCount);
    int getColumnDisplaySize = rsmd.getColumnDisplaySize(column);
    System.out.println("Indicates the designated column's normal maximum width in characters" + ": " + getColumnDisplaySize);
    String getColumnLabel = rsmd.getColumnLabel(column);
    System.out.println("Gets the designated column's suggested title for use in printouts and displays" + ": " + getColumnLabel);
    String getColumnName = rsmd.getColumnName(column);
    System.out.println("Get the designated column's name" + ": " + getColumnName);
    int getColumnType = rsmd.getColumnType(column);
    System.out.println("Retrieves the designated column's SQL type" + ": " + getColumnType);
    String getColumnTypeName = rsmd.getColumnTypeName(column);
    System.out.println("Retrieves the designated column's database-specific type name" + ": " + getColumnTypeName);
    int getPrecision = rsmd.getPrecision(column);
    System.out.println("Get the designated column's number of decimal digits" + ": " + getPrecision);
    int getScale = rsmd.getScale(column);
    System.out.println("Gets the designated column's number of digits to right of the decimal point" + ": " + getScale);
    String getSchemaName = rsmd.getSchemaName(column);
    System.out.println("Get the designated column's table's schema" + ": " + getSchemaName);
    String getTableName = rsmd.getTableName(column);
    System.out.println("Gets the designated column's table name" + ": " + getTableName);
    boolean isAutoIncrement = rsmd.isAutoIncrement(column);
    System.out.println("Indicates whether the designated column is automatically numbered, thus read-only" + ": " + isAutoIncrement);
    boolean isCaseSensitive = rsmd.isCaseSensitive(column);
    System.out.println("Indicates whether a column's case matters" + ": " + isCaseSensitive);
    boolean isCurrency = rsmd.isCurrency(column);
    System.out.println("Indicates whether the designated column is a cash value" + ": " + isCurrency);
    boolean isDefinitelyWritable = rsmd.isDefinitelyWritable(column);
    System.out.println("Indicates whether a write on the designated column will definitely succeed" + ": " + isDefinitelyWritable);
    int isNullable = rsmd.isNullable(column);
    System.out.println("Indicates the nullability of values in the designated column" + ": " + isNullable);
    boolean isReadOnly = rsmd.isReadOnly(column);
    System.out.println("Indicates whether the designated column is definitely not writable" + ": " + isReadOnly);
    boolean isSearchable = rsmd.isSearchable(column);
    System.out.println("Indicates whether the designated column can be used in a where clause" + ": " + isSearchable);
    boolean isSigned = rsmd.isSigned(column);
    System.out.println("Indicates whether values in the designated column are signed numbers" + ": " + isSigned);
    boolean isWritable = rsmd.isWritable(column);
    System.out.println("Indicates whether it is possible for a write on the designated column to succeed" + ": " + isWritable);
    } catch(Exception ex){
    ex.printStackTrace();
    /*** output
    Gets the designated column's table's catalog name:
    Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column: java.lang.String
    Returns the number of columns in this ResultSet object: 3
    Indicates the designated column's normal maximum width in characters: 2
    Gets the designated column's suggested title for use in printouts and displays: CODIGO_PROVINCIA
    Get the designated column's name: CODIGO_PROVINCIA
    Retrieves the designated column's SQL type: 12
    Retrieves the designated column's database-specific type name: VARCHAR2
    Get the designated column's number of decimal digits: 2
    Gets the designated column's number of digits to right of the decimal point: 0
    Get the designated column's table's schema:
    Gets the designated column's table name:
    Indicates whether the designated column is automatically numbered, thus read-only: false
    Indicates whether a column's case matters: true
    Indicates whether the designated column is a cash value: false
    Indicates whether a write on the designated column will definitely succeed: false
    Indicates the nullability of values in the designated column: 0
    Indicates whether the designated column is definitely not writable: false
    Indicates whether the designated column can be used in a where clause: true
    Indicates whether values in the designated column are signed numbers: true
    Indicates whether it is possible for a write on the designated column to succeed: true
    */

    All does works properly, only you need add one code line to your code:
    rsmd = rs.getMetaData();
    The final code is here, test it if you want!!
    I hope this can be useful for you.
    Bye
    package <put here your package name>;
    import javax.swing.*;
    import java.sql.*;
    import java.util.*;
    import oracle.jdbc.driver.*;
    * why when I add that to my this program a nullpointerexception occurs?
    * I don't understand!
    * ReadToTable.java
    * @author Administrator
    public class TestForum {
         private ResultSetMetaData rsmd;
         private Statement sm;
         private ResultSet rs;
         private String query;
         public static Vector rows = new Vector();
         public static Vector columnHeads = new Vector();
         private Connection connection = null;
         static final String dbURI = "jdbc:oracle:thin:@<hostname>:<port>:<SID>";
    /* example: static final String dbURI = "jdbc:oracle:thin:@10.12.1.28:1521:yourSid";*/
         /** Creates a new instance of ReadToTable */
         public TestForum() {
              try{
                   query = "SELECT * FROM TABLAERRORES";
                   connect(); //modify sm
                   executeSql(sm, query); //use modified sm and modify rs
                   columnHeads = executeColumnNames(rs);
                   rows = executeRows(rs);
    //this line isn't in your code and it's very important!!!
                   rsmd = rs.getMetaData();
                   printResultSetMetada(rsmd);
              }catch(Exception ex){
                   ex.printStackTrace();
         //connect to db1 get and modify statement:sm;
         public void connect() {
              String url = "jdbc:odbc:db1";
              String username = "anonymous";
              String password = "guest";
              try {
                                  // Load database driver
         DriverManager.registerDriver (new oracle.jdbc.OracleDriver());
         // Make connection
         //connection = DriverManager.getConnection(dbURI,"<username>","<password>");
         connection = DriverManager.getConnection(dbURI,"your user","your password");
                   //Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
                   /*connection = DriverManager.getConnection(url, username, password);*/
                   sm = connection.createStatement();
              } catch (SQLException sqlex) {
                   sqlex.printStackTrace();
         //execute the sql sentence and modify ResultSet rs;
         public void executeSql(Statement statement, String query) {
              try {
                   rs = statement.executeQuery(query);
              } catch (SQLException sqlex) {
                   sqlex.printStackTrace();
         //return column names in Vector format
         private Vector executeColumnNames(ResultSet rs) {
              Vector columnHeads = new Vector();
              try {
                   ResultSetMetaData rsmd = rs.getMetaData();
                   int columnCounts = rsmd.getColumnCount();
                   for (int i = 1; i <= columnCounts; i++) {
                        columnHeads.addElement(rsmd.getColumnName(i));
              } catch (SQLException sqlex) {
                   sqlex.printStackTrace();
              return columnHeads;
         //return all the data without column names in Vector format
         public Vector executeRows(ResultSet resultSet) {
              try {
                   while (rs.next()) {
                        rows.addElement(executeCurrentRow(rs));
                   //System.out.println( rows );
              } catch (SQLException sqlex) {
                   sqlex.printStackTrace();
              return rows;
         //return current row's information in Vector format
         private Vector executeCurrentRow(ResultSet rs) {
              Vector currentRow = new Vector();
              try {
                   ResultSetMetaData rsmd = rs.getMetaData();
                   for (int i = 1; i <= rsmd.getColumnCount(); i++) {
                        currentRow.addElement(rs.getString(i));
                   //System.out.println( currentRow );
              } catch (SQLException sqlex) {
                   sqlex.printStackTrace();
              return currentRow;
         public static void main(String args[]) {
              new TestForum();
         public static void printResultSetMetada(ResultSetMetaData rsmd) {
              int column = 1;
              try {
                   String getCatalogName = rsmd.getCatalogName(column);
                   System.out.println(
                        "Gets the designated column's table's catalog name" + ": " + getCatalogName);
                   String getColumnClassName = rsmd.getColumnClassName(column);
                   System.out.println(
                        "Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column"
                             + ": "
                             + getColumnClassName);
                   int getColumnCount = rsmd.getColumnCount();
                   System.out.println(
                        "Returns the number of columns in this ResultSet object"
                             + ": "
                             + getColumnCount);
                   int getColumnDisplaySize = rsmd.getColumnDisplaySize(column);
                   System.out.println(
                        "Indicates the designated column's normal maximum width in characters"
                             + ": "
                             + getColumnDisplaySize);
                   String getColumnLabel = rsmd.getColumnLabel(column);
                   System.out.println(
                        "Gets the designated column's suggested title for use in printouts and displays"
                             + ": "
                             + getColumnLabel);
                   String getColumnName = rsmd.getColumnName(column);
                   System.out.println("Get the designated column's name" + ": " + getColumnName);
                   int getColumnType = rsmd.getColumnType(column);
                   System.out.println(
                        "Retrieves the designated column's SQL type" + ": " + getColumnType);
                   String getColumnTypeName = rsmd.getColumnTypeName(column);
                   System.out.println(
                        "Retrieves the designated column's database-specific type name"
                             + ": "
                             + getColumnTypeName);
                   int getPrecision = rsmd.getPrecision(column);
                   System.out.println(
                        "Get the designated column's number of decimal digits" + ": " + getPrecision);
                   int getScale = rsmd.getScale(column);
                   System.out.println(
                        "Gets the designated column's number of digits to right of the decimal point"
                             + ": "
                             + getScale);
                   String getSchemaName = rsmd.getSchemaName(column);
                   System.out.println(
                        "Get the designated column's table's schema" + ": " + getSchemaName);
                   String getTableName = rsmd.getTableName(column);
                   System.out.println(
                        "Gets the designated column's table name" + ": " + getTableName);
                   boolean isAutoIncrement = rsmd.isAutoIncrement(column);
                   System.out.println(
                        "Indicates whether the designated column is automatically numbered, thus read-only"
                             + ": "
                             + isAutoIncrement);
                   boolean isCaseSensitive = rsmd.isCaseSensitive(column);
                   System.out.println(
                        "Indicates whether a column's case matters" + ": " + isCaseSensitive);
                   boolean isCurrency = rsmd.isCurrency(column);
                   System.out.println(
                        "Indicates whether the designated column is a cash value" + ": " + isCurrency);
                   boolean isDefinitelyWritable = rsmd.isDefinitelyWritable(column);
                   System.out.println(
                        "Indicates whether a write on the designated column will definitely succeed"
                             + ": "
                             + isDefinitelyWritable);
                   int isNullable = rsmd.isNullable(column);
                   System.out.println(
                        "Indicates the nullability of values in the designated column"
                             + ": "
                             + isNullable);
                   boolean isReadOnly = rsmd.isReadOnly(column);
                   System.out.println(
                        "Indicates whether the designated column is definitely not writable"
                             + ": "
                             + isReadOnly);
                   boolean isSearchable = rsmd.isSearchable(column);
                   System.out.println(
                        "Indicates whether the designated column can be used in a where clause"
                             + ": "
                             + isSearchable);
                   boolean isSigned = rsmd.isSigned(column);
                   System.out.println(
                        "Indicates whether values in the designated column are signed numbers"
                             + ": "
                             + isSigned);
                   boolean isWritable = rsmd.isWritable(column);
                   System.out.println(
                        "Indicates whether it is possible for a write on the designated column to succeed"
                             + ": "
                             + isWritable);
              } catch (Exception ex) {
                   ex.printStackTrace();

  • I bought a new iphone and as i was setting my apple ID account and i signed in to my account and confirmed two useres with diffrent numbers that were signed to the same apple ID and it messed up my i messege and face time. how do i fix that ?

    i bought a new iphone and as i was setting my apple ID account and i signed in to my account and confirmed two useres with diffrent numbers that were signed to the same apple ID and it messed up my i messege and face time. how do i fix that or delete one user ?

    Hello sapiii96,
    Thanks for using Apple Support Communities.
    For more information on this, take a look at:
    iOS: Troubleshooting FaceTime and iMessage activation
    http://support.apple.com/kb/ts4268
    To sign out of your Apple ID
    Go to Settings > FaceTime, tap your Apple ID, and select Sign Out.
    Go to Settings > Messages > Send & Receive, tap your Apple ID, and select Sign Out.
    Best of luck,
    Mario

  • Just setting up iCloud on my iMac, my problem is when trying to sign out/off from iCloud it comes up with a verification code that is being sent to my land line, I'd changed the numbers in my Apple ID and they show as changed but the land line number stil

    Just setting up iCloud on my iMac 10.9.2, my problem is when trying to sign out/off from iCloud it comes up with a verification code that is being sent to my land line, I'd changed the numbers in my Apple ID and they show as changed but the land line number still shows as number that the verification code is being sent, I prompt "Don't have access to this phone" and that's no help at all.  The only way I can sign out /off from iCloud is to uncheck everything that I wanted to keep in the cloud????
    Thanks in advance for any help.

    Skip the iCloud sign in for now.
    Once you reach the home page, go to settings and sign out of FaceTime and Messages.  This should also sign you out of iCloud.
    Go to iCloud in settings and sign in with the correct Apple ID.
    If that does not work
    Skip the iCloud sign in
    Go to Apple ID.apple.com and sign in
    Change your Apple ID to the old one
    Delete iCloud account on your device with the old Apple ID and the same password.
    Go back to the website, change your Apple ID back to the current one. You will receive an email to verify the account. Verify first.
    Sign into iCloud on your device with the correct Apple ID and password

Maybe you are looking for