Results 1 to 3 of 3
  1. #1
    Join Date
    Sep 2003
    Location
    FRANCE
    Posts
    2

    Unanswered: Sqlplus Set Parameter

    Hi,
    Didn't find any response for my problem in the already submitted questions.
    Env :
    - Windows 2000 Server
    - Oracle 8i
    - SQL*PLUS Release 8.1.7.0.0

    Facts :
    - table MATRICULE with 2 columns :
    OLD_MAT NOT NULL VARCHAR2(15)
    NEW_MAT NOT NULL VARCHAR2(10)
    - data in this table (ex)
    OLD_MAT NEW_MAT
    ---------- -----------
    920001 00001
    952563 00025
    ...
    - SET parameter on SQLPLUS session :
    set head off
    set feed off
    set colsep ";"
    set pages 0

    Problem :
    I want to spool the result of a select * from MATRICULE in a file for having :
    920001;00001
    952563;00025
    ...
    BUT with those SET parameters I have :
    920001 ;00001
    952563 ;00025
    ...
    How can I avoid spaces before ";" in my result file ?

    Thanks for your solution.

  2. #2
    Join Date
    Mar 2002
    Location
    Reading, UK
    Posts
    1,137
    try

    select trim(OLD_MAT) ||';'||trim(NEW_MAT) from MATRICULE

    Alan

  3. #3
    Join Date
    Sep 2003
    Location
    FRANCE
    Posts
    2

    Thumbs up

    Thanks Alan

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •