External Table with only one column

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • gyanendar
    New Member
    • Jun 2007
    • 90

    External Table with only one column

    Hi All,
    I need to create an external table to extract data from a flat file
    which having only one field.

    Also from that field first two character should not come in the table.

    Please help me .


    Regards,
    Gyanendar
  • Pilgrim333
    New Member
    • Oct 2008
    • 127

    #2
    Hi Gyanendar,

    Here is a link with info on the external table. If that doesn't work for you, post the problems you are encountering here.

    External tables

    Pilgrim

    Comment

    • gyanendar
      New Member
      • Jun 2007
      • 90

      #3
      Originally posted by Pilgrim333
      Hi Gyanendar,

      Here is a link with info on the external table. If that doesn't work for you, post the problems you are encountering here.

      External tables

      Pilgrim
      Thanks for the Reply.

      I created the table and its working.

      I need one more thing.
      I have to get all the value in the external table except first and last row.

      For 1st row SKIP N is working,but for last row i don't know how to do that.

      Could you please suggest me the way how to achieve this .

      Regards,
      Gyanendar

      Comment

      • amitpatel66
        Recognized Expert Top Contributor
        • Mar 2007
        • 2358

        #4
        you need to do a substr on your external table for the data coming form flat file. select the data from third position till the last whcih will help you eliminate first two characters

        Comment

        • debasisdas
          Recognized Expert Expert
          • Dec 2006
          • 8119

          #5
          please find a related discussion here.

          Comment

          • Pilgrim333
            New Member
            • Oct 2008
            • 127

            #6
            Hi,

            I think you are talking about the first and the last row, and not the first and last character. What I could find on the internet is the following:

            1. Add a parameter r type recnum to the access parameters in the create table statement of your external table.

            2. Make a view on the external table in which you omit the first and last row, using the recnum as criteria.

            If you have any problems, just post it here.

            Pilgrim.

            Comment

            • gyanendar
              New Member
              • Jun 2007
              • 90

              #7
              Originally posted by Pilgrim333
              Hi,

              I think you are talking about the first and the last row, and not the first and last character. What I could find on the internet is the following:

              1. Add a parameter r type recnum to the access parameters in the create table statement of your external table.

              2. Make a view on the external table in which you omit the first and last row, using the recnum as criteria.

              If you have any problems, just post it here.

              Pilgrim.
              Hi Pilgrim,
              If I create view of the data from external table one more object will get created in database.
              Can we have any other way to get around this .

              Regards,
              Gyanendar

              Comment

              • Pilgrim333
                New Member
                • Oct 2008
                • 127

                #8
                Hi,

                I don't think that is possible, unless you know what number the last number will be. If the last record always will be x then you can say skip x, otherwise you have to do it with the view.

                If anyone else has another solution, i would really like to know that.

                Pilgrim.

                Comment

                Working...