Junction table question

I have 3 Northwind tables, Employees, EmployeeTerritories, and Territories. I have a cross join table between Employees and Territories. I want to add a column to the cross join table. Each row will contain a 1 if the row employee has the row territory
and will contain a 0 otherwise. How do I do it?
Bill Swartz

>> I have 3 Northwind tables, Employees, Employee_Territories, and Territories. <<
Northwind is one of the worst sample schema in use. It has to show all of the features in T-SQL, so it is improperly written and it is full of ISO-11179 violations. Do not use it to learn RDBMS! For example, does that table model the set “Personnel” or the
single “Employee”, as you named it? 
>> I have a cross join table between Employees and Territories. <<
The term “junction table” is not RDBMS; it belong to one of the old Network Databases (I cannot remember which one). Even the use of the absurd “Employee_Territories” is the old Network convention of building the pointer structure from the names of the files
involved. 
There is no such thing as a “CROSS JOIN” table in RDBMS or Network Database. This is a relational join operator, not a table type! I think you mean a relationship table (that is where the R in RDBMS comes from).  
Look up 1:m (one to many), 1:1 (one to one) and n:m (many to many), cardinality, membership and the other terms that apply to relationships in RDBMS. You lack of DDL was doubly rude; we have no specs. I will guess each territory has one and only one employee
assigned to it (why not?). I will enforce this with DRI constraints. 
>> I want to add a column to the cross join [sic] table. Each row will contain a 1 if the row employee has the row territory and will contain a 0 otherwise. How do I do it? <<
BIT flags in RDBMS?? No, that was assembly language. This is worse than the network mindset. 
CREATE TABLE Territory_Assignments
(emp_id CHAR(10) NOT NULL UNIQUE  -- enforce 1:m
  REFERENCES Personnel(emp_id)
  ON UPDATE CASCADE
  ON DELETE CASCADE,
 territory_id CHAR(10) NOT NULL 
  REFERENCES Personnel(territory_id)
  ON UPDATE CASCADE
  ON DELETE CASCADE,
 PRIMARY KEY (emp_id, territory_id));
You lack basics and need to un-learn a lot. 
--CELKO-- Books in Celko Series for Morgan-Kaufmann Publishing: Analytics and OLAP in SQL / Data and Databases: Concepts in Practice Data / Measurements and Standards in SQL SQL for Smarties / SQL Programming Style / SQL Puzzles and Answers / Thinking
in Sets / Trees and Hierarchies in SQL

