How to spool the data with out space

Hi, My version is 10g. I am trying to spool the file. this is my sql file looks like.
set pagesize 0
set heading on
set verify off
set linesize 32767
set trimspool on
set feedback off
set termout off
set colsep '~'
set underline off
set echo off
set term off
sET NEWPAGE 0
--SET SPACE 0
SET MARKUP HTML OFF SPOOL OFF
spool C:\text0728.txt;
SELECT DISTINCT a.m_name, a_code, a.p_id, a.p_name,
a.p_type, e._name, e.s_list from mname a,slist e
where a.p_id=e.p_id;
spool off;
my spool file looks like this
codename~matrix        ~888~nametarget           ~in~todao~~
codename1~matrix1        ~879~name           ~in~todao~
If we see matrix value have space *~matrix ~*
I want the value to spool with out the space i.e *~matrix~*
What to set for my requirment in sql file?
Thanks.

select a.m_name,
         regexp_replace(a_code,'[[:space:]]matrix[[:space:]]','matrix') as a_code,
         a.p_id,
         a.p_name,
         a.p_type,
         e._name, e.s_list *
from
     mname a,slist e
where
    a.p_id=e.p_id;                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

Similar Messages

  • How to seperate the data with comma seperator ??

    Hi,
      How to seperate the data with comma seperator ??
    E.g i havea row like
    Userid,number of days,Total Records
    user1,10,100000
    So,i will get 10,10000 in the same field and i need to seperate 10 and 10000 so what is the abap function for that
    Praff

    like this ...
    SPLIT field AT ',' INTO
       userid
       days
       records.
    is this what you need?
    Mike

  • How to sign the data with DHPrivateKey

    I am testing DH key exchange protocol. When I run the following code, it works.
    import java.io.*;
    import java.math.BigInteger;
    public class DH2 {
        private DH2() {}
        public static void main(String argv[]) {
            try {
                String mode = "USE_SKIP_DH_PARAMS";
                DH2 keyAgree = new DH2();
                if (argv.length > 1) {
                    keyAgree.usage();
                    throw new Exception("Wrong number of command options");
                } else if (argv.length == 1) {
                    if (!(argv[0].equals("-gen"))) {
                        keyAgree.usage();
                        throw new Exception("Unrecognized flag: " + argv[0]);
                    mode = "GENERATE_DH_PARAMS";
                keyAgree.run(mode);
            } catch (Exception e) {
                System.err.println("Error: " + e);
                System.exit(1);
        private void run(String mode) throws Exception {
            DHParameterSpec dhSkipParamSpec;
            if (mode.equals("GENERATE_DH_PARAMS")) {
                // Some central authority creates new DH parameters
                System.out.println
                    ("Creating Diffie-Hellman parameters (takes VERY long) ...");
                AlgorithmParameterGenerator paramGen
                    = AlgorithmParameterGenerator.getInstance("DH");
                paramGen.init(512);
                AlgorithmParameters params = paramGen.generateParameters();
                dhSkipParamSpec = (DHParameterSpec)params.getParameterSpec
                    (DHParameterSpec.class);
            } else {
                // use some pre-generated, default DH parameters
                System.out.println("Using SKIP Diffie-Hellman parameters");
                dhSkipParamSpec = new DHParameterSpec(skip1024Modulus,
                                                      skip1024Base);
            System.out.println("ALICE: Generate DH keypair ...");
            KeyPairGenerator aliceKpairGen = KeyPairGenerator.getInstance("DH");
            aliceKpairGen.initialize(dhSkipParamSpec);
            KeyPair aliceKpair = aliceKpairGen.generateKeyPair();
            System.out.println("ALICE: Initialization ...");
            KeyAgreement aliceKeyAgree = KeyAgreement.getInstance("DH");
            aliceKeyAgree.init(aliceKpair.getPrivate());
            byte[] alicePubKeyEnc = aliceKpair.getPublic().getEncoded();
            KeyFactory bobKeyFac = KeyFactory.getInstance("DH");
            X509EncodedKeySpec x509KeySpec = new X509EncodedKeySpec
                (alicePubKeyEnc);
            PublicKey alicePubKey = bobKeyFac.generatePublic(x509KeySpec);
            DHParameterSpec dhParamSpec = ((DHPublicKey)alicePubKey).getParams();
            System.out.println("BOB: Generate DH keypair ...");
            KeyPairGenerator bobKpairGen = KeyPairGenerator.getInstance("DH");
            bobKpairGen.initialize(dhParamSpec);
            KeyPair bobKpair = bobKpairGen.generateKeyPair();
            System.out.println("BOB: Initialization ...");
            KeyAgreement bobKeyAgree = KeyAgreement.getInstance("DH");
            bobKeyAgree.init(bobKpair.getPrivate());
            byte[] bobPubKeyEnc = bobKpair.getPublic().getEncoded();
            KeyFactory aliceKeyFac = KeyFactory.getInstance("DH");
            x509KeySpec = new X509EncodedKeySpec(bobPubKeyEnc);
            PublicKey bobPubKey = aliceKeyFac.generatePublic(x509KeySpec);
            System.out.println("ALICE: Execute PHASE1 ...");
            aliceKeyAgree.doPhase(bobPubKey, true);
            System.out.println("BOB: Execute PHASE1 ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            byte[] aliceSharedSecret = aliceKeyAgree.generateSecret();
            int aliceLen = aliceSharedSecret.length;
            byte[] bobSharedSecret = new byte[aliceLen];
            int bobLen;
            try {
                bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 1);
            } catch (ShortBufferException e) {
                System.out.println(e.getMessage());
            bobLen = bobKeyAgree.generateSecret(bobSharedSecret, 0);
            System.out.println("Alice secret: " +
              toHexString(aliceSharedSecret));
            System.out.println("Bob secret: " +
              toHexString(bobSharedSecret));
            if (!java.util.Arrays.equals(aliceSharedSecret, bobSharedSecret))
                throw new Exception("Shared secrets differ");
            System.out.println("Shared secrets are the same");
            System.out.println("Return shared secret as SecretKey object ...");
            bobKeyAgree.doPhase(alicePubKey, true);
            SecretKey bobDesKey = bobKeyAgree.generateSecret("DES");
            aliceKeyAgree.doPhase(bobPubKey, true);
            SecretKey aliceDesKey = aliceKeyAgree.generateSecret("DES");
            Cipher bobCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            byte[] cleartext = "This is just an example".getBytes();
    //        Signature signature = Signature.getInstance("SHA1withDSA");
    //        signature.initSign(bobKpair.getPrivate());
    //        signature.update(cleartext);
    //        byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);
            Cipher aliceCipher = Cipher.getInstance("DES/ECB/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey);
            byte[] recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in ECB mode recovered text is " +
                "same as cleartext");
            bobCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            bobCipher.init(Cipher.ENCRYPT_MODE, bobDesKey);
            cleartext = "This is just an example".getBytes();
            ciphertext = bobCipher.doFinal(cleartext);
            byte[] encodedParams = bobCipher.getParameters().getEncoded();
            AlgorithmParameters params = AlgorithmParameters.getInstance("DES");
            params.init(encodedParams);
            aliceCipher = Cipher.getInstance("DES/CBC/PKCS5Padding");
            aliceCipher.init(Cipher.DECRYPT_MODE, aliceDesKey, params);
            recovered = aliceCipher.doFinal(ciphertext);
            if (!java.util.Arrays.equals(cleartext, recovered))
                throw new Exception("DES in CBC mode recovered text is " +
                  "different from cleartext");
            System.out.println("DES in CBC mode recovered text is " +
                "same as cleartext");
    }I want to sign the data with Signature,So i add the following code to the sample.
            byte[] cleartext = "This is just an example".getBytes();
         Signature signature = Signature.getInstance("SHA1withDSA");
            signature.initSign(bobKpair.getPrivate());
            signature.update(cleartext);
            byte[] data = signature.sign();
            byte[] ciphertext = bobCipher.doFinal(cleartext);Run the code again, the output is
    Error: java.security.InvalidKeyException: No installed provider supports this key: com.sun.crypto.provider.DHPrivateKey
    What's wrong with the code, It seems that the bob's private key is not instance of DSAPrivateKey but DHPrivateKey.
    what's your comment? thanks a lot.

    slamdunkming wrote:
    thank sabre150 for your reply. But the key pair is generated when I use DH to exchange the secret key. Yes! It is a DH key pair and cannot be used for signing. The DH key pair can only be used for secret sharing.
    If I can not use this private key to sign the data, what can i do?Do I have to generate another key pair for signature? In that way, I will have two key pair. Yep. You can generate a DSA or an RSA key pair to be used for signing.
    Because I use http protocol to exchange the key to get the shared secret key, Yep.
    If I generate another key pair, how can i send the public key to server? Since public keys are 'public' then you can send them in the open to anyone you like. In fact, if you don't publish your public keys then they are pretty much a waste of time. The biggest problem one has with public key is proving 'ownership' - if someone sends me a public key how do I know that the sender is actually who they say they are?.
    I am confused.Some reading might help. A pretty good starting point is "Beginning Cryptography with Java" by David Hook published by Wrox.

  • How to submit the Data with Business rule auto executed with VBA in excel?

    Anyone knows how can I submit the data into planning with the business rule auto executed in planning?
    Currently, I am using HypExecuteCalcScriptEx () + HypSubmitData() in my program that auto executed the business rule prior saving the data into planning.
    However when it try to run HySubmitData(), the Business rule window pops up again and ask user to run the business rule again.
    Therefore, is there a way that I can submit the data with auto execute the business rule?
    many thanks, highly appreciate !!!!!!

    Hi Rafeek,
    One solution is to set the column width after manually or programmatically refresh the PivotTable, for example:
    Private Sub Worksheet_PivotTableUpdate(ByVal Target As PivotTable)
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Columns("A").ColumnWidth = 10
    End Sub
    Another option is to set the column width, then protect the columns from been updated by the user, before refreshing the PivotTable, unprotect the worksheet. For example:
    Public Sub LockColumnA()
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Columns("A").ColumnWidth = 10
    ws.Columns("A").Locked = True
    ws.Protect "123"
    End Sub
    Public Sub UnprotectWorksheet()
    Dim ws As Worksheet
    Set ws = Application.ActiveWorkbook.ActiveSheet
    ws.Unprotect ("123")
    End Sub
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • How to analyse the data with &without free form of planning

    Hello Expert's,
    I am new to this concept's and I want to know the difference between with Free form &without Free form in SmartView of Planning data.I need a navigation path to know the difference between these two.
    Thanks in advance

    Thanks, i think i figured it out. I changed the cpx files in my client projects to point to the new data source.
    And i also added the new data source on the Application Server: I added a new data source for each BC4J module (with the Enterprise Manager UI) and i also changed the data-sources.xml files in the directory j2ee/application-deployment and j2ee/applications.

  • How to check  the date with current day after 5 days

    Hello,
    I need to make the visible of delete button in my struts application. I've application in which user can be deactivated. If the user is deactivated and the admin can't delete the user for the specific period of time (set in property file). while deactivating the user, system time is set. and 5 days after the system time's set, i need to make the button visible.
    This is my code.
    Calendar cal = Calendar.getInstance();
    Date deActivatedDate = null;
    deActivatedDate =new Date(userData.getDeActivatedTime().getTime());// Set it in the Calendar object
    cal.setTime(deActivatedDate);                    // Add 5 days
    cal.add(Calendar.DATE, 5);// get the current date
    Calendar currentCal = Calendar.getInstance();
    Date currentDate = new Date();
    currentCal.setTime(currentDate);// check if the de-activation time is over.
    if (cal.get(Calendar.DATE) < currentCal.get(Calendar.DATE)) {
    userData.setDeletionAllowed(true);}
    can anyone help to solve this issue?

    What's the problem with the code that you posted?

  • How to restrict the data with Filter in Query - Updated the description

    Hi all,
    Free Characteristics: u2018Service Orderu2019 & u2018Statusu2019.
    Key Figures: u2018Response Timeu2019 & u2018Data Record Counteru2019.
    Calculated Key Figure: u2018Resp Time > 1 hru2019.
    Only u2018Plantu2019 is in ROWS and u2018Resp Time > 1 hru2019 & u2018Data Record Counteru2019 are in COLUMNS section.
    The report looks like the below:
    Plant---Resp Time > 1 hr -
    Data Record Counter
    100--1--
    2
    101--1--
    3
    After dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019 , the report looks like the below:
    Plant---Service Order -
    Resp Time > 1 hr ---Data Record Counter
    100--111--
    1
    100--120--
    1
    101--130--
    1
    101--141--
    1
    101--150--
    1
    I want only records whose u2018STATUSu2019 is u2018Yu2019. The u2018STATUSu2019 is u2018Blanku2019 for Service Orders 12, 13 & 15
    and those records should not be there in the report.
    The report should be like the below:
    After dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019, the report looks like the below:
    Plant---Service Order -
    Resp Time > 1 hr ---Data Record Counter
    100--111--
    1
    101--141--
    1
    After creating the Restricted KF u2018Countu2019 on u2018Data Record Counteru2019 by restricting u2018STATUSu2019 to u2018Yu2019 and
    dragging the u2018Service Ordersu2019 from u2018Free Characteristicsu2019, the Count shows ZERO :
    Plant---Service Order -
    Resp Time > 1 hr ---Count
    100--111--
    0
    100--120--
    0
    101--130--
    0
    101--141--
    0
    101--150--
    0
    If I keep the Filter (globally) on 'STATUS = Y' then it returns 'NO Data'.
    If I keep the u2018Service Ordersu2019 is in u2018Rowsu2019 and the Filter on u2018STATUSu2019 (u2018Yu2019) then it works fine, but the report should be based on PLANT.
    Thanks in advance.
    Reagrds,
    Venkat.

    Hi Gurus,
    Thanks for u r all prompt replies...
    Got the Solution...
    Actually no need to work at query level...
    iN Multiprovider.... we can select the WBS element Char for which ever cube data we want... just drop down the char in to the dimension which we need and R/click the Char select identification of participating char.. un-select the check box for char WBS element for the Cubes which we dont require the data......
    Thanks to all
    Cheers
    Lajwanth
    Edited by: Lajwanth Singh on Apr 27, 2010 10:41 PM

  • How to install the OS with out putting in all of your personnel info?

    I am ready to sell my MDD Mac. I want it to have a fresh load of 10.5 and 9.2. How do you stop the installation before you enter your name, IP, email address etc? When I first received my Mac 10.2 was installed and waiting for me to enter my personnel data. I want it in the same condition when my buyer receives it.
    Bob

    after you finish an erase and install reboot as prompted. upon reboot Setup Assistant will start. quit it using Command+q on the very first screen and shut down.
    Message was edited by: V.K.

  • How to get the data in order by date

    Hi,
    i am getting the data like bellow i need the data with out null values
    date     col1     col2     col3     col4
    16-Nov-11     23               
    17-Nov-11     12               
    18-Nov-11     321               
    19-Nov-11     23               
    20-Nov-11     132               
    16-Nov-11          2321          
    17-Nov-11          112          
    18-Nov-11          211          
    19-Nov-11          132          
    20-Nov-11          12          
    16-Nov-11               45     
    17-Nov-11               465     
    18-Nov-11               2123     
    19-Nov-11               132     
    20-Nov-11               65     
    16-Nov-11                    456
    17-Nov-11                    546
    18-Nov-11                    4656
    19-Nov-11                    566
    20-Nov-11                    564
    need out like below
    date     col1     col2     col3     col4
    16-Nov-11     23     2321     45     456
    17-Nov-11     12     112     465     546
    18-Nov-11     321     211     2123     4656
    19-Nov-11     23     132     132     566
    20-Nov-11     132     12     65     564
    Thanks in advance,
    Venkat.

    Hi, Venkat,
    user6552629 wrote:
    Hi,
    i am getting the data like bellow i need the data with out null values
    date     col1     col2     col3     col4
    16-Nov-11     23               
    17-Nov-11     12               
    18-Nov-11     321               
    19-Nov-11     23               
    20-Nov-11     132               
    16-Nov-11          2321          
    17-Nov-11          112          
    ...You may have noticed that this site noramlly compresses whitespace. As a result, it looks like col1 is present on every row, but col2, col3 and col4 are always NULL.
    Whenever you post formatted text on this site, type these 6 characters:
    \(small letters only, inside curly brackets) before and after each section of formatted text, to preserve spacing, so that your message can look like this:date          col1     col2     col3     col4
    16-Nov-11     23               
    17-Nov-11     12               
    18-Nov-11     321               
    19-Nov-11     23               
    20-Nov-11     132               
    16-Nov-11          2321          
    17-Nov-11          112          
    You want to take a table, that has multiple rows for the same dt, and produce a result set that has one row per dt.  That sound like a job for GROUP BY:SELECT     dt     -- DATE is not a good column name
    ,     MIN (col1)     AS col1
    ,     MIN (col2)     AS col2
    ,     MIN (col3)     AS col3
    ,     MIN (col4)     AS col4
    FROM     table_x
    GROUP BY dt     -- See note below
    ORDER BY dt
    Depending on your data and your requirements, you may need to use TRUNC (dt) in all 3 places where I used dt above.
    I hope this answers your question.
    If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and the results you want from that data.
    Explain, using specific examples, how you get those results from that data.
    Always say what version of Oracle you're using.
    You'll get better replies sooner if you post this information every time you have a question.
    Edited by: Frank Kulash on Nov 15, 2011 10:37 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                               

  • I have like five GB's of ghost data (data the device claims is not there but it is still taking up space) on my I pad 2 from a failed movie download attempt. How do I fix that with out resting my iPad? I have only 1GB left of storage

    I have like five GB's of ghost data (data the device claims is not there but it is still taking up space) on my I pad 2 from a failed movie download attempt. How do I fix that with out resting my iPad? I have only 1GB left of storage
    The movie had gotten to the point that I could watch it all the way through but it still said processing and got stuck at that point and when I turned off the wifi to try to restart it, it deleted its-self but did not free up any of the storage It was taking up
    Restarting my iPad does not help
    Some thing similar also happened to my old laptop when trying to download the iOS 5 update to my laptop when it came out. It kept getting disconnected and every time it would try to start over and act like what had already been downloaded was not there though it was still taking up the storage space.
    And it continued repeating until it took up all of my storage space. The data file would not show up anywhere so I had to restore my laptop to the factory settings and that worked for awhile but I eventually had to get a new laptop.

    Did you try to set it up as new device, as explained in this article?
    How to erase your iOS device and then set it up as a new device or restore it from backups
    If this does not work, use iTunes to set it back to factory settings, which would also install the latest software:
    Use iTunes to restore your iOS device to factory settings - Apple Support

  • My iPad Air is disabled after wrongpassword attempts.I didn't sync it with my laptop also. How can I restore it with out losing the data.

    My iPad Air is disabled after wrongpassword attempts.I didn't sync it with my laptop also. How can I restore it with out losing the data.

    You can't unlock it without losing data. It's too late for that now. You totally erase the iPad when you unlock it and you will have to start all over again. Most of your purchased content can be downloaded again.
    Forgot passcode for your iPhone, iPad, or iPod touch, or your device is disabled - Apple Support
    Download past purchases - Apple Support

  • How to delete the file with space in name

    Hi
    I want to delete the file "test ex.txt" file.
    i run the following command in command prompt.i can delete the file successfully.
    /bin/rm -f /mnt/"test ex.txt"
    I want to run the command from java.So i am using the following code
    String cmd = "/bin/rm -f /mnt/\"test ex.txt\"";
         Runtime rt = Runtime.getRuntime();
    process = rt.exec(cmd);
    The file was not deleted.
    How to delete the file with space in name?
    Help me

    Use the form of exec that takes an array of command + args.
    arr[0] = "/bin/rm"
    arr[1] = "-f"
    arr[2] = "/home/me/some directory with spaces";Or use ProcessBuilder, which is the preferred replacement for Runtime.exec, and which Runtime.exec calls.

  • I cant remember my password to logon to my mac, how can i change it with out needing the old one?

    i cant remember my password to logon to my mac, how can i change it with out needing the old one?

    http://support.apple.com/kb/HT1274

  • I purchased an ablum thru itunes on my phone and it says i purchased the songs on itunes but when i go on my music it says i have to repurchase all the songs how can i get the songs with out havin to pay again

    I purchased an ablum thru itunes on my phone and it says i purchased the songs on itunes but when i go on my music it says i have to repurchase all the songs how can i get the songs with out havin to pay again

    Whether you can redownload music depends upon what country that you in. If you are using your computer's iTunes then does music show in the Purchased link under Quicklinks on the right-hand side of the iTunes store home page (on your phone you might be able to redownload media via the Purchased tab in the iTunes store app) ? If music shows there, but not that album, then check to see if it's hidden : http://support.apple.com/kb/HT4919
    If you aren't in a country when you can redownload music and it's still on your phone then you should be able to copy it over from the phone via File > Devices > Transfer Purchases.

  • How do i fix my ipod if the computer says itunes cannot connecet to the ipod with out entering your password?but i turn on my ipod and it says disabled connect to itunes?

    how do i fix my ipod if the computer says itunes cannot connecet to the ipod with out entering your password?but i turn on my ipod and it says disabled connect to itunes?

    See Here  >  http://support.apple.com/kb/HT1808
    You may need to try this More than Once...

Maybe you are looking for