"a defined column of ambiguous way."

0 down vote favorite

Can someone help me please. When I run this code, whenever I get "ambiguously defined column. Can not solve this problem, I can understand the cause of this error.

SELECT dc.name, COUNT(am.idn), adm.count
FROM vpdgk.vp_admin am
INNER JOIN vpdgk.vp_mufettish mf ON am.mufet_id = mf.IDN
INNER JOIN dictionaries.customs_main dc ON dc.code_int = mf.FIRM
LEFT JOIN (
SELECT C.MUFET_ID, d.name name, b.name, COUNT(c.MUFET_ID) count
FROM vpdgk.vp_qeydiyyat A
INNER JOIN vpdgk.vp_mufettish b ON b.IDN = A.mufet_id
INNER JOIN vpdgk.vp_admin c ON c.mufet_id = A.mufet_id
  
AND (c.uid_ is not null or c.uid_reserv is not null)
INNER JOIN dictionaries.customs_main d ON d.code_int = b.FIRM
WHERE TRUNC(A.INSERT_DATE) BETWEEN TO_DATE('01.01.2015','DD.MM.YYYY')
  
AND TO_DATE('30.01.2015','DD.MM.YYYY')
GROUP BY C.MUFET_ID, d.name, b.name
Having COUNT(c.MUFET_ID) < 10) adm
ON dc.name = adm.name
GROUP BY dc.name, adm.count;

Is name d.name, b.name, they are both called name of subquery ADM.

Do something like this

SELECT dc.name, COUNT (am.idn), adm.count

FROM: vpdgk.vp_admin

INNER JOIN vpdgk.vp_mufettish ON am.mufet_id mf is mf. IDN

INNER JOIN dictionaries.customs_main ON dc.code_int dc is mf. CABINET

LEFT JOIN)

SELECT C.MUFET_ID, name of d.name, Anom b.name, COUNT County (c.MUFET_ID)

OF vpdgk.vp_qeydiyyat A

INNER JOIN vpdgk.vp_mufettish b ON b.IDN = A.mufet_id

INNER JOIN vpdgk.vp_admin c ON c.mufet_id = A.mufet_id

(C.uid_ is not null and c.uid_reserv is not null)

INNER JOIN dictionaries.customs_main d.code_int d = b.FIRM

WHEN TRUNC (A.INSERT_DATE) BETWEEN TO_DATE ('01.01.2015 ',' DD.) MM YYYY')

AND TO_DATE ('30.01.2015 ',' DD.) MM YYYY')

GROUP OF C.MUFET_ID, d.name, b.name

Having COUNT (c.MUFET_ID)< 10)="">

ON dc.name = adm.name

Dc.name GROUP, adm.count;

Tags: Database