Similar Messages

  • Table question/problem

    This is an html table question, but since I am working with
    CF on this, I thought I would post here for help.
    I query and cfoutput the data in a table. The table has ten
    columns. The first five are alpha numeric and the last five are
    numeric. The output displays fine.
    What the want to do now is to put a black border around the
    number columns, the last five.
    I tried to make each column its own table, but that just puts
    a box around each value, the columns are not connected.
    How can I do this ?
    Thanks for helping.

    Put a thin black left border in the sixth column and a
    similar right border in the tenth (last) column.
    It is neater and advisable to use CSS.
    <style type="text/css">
    <!--
    .bdrLft {
    border-left-color:#000000;
    border-left-width:thin;
    -->
    </style>
    <td class="bdrLft">
    The inline formatting will look like:
    <td style="border-left-color:##000000;
    border-left-width:thin;">
    Do the same for the top border (last 5 column headers). The
    bottom border may be trickier. The idea is to apply bottom border
    at the last query count. One can do without the top and bottom
    borders, however.

  • ADF business component wizard with tables referencing junction table

    I have a three tables, user, devices and a link/junction table to map the user's assigned devices.
    <<user>>
    user_id
    user_name
    <<device>>
    device_id
    device_name
    <<userdevice>>
    user_id
    device_id
    I wanted to create a view page where I can search a user then display the list of devices assigned to this user. The association between these two tables is the userdevice table.
    Using the wizard alone couldn't satisfy my objective. Have you encountered the same issue? Thanks.

    Hi Cyrus
    I'm not sure which Wizard are you referring to; can you clarify?
    Which area of WebCenter Portal are you using where you're seeing this issue?
    ~Sripathy

  • Junction table and related tables

    Hi,
    I was given a junction table. Is there a SQL query that I can run on the junction table so that it returns me the 2 related tables? Please help. Thanks.

    Hi Anjela,
    I searched the oracle website and quite a lot of oracle pdfs that I had but could not get any term called "Junction table". Never mind...but I feel you must have termed it wrong. If possible please explain in detail about this which will help in answering your query.
    Regards,
    Murali Mohan

  • SQL Query question : how to add data to two tables connected by third Junction-table.

    Hello specialists.
    Maybe this is the wrong formum but I've got a question for which you probably have the answer, i hope.
    Situation
    John is member of Group_A and Group_B
    Bill is member of Group_B and Group_C
    Allison is member of Group_A and Group_E
    How can I create a query to input Allisons username into table 1 and groupmembership into table 2. Also updating the relationship within junction-table3 must be done automaticaly. I want to avoid duplicate records.
    The final situation I want is given in red text.
    The relationships between the tables are as follows
    Table1 (PK)ID-Userinfo    [ONE]    <------------> [MANY] Table3 ID-Userinfo
    Table3 (PK)ID-GroupInfo  [MANY] <------------> [ONE]   Table2 (PK)ID-GroupInfo
    Table1: UserInfo
    (PK)ID-Userinfo   UserName
    1                        John
    2                        Bill
    3                        Allison
    Table2: GroupInfo
    (PK)ID-GroupInfo  GroupName
    1                          Group_A
    2                          Group_B
    3                          Group_C
    4                          Group_E
    Table3: MemberOf
    (PK)ID-MemberOf  ID-UserInfo  ID-GroupInfo
    1                           1                 1
    2                           1                 2
    3                           2                 2
    4                           2                 3
    5                           3                 1
    6                           3                 4
    I hope you can help me cracking this nut.
    Thx in advance. Greetings Fred

    Hi RSingh
    May i comment something very small?
    Anyone who writes a response, done it on the assumption that he is writing the answer. Writing response is the statement of "I think that's correct". Each one that write a response see it as the answer. It makes no sense immediately mark your own
    answer too (double actions). Marking a response as "Propose as answer" is explicitly designed to
    allow others to announce that they think this is the best right answer in the thread, after the discussion :-)
    In my personal opinion, we should not mark our own answers. There are enough users with permissions, which would be glad to mark your answers as correct / recommended.
    Give us the opportunity, I will love to mark your answers :-). Moreover, by marking "Proposed as answer" you actually close the thread, other users which see that the question got an answer, may not check
    the thread at all, and maybe they could provide a different answer.
    * Exceptions are very specific cases. For example a case where the message has already become very old and no one marked anything. in this case marking "Proposed as answer" can help others and especially the person who ask the question, to focus
    on thread and the answer (more on the subject is in the Moderators forum and the Moderators Guide by the way).
    [Personal Site] [Blog] [Facebook]

  • Working off 3 junction tables...

    Greetings:
    My 3 dimensional skills are taxed with this query.
    I have 3 junction M2M tables-
    Bid to Code:
    junction_ID bid_ID cccode_ID
    Vendor to Code:
    ccjunction_ID cccategory_ID vendor_ID
    Vendor to bid (not used in this query)
    and one contact table, which contains vendor_new_ID (FK) and
    the email address I need to send a notification to.
    new_contact_ID vendor_new_ID contact_email
    I need to send out a notification email to all vendor
    contacts who have the corresponding code.
    I came up with:
    <cfquery name="list_sentto"
    datasource="#Request.BaseDSN#">
    SELECT new_contact_ID, vendor_new_ID, contact_email, bid_ID,
    cccode_ID, cccategory_ID, vendor_ID
    FROM lookup_contact, junction_bid_ccc, junction_vendor_ccc
    WHERE cccode_ID = cccategory_ID
    AND vendor_new_ID = vendor_ID
    AND ? (getting Cartesian product)
    </cfquery>
    which then does:
    <cfmail
    to="contact_email"
    from="systememail"
    subject="Bid Notification"
    server ="ourserver">
    = = = = = = = = = = = = = = = = = = = = = = = = = = =
    You are receiving this message because you are listed as a
    Vendor in our System.
    The following Bid Package has been posted:
    #link to PDF Document#
    Please Log-In to the Vendor Bidding Notification System to
    Access this Bid Package
    = = = = = = = = = = = = = = = = = = = = = = = = = = =
    </cfmail>
    Thanks for any help-
    rinorman

    If you have any control at all over your database design,
    re-do your many to many tables and get rid of the junctionid
    fields. They enable you to have records that are effectively
    duplicates of each other.
    For your current design, you need to do a "select distinct"
    to handle that part.
    For your specific question, does the contact_new_id refer to
    anything in either of the other tables you mentioned?

  • SQL and External table question

    Hello averyone,
    I have a file to be read as an external table part of it is below:
    ISO-10303-21;
    HEADER;
    FILE_DESCRIPTION((''),'2;1');
    FILE_NAME('BRACKET','2005-07-08T',('broilo'),(''),
    'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400',
    'PRO/ENGINEER BY PARAMETRIC TECHNOLOGY CORPORATION, 2004400','');
    FILE_SCHEMA(('CONFIG_CONTROL_DESIGN'));
    ENDSEC;
    DATA;
    #5=CARTESIAN_POINT('',(5.5E0,5.5E0,-5.1E1));
    #6=DIRECTION('',(0.E0,0.E0,1.E0));
    #7=DIRECTION('',(-1.E0,0.E0,0.E0));
    #8=AXIS2_PLACEMENT_3D('',#5,#6,#7);
    The first question is: how to ignore the lines until the DATA; line or SQL already does it for me?
    The second question is: since the fields of interest are separated by commas and the first field does not interest me (it is solved with a varchar2) how can I read the following fields as numbers ignoring the (,# and ) characters please?
    Thanks for any help.
    Sincerely yours,
    André Luiz

    The SKIP option can be used with SQL*Loader to skip a certain number of lines before starting to load. Off hand I cannot see any easy way to load the data in the format given. The format does not resemble a typical CVS format. You can look at the test cases provided for SQ*Loader in the Oracle® Database Utilities guide - or simply write PL/SQL code to load this data manually using UTL_FILE.

  • Parent child table question

    HI i have some questions which iam unclear please help me
    1) in a parent child relationship.. is it always 1-m relation from parent to child?
    2) can a parent table be on many side? i.e can a child - parent be 1- m?
    3) if i itake employee as child table and department as parent table then dept_id will be the foreigh key in employee table ...
    Now if i want to add a new employee who is not assigned to any department can i add it ?
    4) In an identifying relationship ... a child table has concatenated primary key (pk of child,pk of parent)
    should we still add any other primary key to the table....in addition to this concatenated key?
    thanks in advance
    raj

    Hi!
    1) in a parent child relationship.. is it always 1-m relation from parent to child?
    yes unless you create a unique index on the foreign key column
    2) can a parent table be on many side? i.e can a child - parent be 1- m?
    no, if you need an n-m you will need an intersection table
    e.g. employees - emp_dept - departments
    in this case the emp_dept table would contain the foreign keys of employees and departments
    3) if i itake employee as child table and department as parent table then dept_id will be the foreigh key in employee table ...
    Now if i want to add a new employee who is not assigned to any department can i add it ?
    no, you will have to insert the master first
    Best regards,
    PP

  • Internal table question

    Hi Everybody-
    I am very new to SAP and i have question regarding internal tables. I have struture called "ZMI_VENDOR_TO_BW_GENERIC_V_TAB" which i get from another sap system thru SAP XI. Now i need to traverse thru this structure  and add these values into custom database table. So i have declared an internal table like below
    <b>data:itab_venkat type ZMI_VENDOR_TO_BW_GENERIC_V_TAB occurs 10.
      data vendorid type c.
      itab_venkat = Input-Generic_Vendor-Generic_Vendor_Record1.
      LOOP AT itab_venkat.
      vendorid = itab_venkat-generic_vendor_id1.
    endloop.
    </b>
    i am getting an error saying occurs cannot be used and also getting an error at the loop statement, Can somebody please correct me, i am very new to SAP.in the loop i am getting the vendor id and then i should update the database table.
    Please help me.
    Thank you
    Venkat

    hi venkat,
    check these links..
    http://cma.zdnet.com/book/abap/index.htm
    http://www.sapdevelopment.co.uk/
    http://www.sap-img.com/
    http://juliet.stfx.ca/people/fac/infosys/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d3/2e974d35c511d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/d6/0db357494511d182b70000e829fbfe/frameset.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://www.sapgenie.com/abap/example_code.htm
    http://www.geocities.com/SiliconValley/Campus/6345/abapindx.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://www.sap-img.com/abap-function.htm
    http://www.sapgenie.com/abap/code/abap19.htm
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://help.sap.com/saphelp_40b/helpdata/ru/d6/0dc169494511d182b70000e829fbfe/applet.htm
    http://www.henrikfrank.dk/abapexamples/SapScript/symbols.htm
    http://www.henrikfrank.dk/abapexamples/index.html
    http://sap.ittoolbox.com/documents/document.asp?i=752
    http://members.aol.com/_ht_a/skarkada/sap/
    http://sappoint.com/abap/
    http://members.tripod.com/abap4/SAP_Functions.html
    http://members.ozemail.com.au/~anmari/sap/index.html
    http://www.planetsap.com/Userexit_List.htm
    http://www.planetsap.com/Tips_and_Tricks.htm
    http://www.kabai.com/abaps/q.htm
    http://www.planetsap.com/Userexit_List.htm
    http://help.sap.com/saphelp_bw21c/helpdata/en/c4/3a8090505211d189550000e829fbbd/frameset.htm
    http://www.sapgenie.com/abap/bapi/example.htm
    http://help.sap.com/saphelp_45b/helpdata/en/65/897415dc4ad111950d0060b03c6b76/content.htm
    http://www.sap-basis-abap.com/index.htm
    http://help.sap.com/saphelp_40b/helpdata/en/fc/eb2c46358411d1829f0000e829fbfe/frameset.htm
    http://help.sap.com/saphelp_46c/helpdata/en/aa/aeb23789e95378e10000009b38f8cf/frameset.htm
    http://www.geocities.com/ResearchTriangle/1635/system.html
    http://www.sapdesignguild.org/resources/MiniSG/3_Managing/3_Functions_Table_Control.htm
    http://help.sap.com/saphelp_45b/helpdata/en/d1/801bdf454211d189710000e8322d00/content.htm
    http://www.sapfans.com/sapfans/repos/saprep.htm
    http://www.planetsap.com/howdo_a.htm
    http://help.sap.com/saphelp_util464/helpdata/en/69/c2516e4ba111d189750000e8322d00/content.htm
    http://www.sapgenie.com/abap/smartforms_detail.htm
    http://www.sap-img.com/abap.htm
    http://help.sap.com/saphelp_46c/helpdata/en/fc/eb2d67358411d1829f0000e829fbfe/content.htm
    http://www.geocities.com/victorav15/sapr3/abap.html
    http://www.henrikfrank.dk/abapexamples/SapScript/sapscript.htm
    http://abap4.tripod.com/Other_Useful_Tips.html
    http://help.sap.com/saphelp_45b/helpdata/en/cf/21ee2b446011d189700000e8322d00/content.htm
    http://www.sap-basis-abap.com/sapmm.htm
    http://sap.ittoolbox.com/nav/t.asp?t=303&p=448&h1=303&h2=322&h3=448
    http://sapfans.com/
    http://cma.zdnet.com/book/abap/ch03/ch03.htm
    http://help.sap.com/saphelp_40b/helpdata/en/4f/991f82446d11d189700000e8322d00/applet.htm
    http://sappoint.com/abap/
    http://www.henrikfrank.dk/abapuk.html
    http://www.sts.tu-harburg.de/teaching/sap_r3/ABAP4/abapindx.htm
    http://www.sapgenie.com/abap/index.htm
    http://www.sap-img.com/abap.htm
    http://www.sapdevelopment.co.uk/tips/tipshome.htm
    http://help.sap.com/printdocu/core/Print46c/en/Data/Index_en.htm
    http://sap.ittoolbox.com/nav/t.asp?t=322&p=322&h1=322
    http://sap.ittoolbox.com/nav/t.asp?t=448&p=448&h1=448
    http://www.thespot4sap.com/
    http://www.kabai.com/abaps/q.htm
    http://www.geocities.com/mpioud/Abap_programs.html
    http://www.sapgenie.com/abap/tips_and_tricks.htm
    http://www.sapassist.com/code/d.asp?whichpage=1&pagesize=10&i=10&a=c&o=&t=&q=&qt=
    For FAQ
    http://www.sap-img.com/abap/more-than-100-abap-interview-faqs.htm
    http://www.sapgenie.com/faq/abap.htm

  • Temp table Question

    In Oracle... can we use temp tables in procedures??? what would be the performance issue if I use a temp table in procedure?? After the procedure is run.. how can I assure that the temp table is deleted???

    Hi,
    You have miss interpreted Justin. He clearly replied all your questions which you have highlight in you 2nd post. You can use global temporary table in procedures but nto in manner in which you are using.
    First of all your creation of temporary table inside a procedure is wrong. Create this table at SQL> prompt, as you create normal tables.
    I don't see any requirment in which you have to create a table inside a procedure. The thing you are trying is not logical. Secondlly, you are firing a DDL statement inside a procedure so, you have to EXECUTE_IMMEDIATE.
    Now, we come back to temporary table. You create temporary table on the SQL> prompt and use this table in your procedure as normal table. Perform any insert, update or delete on this table. Different user who perform DML on this table will have their own copy of data, means every user working on temporary table has it own copy of data.
    Regarding the delete of data. You dont' have to worry bout this as oracle itself truncate data from temporary table when user finised with his session.
    Any other doubt on temporary tables welcomed........

  • Filter Table question

    Question regarding 'local menu | Filter Table' option.
    I have a long sheet (1000+ entries) that has customer names in a column.  There is over 200 distinct customers in this column.  However, when I choose the above option, it only shows 25 names.
    Is this a known limit?  If so, is it possible to change the names that show on the list, so the most frequent / common names are shown?
    Just looking for a quick on-the-fly quick filtering which I do dozens of times per day.
    P.S  Trying to switch from Excel for Mac which does have this capability.
    Thanks
    Nick

    I am just wondering if there is a hard limit of 25 entries that are shown, no matter how many different names there are. 
    It appears that the maximum number is 25 entries in the dropdown filter list. However, you can filter on any value you want via Edit Table Filters in the dropdown or by clicking the Filter icon upper right.
    SG

  • Basic table question - include empty rows

    Hi msdn,
    I create SSRS reports for MS CRM 2011 in Visual Studio Shell 2010 (SQL Server 2012).
    For
    my Dataset, i use fetch xml from the crm. 
    I'm currently creating a report which  should list all the lost opportunities from one year grouped by the reason(statuscode)
    of their loss.
    The table below is working but it doesn't include "empty statuscodes"(Reasons with no opportunities attached to
    it)
    (Stückzahl 2013 = number of opportunities) (Angebotssumme 2013= Sum of all opportunities in CUR)
    I have a list in my crm with all the possible reasons, a number of  25 Statuscodes.
    I want them all to appear in the table and when there is no lost opportunity linked to it, just display a 0.
    Below is my dataset query and as you see, i select the opportunity first and statuscode is a field in it
    <fetch version="1.0" output-format="xml-platform" mapping="logical" distinct="true">
    <entity name="opportunity">
    <attribute name="name" />
    <attribute name="customerid" />
    <attribute name="estimatedvalue" />
    <attribute name="statuscode" />
    <attribute name="opportunityid" />
    <order attribute="name" descending="false" />
    <filter type="and">
    <condition attribute="statecode" operator="eq" value="2" />
    <condition attribute="statuscode" operator="not-null" />
    <condition attribute="estimatedvalue" operator="not-null" />
    <condition attribute="actualclosedate" operator="not-null" />
    </filter>
    <link-entity name="new_automatisierung" from="new_verkaufschance" to="opportunityid" alias="ae"></link-entity>
    </entity>
    </fetch>
    So my question is which possibilities i have to achive my goal?
    Is it even possbile with this dataset?
    I hope i made it clear enouth for you guys to understand. As you can see, im fairly new to SSRS.
    Thank you in advance

    Hi there,
    You may need two queries to do this, #1 to retrieve status codes & opportunities and #2 above query to get details.  Bind the table to #1 query.  Then use lookup or lookupset function to retrieve results from #2.
    http://technet.microsoft.com/en-us/library/ee210531.aspx
    You might have more luck in Dynamics forum.
    http://community.dynamics.com/crm/f/117/t/108149.aspx
    cheers,
    Andrew
    Andrew Sears, T4G Limited, http://www.performancepointing.com

  • Transaction PP02 / HRP1001 table question

    Hi Friends,
    We're creating new objects under different categories (example., Department, Operating Unit) in transaction PP02. I have the following questions in regards with this?
    1. Is the information stored in the backend in database tables HRP1000 / HRP1001 / HRP1002?
    2. How can we differentiate between the objects stored in different category (example., Department, Operating Unit). FYI... all of these categories are having same plan version, object type, infotype, subtype, and planning status.
    Regards,
    Aman

    Hi,
    Why can't you simply make use of short text and long text within infotype 1000? You could use, for instance, D or OU to distinguish. For example: D - Sales, OU - Procurement etc.
    Infotype 1003 serves a different purpose. Per my knowledge, it allows you to flag objects that do not take part in normal reporting. It influences how objects appear in a structure (side-by-side vs hierarchy). Please check the following SAP help on it:
    http://help.sap.com/erp2005_ehp_04/helpdata/en/bb/bdb282575911d189240000e8323d3a/frameset.htm
    Infotype 1002 is helpful but it will just add to user maintenance. Also, the descriptions are not stored in HRP1002. You have to pick the reference number (TABNR) for an entry and then read HRT1002 to get the description from field TLINE.
    HRP1000 on the other hand stores short text and long text, so it is easier to read and report on. Short text and long text also appear when you view the structure through PPOSE and also available on user record on IT0001.
    Hope this helps.
    Donnie

  • Oracle Pl/Sql table question..

    Hi guys,
    I have an Oracle PL/SQL question. I don't
    know which board can i ask it. This is why
    i am asking here.
    I declare a PL/SQL table(traditional array),
    and populate it in a session. Another user logged on with another session and wanted to access this PL/SQL table data, But He/she received "No Data Found".
    Is the PL/SQL table session scope?
    Pl/Sql table declared in Package Spec
    and the procedures to populate and
    access the data in/from this Pl/Sql table
    are coded in package body.
    Thanks...Ali
    null

    Hi guys,
    I have an Oracle PL/SQL question. I don't
    know which board can i ask it. This is why
    i am asking here.
    I declare a PL/SQL table(traditional array),
    and populate it in a session. Another user logged on with another session and wanted to access this PL/SQL table data, But He/she received "No Data Found".
    Is the PL/SQL table session scope?
    Pl/Sql table declared in Package Spec
    and the procedures to populate and
    access the data in/from this Pl/Sql table
    are coded in package body.
    Thanks...Ali
    null

  • Extenal Table question..

    Hi everyone,
    I am new to working on "EXTERNAL TABLES".Is it possible to add another column(which is not
    in the flat file) with a "defalut value" ?
    I am just trying to create a simple "EXTERNAL TABLE"..
    question 1
    ==========
    EX:
    ===
    Flat file that i get will be like this (sample)
    ENG,England,English
    SCO,Scotland,English
    IRE,Ireland,English
    WAL,Wales,Welsh
    If i create a external table like the following everyting would be fine..
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
      LOCATION ('Countries1.txt','Countries2.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;
    but i need another column with a "default value" "N"  which is not in flat file
    CREATE TABLE countries_ext (
      country_code      VARCHAR2(5),
      country_name      VARCHAR2(50),
      country_language  VARCHAR2(50)
    ORGANIZATION EXTERNAL (
      TYPE ORACLE_LOADER
      DEFAULT DIRECTORY ext_tables
      ACCESS PARAMETERS (
        RECORDS DELIMITED BY NEWLINE
        FIELDS TERMINATED BY ','
        MISSING FIELD VALUES ARE NULL
          country_code      CHAR(5),
          country_name      CHAR(50),
          country_language  CHAR(50)
        -- Valid_flag default value "N"  Is it possible to add this
                                         column while creating the external table?
                                         this column is not there in the flat file.
      LOCATION ('Countries1.txt','Countries2.txt')
    PARALLEL 5
    REJECT LIMIT UNLIMITED;
    quetion2
    ========
    LOCATION ('Countries1.txt','Countries2.txt')
    I have multiple files (around 150) which are in the same format.
    Do i have to mention all the file names in the location clause? if i have to create a table
    on those 150 file?
    Ex  LOCATION ('Countries1.txt','Countries2.txt','Countries3.txt','Countries4.txt','Countries5.txt','Countries6.txt','Countries7.txt','Countries8.txt', and so on....)
    or
    Is it possible to put (countries*.txt)?sorry if this topic have discussed somewhere in the forum.
    Thanks
    phani

    Hi Hoek,
    thanks for the reply...
    You could also just select an extra 'N' when selecting from your external table:You are correct hoek..we can do like that too..but i would like to know is it possible to
    have that column in the table itself ?
    ex: when creating the external table..something like the following
    valid_flg  default value 'N'  Is it possible to put (countries*.txt)?
    Just give it a try?
    I tried it before posting this forum..it is not taking the file names like that...and it is throwing error..
    is there any other option to specify multiple files?thanks
    phani

Maybe you are looking for

  • Adhoc Query : Auth

    Hi All, I want to restrict a User for a custom craeted Adhoc Query created. In, T.Code : S_PH0_48000510 - Personnel Management -> Administration -> Info System -> Ad Hoc Query User Group : ZHRPAYROLL Infoset : ZHRPAY Query : EmpMaster How do give aut

  • Special G/L indicator in SD/FI Interfaces

    Hi, good morning for everybody. I have the next question: I want to know if it is possible to make posting to a G/L account with a Special G/L indicator, from the interface SD/FI. for example, i create a bill doc with VF01 tcode, and i want to post (

  • Problem with northbridge fan mod

    hey, i just received a K8n neo platinum socket 754, and noticed that the northbridge is passively cooled.  After searching for a thread on this forum for instructions on how to add a fan, i bought http://www.compusa.com/products/product_info.asp?prod

  • Assigning object name dynamically !!!

    Dear Friends, Is it possible to assign the object name dynamically. Something like this ... class DynamicObject public static void main(String ggg[]) int runtime= ....getNumber(); // ... some method which returns int and val returned is dynamic for (

  • I'm having an issue on All ADOBE reader/flasher player opening window on Mac OSX Lion

    I have tons of error when i'm openning Adobe reader/Adober flash player/Adobe application manager. When i went check out the Library/Adobe appiication support, it's missing and i can't get it to open. What are the solution to make this work. Cause i