Similar Questions

  • I want to get only year sysdate with my name of the defined column. but not able to get it.

    I want to get only year sysdate with my name of the defined column. but not able to get it.

    SQL > select to_char (sysdate, 'yyyy') as 'mahesh tyagi' from dual;

    Mahé

    ----

    2015

    SQL > select to_char (sysdate, 'yy') as 'Manu' from dual;

    my

    --

    15

    So I couldn't do 'Manu' or "mahesh tyagi" as the column name.

    The column name is "mahesh tyagi" is simply displayed it shortened to sqlplus due to the known values in the column length.

    create table year_test select to_char (sysdate, 'yyyy') "mahesh tyagi" double;

    year_test / / DESC

    You can change the way sqlplus displays the header of column with something like

    column "mahesh tyagi" format a15

  • Defined column ambiguous error with the Merge statement

    Hi guys,.
    I get the ' Error (136,4): PL/SQL: ORA-00918: column ambiguously defined "error with the following query of fusion,
    MERGE INTO Inv_Stk_Trns_Tail a
       USING (SELECT b.*, c.*
       FROM OLR b ,Inv_Stk_Trns_Tail c 
       WHERE b.Trn_Type <> '0'
         AND b.VoucherType IS NOT NULL
         AND b.VoucherType = 'SF'
         AND b.Item_Code = c.Item_Code
         AND c.PROPERTY = 0) src
       ON (a.Sl_No = src.Sl_No and a.Ref_No = src.Ref_No )
       WHEN MATCHED THEN UPDATE SET Item_Avg_Ppr = src.Opn_Avg_Cost,
                                    Rate_Bc = src.Opn_Avg_Cost;
    I tried to solve the problem in a lot of ways, but no use. Please help me solve this problem. If you want more details, I'll give you.
    Thank you
    RAM

    SELECT B.*, c.

    Try all the (necessary) columns on the code and the name of each column a unique alias.

  • Friday afternoon the fog... brain ambiguously defined columns?

    It is a Friday and I just want to go home because I can not for the life of see me why I get an error of ambiguous column defined here? :

    I associate myself with a main CMD querey which works very well in a small Protocol table downstairs...

    SELECT distinct
    CMD."BI_SRV_LOC_NBR" LIKE Loc1,.
    Protocol. "' BI_SRV_LOC_NBR ' AS Loc2

    Of

    (SELECT DISTINCT
    'BI_SO_MASTER '. "" BI_SO_NBR, "
    'BI_WRKFLW_TASKS '. "" BI_TASK_CD, "
    'BI_WRKFLW_TASKS '. "" BI_WORKGRP, "
    'BI_SO_MASTER '. "" BI_SO_STAT_CD, "
    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_KEY, "
    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_TASKS_KEY, "
    'BI_WRKFLW_TASKS '. "" BI_EVENT_DT_TM, "
    'BI_WRKFLW_TASKS '. "" BI_NEEDED_DT_TM, "
    'BI_SO_TYPE_REF '. "" BI_SO_TYPE_DESC, "
    'BI_WRKFLW_TASKS '. "" BI_CRITICAL_TASK_SW, "
    'BI_SO_MASTER '. "" BI_WO_WORKORD, "
    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_TASK_SEQ_NBR, "
    'BI_TASK_REF '. "" BI_TASK_DESC, "
    'BI_WRKFLW_TASKS '. "" BI_WORK_EVENT_CD, "
    'BI_WRKFLW_TASKS '. "" BI_TASK_RMKS, "
    'BI_WRKFLW '. "" BI_WRKFLW_KEY, "
    'BI_RESOURCE_REF '. "" BI_RESOURCE_NM, "
    'BI_PERSONAL '. "" BI_FORMAT_NAME, "
    'BI_SO_MASTER '. "" BI_SO_FULL_NM, "
    'BI_SO_MASTER '. "" BI_OPEN_DT, "
    'BI_SO_MASTER '. "" BI_CLOSE_DT, "
    'BI_WRKFLW_TASKS '. "" BI_DURATION_DAYS, "
    'BI_WRKFLW '. "" BI_EVENT_DT_TM, "
    'BI_SO_MASTER '. "" BI_SO_DESC, "
    'BI_TYPE_SERVICE '. "" BI_PRIM_RATE_SCHED, "
    'BI_SO_DET_VIEW_1 '. "" BI_SO_TYPE_CD, "
    'BI_SO_DET_VIEW_1 '. "" ACCT_NBR, "
    'BI_SO_DET_VIEW_1 '. "" CUST_NBR, "
    'BI_RDG '. "" BI_DMD_MULT, "
    'BI_RDG '. "" BI_MTR_MULT, "
    'BI_SO_DET_VIEW_1 '. "" BI_MAP_LOC_NBR, "
    'BI_SO_DET_VIEW_1 '. "" BI_SRV_LOC_NBR ".
    Of
    ((("CIS54025". "BI_SO_MASTER" "BI_SO_MASTER"
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_SO_TYPE_REF ' 'BI_SO_TYPE_REF '.
    WE
    'BI_SO_MASTER '. "" BI_SO_TYPE_CD "=" BI_SO_TYPE_REF. " ("' BI_SO_TYPE_CD")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_SO_DET_VIEW_1 ' 'BI_SO_DET_VIEW_1 '.
    WE
    'BI_SO_MASTER '. "BI_SO_NBR"= "BI_SO_DET_VIEW_1". ("' BI_SO_NBR")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_WRKFLW ' 'BI_WRKFLW '.
    WE
    'BI_SO_DET_VIEW_1 '. "" BI_WRKFLW_KEY "=" BI_WRKFLW. " ("' BI_WRKFLW_KEY")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_RDG ' 'BI_RDG '.
    WE
    'BI_SO_DET_VIEW_1 '. "" ACCT_NBR "=" BI_RDG. " ("' BI_ACCT")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_TYPE_SERVICE ' 'BI_TYPE_SERVICE '.
    WE
    'BI_RDG '. "" BI_ACCT "=" BI_TYPE_SERVICE. " ("' BI_ACCT")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_AR ' 'BI_AR '.
    WE
    ("BI_TYPE_SERVICE". "" BI_ACCT "=" BI_AR. " ("' BI_ACCT")
    AND ("BI_TYPE_SERVICE". "" BI_TYPE_SRV "=" BI_AR. " (("" BI_TYPE_SRV "))
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_CONSUMER ' 'BI_CONSUMER '.
    WE
    'BI_AR '. "" BI_ACCT "=" BI_CONSUMER. " ("' BI_ACCT")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_PERSONAL ' 'BI_PERSONAL '.
    WE
    ("BI_CONSUMER". "" BI_PER_ACCT "=" BI_PERSONAL. " ("' BI_ACCT")
    AND ("BI_CONSUMER". "" BI_CUST_NBR "=" BI_PERSONAL. " (("" BI_CUST_NBR "))
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_WRKFLW_TASKS ' 'BI_WRKFLW_TASKS '.
    WE
    'BI_WRKFLW '. "" BI_WRKFLW_KEY "=" BI_WRKFLW_TASKS. " ("' BI_WRKFLW_KEY")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_TASK_REF ' 'BI_TASK_REF '.
    WE
    'BI_WRKFLW_TASKS '. "" BI_TASK_CD "=" BI_TASK_REF. " ("' BI_TASK_CD")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_TASK_ASG_SCHED ' 'BI_TASK_ASG_SCHED '.
    WE
    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_TASKS_KEY "=" BI_TASK_ASG_SCHED. " ("' BI_WRKFLW_TASK_KEY")
    LEFT OUTER JOIN
    "xxxxx." ' ' BI_RESOURCE_REF ' 'BI_RESOURCE_REF '.
    WE
    'BI_TASK_ASG_SCHED '. "" BI_RESOURCE_ID "=" BI_RESOURCE_REF. " "" BI_RESOURCE_ID ".
    WHERE
    'BI_WRKFLW_TASKS '. "BI_WORK_EVENT_CD" = "COMP"
    AND ("BI_TYPE_SERVICE". "BI_PRIM_RATE_SCHED"= "001"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "001NS"
    (OR 'BI_TYPE_SERVICE'. ' BI_PRIM_RATE_SCHED '= '002'
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED"= "010"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "010NS"
    (OR 'BI_TYPE_SERVICE'. ' BI_PRIM_RATE_SCHED '= '020'
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "020NS"
    (OR 'BI_TYPE_SERVICE'. ' BI_PRIM_RATE_SCHED '= '085'
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "085I"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "085NS"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED"= "086"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "086NS"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "SRC"
    (OR 'BI_TYPE_SERVICE'. "BI_PRIM_RATE_SCHED" = "RHCNS"
    (OR 'BI_TYPE_SERVICE'. «BI_PRIM_RATE_SCHED "="RHR ""
    (OR 'BI_TYPE_SERVICE'. ("" BI_PRIM_RATE_SCHED "=" RHRNS ")
    AND ("BI_SO_TYPE_REF". "BI_SO_TYPE_DESC" = "end $Billing point"
    AND "BI_TASK_REF". ' BI_TASK_DESC ' = '$Billing reading/Service check.
    (OR 'BI_SO_TYPE_REF'. "BI_SO_TYPE_DESC" = "$Cutoff"
    AND "BI_TASK_REF". "BI_TASK_DESC" = "$déconnexion meter.
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC "=" $De-energize/Re-energize "»
    AND "BI_TASK_REF". "BI_TASK_DESC" = "$désexcite Service"
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC "=" $$ disconnect Service»»
    AND "BI_TASK_REF". "BI_TASK_DESC" = "$déconnexion meter.
    (OR 'BI_SO_TYPE_REF'. "BI_SO_TYPE_DESC" = "$Endpoint Service"
    AND "BI_TASK_REF". ' BI_TASK_DESC ' = '$Field in action.
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC "="$Rate change ""
    AND "BI_TASK_REF". «BI_TASK_DESC ' = ' count$»
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC "="$nouvelle residence Service»"
    AND "BI_TASK_REF". «BI_TASK_DESC ' = ' count$»
    (OR 'BI_SO_TYPE_REF'. "BI_SO_TYPE_DESC" = "$reconnecter Service"
    AND "BI_TASK_REF". «BI_TASK_DESC ' = ' count$»
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC "="$Service change ""
    AND "BI_TASK_REF". «BI_TASK_DESC ' = ' count$»
    (OR 'BI_SO_TYPE_REF'. "BI_SO_TYPE_DESC"= "$Svc audits/10 Yr Chg"
    AND "BI_TASK_REF". ' BI_TASK_DESC ' = '$Svc field audit work.
    (OR 'BI_SO_TYPE_REF'. "BI_SO_TYPE_DESC" = "use $Zero Check" point of termination
    AND "BI_TASK_REF". ' BI_TASK_DESC ' = '$Zero use check reading/Svc.
    (OR 'BI_SO_TYPE_REF'. «BI_SO_TYPE_DESC ' = 'verification of use/Svc $Zero»'
    AND "BI_TASK_REF". ("" BI_TASK_DESC "=" use the audit Fld Wrk $Zero ")
    AND ("BI_WRKFLW_TASKS". "" BI_EVENT_DT_TM "> = TO_DATE (1 January 2014 00:01:01 '," HH24:MI:SS DD-MM-YYYY ")
    AND "BI_WRKFLW_TASKS". ("' BI_EVENT_DT_TM" < TO_DATE (January 4, 2014 00:00:00 ', HH24:MI:SS ' DD-MM-YYYY "))
    ) CMD.

    LEFT OUTER JOIN

    (SELECT 'BI_SRV_LOC_NBR' FROM 'BI_SRV_LOC') Protocol

    ON CMD. ' BI_SRV_LOC_NBR '= Protocol. BI_SRV_LOC_NBR ".

    Hello

    In the command line, the next column view, the names are used 2 times each:

    NI_EVENT_DT_TM

    BI_WRKFLW_KEY.

    ... (SELECT DISTINCT

    'BI_SO_MASTER '. "" BI_SO_NBR, "

    'BI_WRKFLW_TASKS '. "" BI_TASK_CD, "

    'BI_WRKFLW_TASKS '. "" BI_WORKGRP, "

    'BI_SO_MASTER '. "" BI_SO_STAT_CD, "

    'BI_WRKFLW_TASKS '. "' BI_WRKFLW_KEY ', - 1

    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_TASKS_KEY, "

    'BI_WRKFLW_TASKS '. "' BI_EVENT_DT_TM ', - 1

    'BI_WRKFLW_TASKS '. "" BI_NEEDED_DT_TM, "

    'BI_SO_TYPE_REF '. "" BI_SO_TYPE_DESC, "

    'BI_WRKFLW_TASKS '. "" BI_CRITICAL_TASK_SW, "

    'BI_SO_MASTER '. "" BI_WO_WORKORD, "

    'BI_WRKFLW_TASKS '. "" BI_WRKFLW_TASK_SEQ_NBR, "

    'BI_TASK_REF '. "" BI_TASK_DESC, "

    'BI_WRKFLW_TASKS '. "" BI_WORK_EVENT_CD, "

    'BI_WRKFLW_TASKS '. "" BI_TASK_RMKS, "

    'BI_WRKFLW '. "' BI_WRKFLW_KEY ', - 2

    'BI_RESOURCE_REF '. "" BI_RESOURCE_NM, "

    'BI_PERSONAL '. "" BI_FORMAT_NAME, "

    'BI_SO_MASTER '. "" BI_SO_FULL_NM, "

    'BI_SO_MASTER '. "" BI_OPEN_DT, "

    'BI_SO_MASTER '. "" BI_CLOSE_DT, "

    'BI_WRKFLW_TASKS '. "" BI_DURATION_DAYS, "

    "BI_WRKFLW". "" BI_EVENT_DT_TM ", -2

    'BI_SO_MASTER '. "" BI_SO_DESC, "

    'BI_TYPE_SERVICE '. "" BI_PRIM_RATE_SCHED, "

    'BI_SO_DET_VIEW_1 '. "" BI_SO_TYPE_CD, "

    'BI_SO_DET_VIEW_1 '. "" ACCT_NBR, "

    'BI_SO_DET_VIEW_1 '. "" CUST_NBR, "

    'BI_RDG '. "" BI_DMD_MULT, "

    'BI_RDG '. "" BI_MTR_MULT, "

    'BI_SO_DET_VIEW_1 '. "" BI_MAP_LOC_NBR, "

    'BI_SO_DET_VIEW_1 '. "" BI_SRV_LOC_NBR ".

    Of...

    Of all the columns in the CMD, looks like BI_SRV_LOC_NBR is used outside of CMD.  Unless you intend to miodify this query and use more outside the CMD CMD columns, you can simply delete everything except this great SELECT clause BI_SEV_LOC_NBR.

  • Writing user defined function the same way as the oracle functions

    Hi guys,.

    In one of the interviews, I saw the guy asked me to write a function defined by the user who will be the column name and the list of all values.

    For example

    Name: employees table
    Column name: Employee_Name

    Employee_name
    Scott
    Ivgun
    Jack
    Shane

    The query must be in this marker

    SELECT col_agg (Employee_name) emp_name of employees;

    The output must be

    Emp_names
    Scott, ivgun, jack, shane

    Please let me know if this is possible


    Any suggestions will be much appreciated.

    Thank you
    Ranjan

    You certainly could write what a user defined aggregate function if you wish...

    for example this function will consolidate channels in a CLOB...

    create or replace type clobagg_type as object
      (
      text clob,
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number,
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number,
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number,
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number
      );
    /
    create or replace type body clobagg_type is
      static function ODCIAggregateInitialize(sctx in out clobagg_type) return number is
      begin
        sctx := clobagg_type(null) ;
        return ODCIConst.Success ;
      end;
      member function ODCIAggregateIterate(self in out clobagg_type, value in clob) return number is
      begin
        self.text := self.text || value ;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateTerminate(self in clobagg_type, returnvalue out clob, flags in number) return number is
      begin
        returnValue := self.text;
        return ODCIConst.Success;
      end;
      member function ODCIAggregateMerge(self in out clobagg_type, ctx2 in clobagg_type) return number is
      begin
        self.text := self.text || ctx2.text;
        return ODCIConst.Success;
      end;
    end;
    /
    create or replace function clobagg(input clob) return clob
      deterministic
      parallel_enable
      aggregate using clobagg_type;
    / 
    
    SQL> select trim(',' from clobagg(ename||',')) as enames from emp;
    
    ENAMES
    -----------------------------------------------------------------------------------
    SMITH,ALLEN,WARD,JONES,MARTIN,BLAKE,CLARK,SCOTT,KING,TURNER,ADAMS,JAMES,FORD,MILLER
    
    SQL> ed
    Wrote file afiedt.buf
    
      1  with t as
      2    (select 'PFL' c1, 0 c2,110 c3 from dual union all
      3     select 'LHL', 0 ,111 from dual union all
      4     select 'PHL', 1, 111 from dual union all
      5     select 'CHL', 2, 111 from dual union all
      6     select 'DHL', 0, 112 from dual union all
      7     select 'VHL', 1, 112 from dual union all
      8     select 'CPHL', 0, 114 from dual union all
      9     select 'WDCL', 1, 114 from dual union all
     10     select 'AHL' ,2 ,114 from dual union all
     11     select 'NFDL', 3, 114 from dual)
     12  --
     13  -- end of test data
     14  --
     15  select trim(clobagg(c1||' ')) as c1, c3
     16  from (select * from t order by c3, c2)
     17  group by c3
     18* order by c3
    SQL> /
    
    C1                                     C3
    ------------------------------ ----------
    PFL                                   110
    LHL CHL PHL                           111
    DHL VHL                               112
    CPHL AHL NFDL WDCL                    114
    

    OK, it's more that a function it uses a type of object that connects in operation internal to the ODCI... but it does what you ask. :)

  • Is there a good way to find all references to a table or a column?

    I have recently inherited an application large apex and receive requests to make changes.  I would like to ensure that any changes that I could do on a table or a column in a table affect application pages which I think are involved.  However, demand is high, and I'm assuming that it is possible for other pages may refer to the same column or table, and I was not aware of these references (at least until after he breaks once I have change the column or table).

    My question is this: is there an integrated report, or a way to query apex, who will tell me ALL references to an application to a particular table or column?  This way I could fix all pages in the application, rather than waiting to break.

    Thank you!

    John

    John,

    Look to the upper right while in the Application Builder, for the area of the search Application .  Enter any string you want and APEX will search to find and view a report that contains a link.  Click the link and APEX will show the page and control chain concerned.

    Here's another way; query the table APEX seen through this code:

    SELECT workspace,
           workspace_display_name,
           application_id,
           application_name,
           page_id,
           page_name,
           region,
           item_name,
           display_as,
           display_sequence,
           item_label,
           db_column_name,
           db_table_name,
           help_text,
           item_id
      FROM apex_application_page_db_items
    WHERE     workspace = :workspace
           AND db_table_name = :table_name
           AND db_column_name = :column_name
    

    Jeff

    Post edited by: jwellsnh

  • Select ambiguous column in Sub query

    I get an error "ambiguous column" when I question using a sub select. Here's my query:

    Select *.
    (select
    c.custody_id,
    c.person_id,
    n.first_name,
    n.last_name,
    z.usms_number,
    c.start_date,
    c.end_date,
    c.district_office_id,
    CBC.custody_id,
    c.update_date,
    c.update_user_id
    Guard c,.
    custody_booking_pkg_components Radio-Canada,
    z_migrate_usms_number z,
    district_office do,
    District d,
    person p,
    n name
    where
    c.person_id = p.person_id and
    z.person_id = p.person_id and
    z.Ordinal = 1 and
    c.custody_id = cbc.custody_id (+) and
    p.name_id = n.name_id and
    do.district_id = d.district_id and
    c.district_office_id = do.district_office_id and
    d.district_id = 99 by c.update_date desc order)
    where rownum < = 10;

    I understand why "ambiguous column" average error, but I don't see which column is ambiguous. I ran the select sub by itself and it works correctly, but when combined with the external selection it fails.

    Hello

    You have two columns called custody_id.
    It is normal to have names duplicated in a query, but not in a table or view (and which includes a view online, you have).

    Type a unique name for each column.

  • Can someone tell me how to expand the columns of names of files in file Explorer?

    In each program, I've never used, all the user has to do to make a column more wide is to click on the divider bar at the top (or the side of the column) and drag the wider column. Instantly. Easily. Nearly second nature without looking.

    Now, clunky Windows 8 coming, and it's so frustrating!  I went on line and saw hundreds of people griping about the same and some of the answers are right-click on the column heading and click on the size, or to choose the longest title in your file and right click and choose the size of the car, but I don't have any of these options.  I right click on the longer title and don't get choices such as car size or size.  There is not a definable column header.  Above the list of files is a bunch of stuff in the Ribbon, none of this centered above the list of files.  Above, there are a few possibilities for right click produce the word "size" in the box that opens, but is not an active link, and I can't click on it.

    I'm amazed that I bought this "top of the new version of line everyone will go to" and it does not with ease.  It is not calculate how wide to make the column... computers are great to calculate.  Why not Windows 8?   When a program allows you to work harder, take four or five steps to do one thing, that is not good design. He should do it for us, we should not be on the right side of the mouse, click on the left side, etc.

    My main question is how to do widen the column, and my secondary question is how can we get Microsoft to listen to us?  I read the comment after comment on dozens of complaints, which is one of the most common.  Thus, besides wishing they would listen to us... I'll call their hotline tomorrow and complain... what someone knows in the meantime what can I do to see all the title of my files?  Right now they are all cut in half way through.  I want to enter this bar on the right and drag it to the right to reveal the name of file in the way of how work most computer programs.

    It almost seems as if Microsoft tried to make it more difficult for their base of users and new users.   It boggles the mind.

    Of course, I'd appreciate it if someone can tell me if it is still possible to make the column wider, and I would love it if there was a response that is easy without going through a lot of steps.  Thanks in advance to anyone out there who has thought about it!

    Happy new year!

    CG

    There is no difference in the way you make the columns wider if I understand the question.
     
    I guess you see something like this (without the arrows highlighting red and pointing to the column headings and separators that you hover over, click on + hold and drag to make greater/smaller in the method you describe):

    Or are you speaking of something else than the "File Explorer" you mentioned in your question?
     
    Also - if you get the "double-arrow" cursor hover at the same place as you would drag to the size of column wider or narrower and rather - double-click on - it (as it always has) calculates the necessary width to see everything in the column to the left of the separator you are clicking on and re - size accordingly.
     
    I think that the right click of the column header (see section highlighted above) and change the size to fit refers to this menu, you would get when right-clicking on the column headers highlighted in the picture above...

    Now there's something for everyone - you have to be in DETAILS view (as always) in order to get these beautiful columns.  "Very large icons', 'Large icons', 'medium-sized icons", "Small icons", "List", "Tiles" or "Content" views will not have columns to sort by...

    In addition, if you notice in the last frame, in the "Détails" view, you must, depending on the size of your window, see "All columns to fit the size" as an option in the view menu.
     
    And the "size of all columns to fit" as shown in the two methods I could think casual to show calculations for all columns and adjusts large/more details for all visible columns in the display of the Explorer of files in all areas.
     
    Oh - and in case you want to "Détails" view to be the default view from this moment for your windows 'Windows Explorer '... Change to it (as shown above) and find the 'Options' button in the top Ribbon (usually the one furthest to the right) and click on it (not the arrows on the side of it - click it to select it) and should open a new window called "Folder Options."  Select the 'view' tab and click on "apply to folders" and all other folders that you open from the moment which will 'View' by default (unless you change it.)  * Special note * here - you can be originally 'Computer' or 'My PC' Windows Explorer - display you must have at least one folder of the selected (such as "drive Local (c)") drive and active in order to see the button 'Apply to records' assets to click.
     
    New - this is essentially the same since Windows XP.  Some of the options have changed names (heck, even Windows Explorer is referred to as 'This PC' now instead of 'Computer' and 'My Computer') and there were a few additional views added and deleted - but even advanced stuff are quite similar to the latest methods to infer.
     
    Hope that helps.  Ask if you have any other questions and please come back anyway let everyone know if the response was satisfactory!

  • Positioning of tabs Extensions defined by the user

    I "refers to" and "referenced by" EDITOR type user defined extensions defined for my paintings.  The tabs used appears on the far right after the "SQL" tab  Now, the tabs are displayed as the first two legs before the "Columns" tab  Any way to get back them at the end?

    Already reported... 4.1ga - editor-Tabs for tables/views...

    but no idea about the control of the order.

  • Changing all the semantic VARCHAR2 length in BYTE to CHAR columns

    Hello

    our database is to use character set AL32UTF8, i.e. multibyte.

    All our VARCHAR2 columns have been specified as VARCHAR (xxx) semantic unspecified length explicit, which makes VARCHAR(xxx BYTE) because NLS_LENGTH_SEMANTICS is set on 'BYTE' (default Oracle).

    I wonder now if it would cause problems to enter and execute the ALTER TABLE statement to change all the columns of VARCHAR2(xxx BYTE) to VARCHAR2(xxx CHAR), leaving the same xxx. For example, if a VARCHAR2 column (100 BYTE) would be amended to be VARCHAR2(100 CHAR).

    If I am not entirely mistaken, - on the contrary - it would make the columns longer, not shorter; I expect to not get errors on the values of existing records being too long to change the specifications of the column in this way (as it may happen when the shortening of a VARCHAR column, for example, of varchar (10) to varchar (5)). So I think the ALTER TABLE statements should go without problem.

    I would also change NLS_LENGTH_SEMANTICS to TANK.

    Are there problems or consequences I might meet when I do this? I'm not worried about the implications for code enforcement external or such, but simply the integrity / performance / etc on the database level.

    It is a 11.2.0.x of Oracle database.

    Thank you

    MSA

    You can make this change to your drawings, but not for Oracle schemas or third party. It would usually not be supported.

    You will not get the errors associated with the data in the table. However, you can encounter errors due to:

    1 index of issues of key length - the maximum length of an index key in bytes (based on the column definitions, no real content column) is limited to about 70% of the size of the block of the tablespace containing the index. If you try to do a column belonging to a larger index key by applying the semantics of length in characters, you get an error if the change causes the index key limit.

    2. some columns cannot be changed. This includes, but may not be limited to, the columns that are referenced by expressions of virtual column and the functional index expressions, columns that have indexes defined on them, and columns field belonging to a partitioning key.

    3. you can not change the columns that store attributes of the type defined by the user in this way. You must change the definition of type instead.

    Also, do not change NLS_LENGTH_SEMANTICS initialization file. Include the keyword CHAR in your scripts or ALTER SESSION SET NLS_LENGTH_SEMANTICS = CHAR in these scripts. Value of the initialization file will affect all the scripts for Oracle products and third-party and can create tables with the semantics of unexpected length. Therefore, for compatibility reasons, this parameter in init.ora/spfile parameters is not recommended.

    Thank you

    Sergiusz

    Post edited by: Sergiusz Wolicki (Oracle)

  • Not Null on the column of a primary key constraint

    I came across a table defined in the same way to...

    create table t (t_id int constraint nn_t_id not null constraint pk_t primary, data key number);

    Of course, the primary key is the is not null, then is there a reason to add the redundant constraint not null?

    There are two parts to your question, I think:

    (1) why add a NOT NULL if a primary key is also reported.
    (2) why is null is NOT a name defined by the user (in this case nn_t_id).

    1 > I think you are right: there is no difference in behavior in the way that Oracle is going to reject the creation of NULL in this column (whether through the direct insert or update with a NULL value). I personally always declares the NOT NULL for columns, I know to never have null, regardless of whether the column is (member of) a PK.

    It's pretty funny, btw, the SQL standard as chosen able to be the NULL default value. I think that we all type much less, if the SQL standard chose NOT NULL default value. But that's another story.

    2 > I don't see given nullability defined by the user of the explicit names now and then, because of some "coding guideline' which dictates that constraint names must never be generated System. This guideline is often presented as a result of the exception handling of "client-side", where the constraint name is filtered SQLERRM and then more personalized to be displayed to the end user. However for NOT NULL constraint violations, I think (does not fully to check) that you are always thrown an ORA-01400 is an ORA-01407. Who nowadays both will tell you exactly (in SQLERRM) which column of this table is currently in violation of a NOT NULL constraint.

    Toon

  • Records Windows Explorer more to maintain the column spacing.

    Original title: Windows Wxplore column spacing.

    After cleaning on some malicious programs, I find that my folders Windows Explorer continue is no longer their pre-defined column spacing.  How can I get the records maintain their spacing of individual columns again?

    Hello

    What anti-virus software is installed on your computer?

    You can reset all folders & restore by default. Subsequently, check if the problem persists:

    For more information, refer to this link: make all identical folder views

    Hope the helps of information.

  • How to insert sections of column within a document?

    Hello
    I am converting a Word document to FrameMaker.

    I have to insert some long columns (sometimes more than 150 lines per section of the column) to specific places in the text.

    It might be something very easy to do, but I have not yet found!


    Basically, it is the structure of the document I want to achieve:

    Capture1.jpg

    Sections of column (in green) that begin and end within the normal text sections (as we would in Word).


    I tried to divide my basic text frame and convert some sections divided into sections of the column.


    1 chapter, divided in 5 sections:

    section 1: normal and graphic text

    section 2:2 - section columns

    Article 3: text normal and graphics

    4 of article: section 2-columns

    Article 5: normal text and graphics


    However, these sections do not automatically adjust when I paste large amounts of text in there.

    As a result, I end up having to manually adjust each divided section (stretch them vertically and push down in the following sections, because they do not move from their original place (not "section flow")).


    My questions:

    1 can I use the feature column in another way?

    2. How can I make each section adjust automatically to the amount of text it receives?

    3. How can I get my sections elapse automatically on others with text and graphics to fill?


    Thanks in advance!

    Use Across-All-Columns-and-Side-Heads for titles. Set a tab in the AutoNumber for chapter headings so that the paratext is aligned with the left edge of column Center.

    It does not seem possible to have unbalanced normal FM multi columns. You can make unbalanced with executives from individual text automatically connected on the Master Pages, but then the AAFC tricks do not work.

  • Update of a column of table from xml data

    Hello

    I have an obligation to update a particular table from xml data column. to do this, I wrote the code below but I am not able to insert. could you please a peek into that.

    create table emp3
    as
    select *From emp
    where 1=1;
    
    alter table emp3
    add (fax_response varchar2(50));
    
    /*create sequence EmailRecords_XMLFILE_SEQ
      minvalue 1
      maxvalue 999999999999999999999999999
      start with 1
      increment by 1
      nocache;*/
    
    /* create global temporary table EmailRecords_XMLFILE
      (
      ID NUMBER not null,
      xmlfile CLOB
      )
      on commit preserve rows;*/
    
    /* create global temporary table UPD_Email_Records_With_Xml
      (
      id NUMBER not null,
    
      response VARCHAR2(500)
    
      )
      on commit preserve rows; */
    
    
    

    the XML data is

    <FAX>
    <EMAILOG>
    <ID>7839</ID>
    <RESPONSE>FAX SENT</RESPONSE>
    </EMAILOG>
    <EMAILOG>
    <ID>7566</ID>
    <RESPONSE>FAX NOT SENT</RESPONSE>
    </EMAILOG>
    </FAX>
    
    
    

    CREATE OR REPLACE PROCEDURE proc_upd_email_records (
       loc_xml          IN       CLOB,
       p_err_code_out   OUT      NUMBER,
       p_err_mesg_out   OUT      VARCHAR2
    )
    IS
       loc_id   NUMBER;
    BEGIN
       loc_id := emailrecords_xmlfile_seq.NEXTVAL; --created sequence
    
    
    
       INSERT INTO emailrecords_xmlfile --created Global Temp table
                   (ID, xmlfile
                   )
            VALUES (loc_id, loc_xml
                   );
    
       COMMIT;
          insert into UPD_Email_Records_With_Xml --created Global Temp table
            (ID, RESPONSE)
            select x1.id,
    
                      x1.RESPONSE
              from EmailRecords_XMLFILE,
                   xmltable('/FAX/EMAILOGID' passing
                            xmltype.createxml(EmailRecords_XMLFILE.xmlfile)
                            columns header_no for ordinality,
                            id number path 'ID',
                            RESPONSE VARCHAR2(250) path 'RESPONSE'
    
                               ) x1
             where EmailRecords_XMLFILE.id = loc_id;
       COMMIT;
    
       UPDATE emp3 er
          SET er.fax_response = (SELECT response
                               FROM upd_email_records_with_xml pr
                              WHERE pr.ID = er.empno)
        WHERE er.empno IN (SELECT ID
                             FROM upd_email_records_with_xml);
    EXCEPTION
       WHEN NO_DATA_FOUND
       THEN
          raise_application_error
             (-20000,
              'Sorry ! The Xml File which is passed is empty. Please try with Valid Xml File. Thank you!!! '
             );
       WHEN OTHERS
       THEN
          p_err_code_out := 4;
          p_err_mesg_out := 'error in insertion=> ' || SQLERRM;
    END proc_upd_email_records;
    {code}{code}
    
    
    

    Someone suggest me a slightly easier way to insert data...

    Thank you...

    You're complicating things

    A simple MERGE statement will do.

    create or replace procedure (proc_upd_email_records)

    loc_xml in clob

    )

    is

    Start

    merge into e emp3

    a_l'_aide_de)

    Select id

    response

    from xmltable)

    "/ FAX/EMAILOG.

    by the way xmlparse (document loc_xml)

    the columns id number way "ID".

    , path of varchar2 (250) response 'RESPONSE '.

    )

    ) v

    on (e.empno = v.id)

    When matched then update

    Set e.fax_response = v.response

    ;

    end;

    /

    But there is no value added by using these temporary tables if you are not at least an intermediate XMLType column (storage preferably binary XML).

    -What is the input XML code?

    -What is the version of db?

  • DBMS_SQL cannot get the value of static column.

    The code below, it works fine. But when the query is modified as
     select id, name, 'NOT', date from example_table
    the * 'NO' * cannot be retrieved by DBMS_SQL. COLUMN_VALUE.

    The result looks like

    1, Tom, 06/03/2013
    1, Jack, 03/06/2013
    1, Pete, 03/06/2013

    But I want that:

    1, Tom, NO, 2013/06/03
    1, Jack, NOT 2013/06/03
    1, Pete, NO, 2013/06/03

    Can someone test this and have a solution for this?
            DECLARE
               v_curid    NUMBER;
               v_desctab  DBMS_SQL.DESC_TAB;
               v_colcnt   NUMBER;
               v_name_var  VARCHAR2(10000);
               v_num_var   NUMBER;
               v_date_var  DATE;
               v_row_num    NUMBER;
                p_sql_stmt VARCHAR2(1000);
            BEGIN
                v_curid := DBMS_SQL.OPEN_CURSOR;
                p_sql_stmt :='SELECT * FROM emp';
                DBMS_SQL.PARSE(v_curid, p_sql_stmt, DBMS_SQL.NATIVE);
               DBMS_SQL.DESCRIBE_COLUMNS(v_curid, v_colcnt, v_desctab);
    
               -- Define columns:
               FOR i IN 1 .. v_colcnt LOOP
                IF v_desctab(i).col_type = 2 THEN
                    DBMS_SQL.DEFINE_COLUMN(v_curid, i, v_num_var);
                    ELSIF v_desctab(i).col_type = 12 THEN
                    DBMS_SQL.DEFINE_COLUMN(v_curid, i, v_date_var);
                    ELSE
                    DBMS_SQL.DEFINE_COLUMN(v_curid, i, v_name_var, 50);
                    END IF;
                END LOOP;
                v_row_num := dbms_sql.execute(v_curid);
                -- Fetch rows with DBMS_SQL package:
                WHILE DBMS_SQL.FETCH_ROWS(v_curid) > 0 LOOP
                    FOR i IN 1 .. v_colcnt LOOP
                    IF (v_desctab(i).col_type = 1) THEN
                            DBMS_SQL.COLUMN_VALUE(v_curid, i, v_name_var);
                    ELSIF (v_desctab(i).col_type = 2) THEN
                            DBMS_SQL.COLUMN_VALUE(v_curid, i, v_num_var);
                    ELSIF (v_desctab(i).col_type = 12) THEN
                            DBMS_SQL.COLUMN_VALUE(v_curid, i, v_date_var);
                    END IF;
                END LOOP;
                END LOOP;
                DBMS_SQL.CLOSE_CURSOR(v_curid);
             END;
             /
    Published by: frank1018 on June 4, 2013 16:35

    Published by: frank1018 on June 4, 2013 16:41

    The data type is 'NO' tank (3), which is the type of data 96. See http://docs.oracle.com/cd/E11882_01/server.112/e26088/sql_elements001.htm#i54330
    I changed 'IF (v_desctab (i).col_type = 1)' in

    IF (v_desctab(i).col_type in ( 1, 96)) THEN
    

    and it retrieves the "NOT".

    I suggest one

    ELSE raise_application_error(-20000, 'I dont understand data type ' || v_desctab(i).col_type || ' in ' || p_sql_stmt );
    

    so you can see what goes wrong.

    I also suggest giving an alias of column for the 'DO NOT' so it has an explicit column names. i.e.

    p_sql_stmt :='select empno, ename, ''NOT'' ncol, hiredate from emp';
    

    Published by: davidp 2 on June 4, 2013 16:38

Maybe you are looking for