Urgent help please.  Inner Join caused ora-00933 error

I ran this one , works fine:
SELECT DISTINCT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'),
     TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
     DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
     DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
     DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
     DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
     left outer join
( SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID ) alarmed_datus
inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE
) LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
     left outer join
     ( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
     FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
     FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE
     ) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
     left outer join
     ( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
     FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
     FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID
inner join TT_DATU_LRN_MAP LRNS on EXP.EXP_ID = LRNS.EXP_ID AND TRIM(LRNS.LRN) LIKE p_LRN
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE NOT EXISTS (SELECT SATELLITE_EXP_ID FROM TT_HOST_SATELLITE WHERE EXP.EXP_ID = SATELLITE_EXP_ID)
AND EXP.IS_PRIMARY_ADDRESS LIKE p_isPrimary;
     ELSE
     OPEN v_cursor FOR
SELECT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'), TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
     DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
     DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
     DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
     DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
     left outer join (
SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM (SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID ) alarmed_datus
     inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
     inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE )
     LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
     left outer join
          ( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
          FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
          FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
     inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
     inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
     left outer join
          ( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
          FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
          FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
     inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
     inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
          ) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID ORDER BY EXP.DATU_EXP_CLLI
     inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE NOT EXISTS (SELECT SATELLITE_EXP_ID FROM TT_HOST_SATELLITE WHERE EXP.EXP_ID = SATELLITE_EXP_ID) AND EXP.IS_PRIMARY_ADDRESS like
p_isPrimary;
However this one:
SELECT EXP.EXP_ID,
EXP.DATU_EXP_WIRE_CENTER_CLLI,
EXP.DATU_EXP_IP,
EXP.DATU_EXP_CLLI,
EXP.DATU_EXP_PORT,
EXP.DATU_EXP_NAME,
EXP.DATU_EXP_CITY,
EXP.DATU_EXP_STATE,
EXP.DATU_EXP_SW_VERSION,
DECODE(LAST_ALARM.LAST_ALARM_DATE, NULL, TO_CHAR(SYSDATE,'YYYY/MM/DD HH24:MI:SS'),
     TO_CHAR(LAST_ALARM.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS STATUS_DATE,
DECODE(LAST_ALARM.ALARM_NAME, NULL, 'Disconnected', LAST_ALARM.ALARM_NAME) AS DATU_STATUS,
DECODE(LAST_ALARM.ALARM_CLASS, NULL, 'OTHER', LAST_ALARM.ALARM_CLASS) AS IS_ERROR_STATUS,
     DECODE(LAST_RESOURCE.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_RESOURCE.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS RESOURCE_STATUS_DATE,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_NAME, NULL, '', LAST_RESOURCE.RESOURCE_CODE_NAME) AS RESOURCE_STATUS,
     DECODE(LAST_RESOURCE.RESOURCE_CODE_CLASS, NULL, '', LAST_RESOURCE.RESOURCE_CODE_CLASS) AS IS_RESOURCE_ERROR_STATUS,
     DECODE(LAST_OPER.LAST_ALARM_DATE, NULL, '', TO_CHAR(LAST_OPER.LAST_ALARM_DATE,'YYYY/MM/DD HH24:MI:SS')) AS OPER_STATUS_DATE,
     DECODE(LAST_OPER.OPER_CODE_NAME, NULL, '', LAST_OPER.OPER_CODE_NAME) AS OPER_STATUS,
     DECODE(LAST_OPER.OPER_CODE_CLASS, NULL, '', LAST_OPER.OPER_CODE_CLASS) AS IS_OPER_ERROR_STATUS,
EXP.BEGIN_MAINT_WINDOW, RTU.RTU_NAME
FROM TT_DATU_EXP_UNIT_INFO EXP
     left outer join
SELECT distinct alarmed_datus.EXP_ID, c.ALARM_NAME, c.ALARM_TYPE, c.ALARM_CLASS, alarmed_datus.LAST_ALARM_DATE
FROM ( SELECT EXP_ID, MAX(ALARM_TIME) AS LAST_ALARM_DATE FROM TT_DATU_EXP_ALARM_INFO GROUP BY EXP_ID) alarmed_datus
     inner join TT_DATU_EXP_ALARM_INFO b on b.EXP_ID = alarmed_datus.EXP_ID AND b.ALARM_TIME = alarmed_datus.LAST_ALARM_DATE
     inner join TT_DATU_EXP_ALARM_TYPES c on b.ALARM_TYPE = c.ALARM_TYPE ) LAST_ALARM on EXP.EXP_ID = LAST_ALARM.EXP_ID
     left outer join
          ( SELECT distinct a.EXP_ID, c.RESOURCE_CODE_NAME, c.RESOURCE_CODE_TYPE, c.RESOURCE_CODE_CLASS, a.LAST_ALARM_DATE
          FROM ( SELECT EXP_ID, MAX(RESOURCE_CODE_TIME) AS LAST_ALARM_DATE
          FROM TT_DATU_EXP_RESOURCE_CODE_INFO GROUP BY EXP_ID ) a
     inner join TT_DATU_EXP_RESOURCE_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.RESOURCE_CODE_TIME = a.LAST_ALARM_DATE
     inner join TT_DATU_EXP_RESOURCECODE_TYPES c on b.RESOURCE_CODE_TYPE = c.RESOURCE_CODE_TYPE) LAST_RESOURCE on EXP.EXP_ID = LAST_RESOURCE.EXP_ID
     left outer join
          ( SELECT distinct a.EXP_ID, c.OPER_CODE_NAME, c.OPER_CODE_TYPE, c.OPER_CODE_CLASS, a.LAST_ALARM_DATE
          FROM ( SELECT EXP_ID, MAX(OPER_CODE_TIME) AS LAST_ALARM_DATE
          FROM TT_DATU_EXP_OPER_CODE_INFO GROUP BY EXP_ID ) a
     inner join TT_DATU_EXP_OPER_CODE_INFO b on b.EXP_ID = a.EXP_ID AND b.OPER_CODE_TIME = a.LAST_ALARM_DATE
     inner join TT_DATU_EXP_OPER_CODE_TYPES c on b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
          ) LAST_OPER on EXP.EXP_ID = LAST_OPER.EXP_ID ORDER BY EXP.DATU_EXP_CLLI
inner join TT_RTU_TYPES RTU ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS like p_isPrimary;
this one not work kept giving me errors:
[ ORA-00933: SQL command not properly ended
Any guru can help? I need to have this resolved end of today.
Thanks in advance.

Hi,
Never write, let alone post, unformatted code.
Indent the code so that it's easy to set the scope of sub-queries, and the majoc clauses (SELECT, FROM, WHERE, ORDER BY, ...) in each.
When posting any 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.
If you do that to the code you posted, you'll see that it ends like this:... inner join     TT_DATU_EXP_OPER_CODE_INFO     b on b.EXP_ID     = a.EXP_ID
                                   AND      b.OPER_CODE_TIME = a.LAST_ALARM_DATE
     inner join      TT_DATU_EXP_OPER_CODE_TYPES      c on      b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
     ) LAST_OPER          on EXP.EXP_ID = LAST_OPER.EXP_ID
ORDER BY EXP.DATU_EXP_CLLI
inner join TT_RTU_TYPES RTU     ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS      like p_isPrimary
You can't put an ORDER BY clause  in the middle of the FROM clause.
The ORDER BY clause always goes after the WHERE clause, like this:... inner join     TT_DATU_EXP_OPER_CODE_INFO     b on b.EXP_ID     = a.EXP_ID
                                   AND      b.OPER_CODE_TIME = a.LAST_ALARM_DATE
     inner join      TT_DATU_EXP_OPER_CODE_TYPES      c on      b.OPER_CODE_TYPE = c.OPER_CODE_TYPE
     ) LAST_OPER          on EXP.EXP_ID = LAST_OPER.EXP_ID
inner join TT_RTU_TYPES RTU     ON EXP.RTU_TYPE_ID = RTU.RTU_TYPE_ID
WHERE EXP.IS_PRIMARY_ADDRESS      like p_isPrimary
ORDER BY EXP.DATU_EXP_CLLI

Similar Messages

  • Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an er

    Urgent help please, I made an file with the size 1024x768, then i made two folios, one for retina 2048x1536 and one for non retina 1024x768, i have alot of video content in it, everything works perfect on my retina ipad, but when i open it on ipad 2 an error appears on the pages with video content?

    its in german:
    der Vorgang könnte nicht abgeschlossen werden.
    something like the process coundnt be completed

  • HELP WITH IPHONE 4S IPHONE URGENT HELP PLEASE?

    IPHONE URGENT HELP PLEASE?
    for the whole day my network has been 'Searching...'
    i have tried airplane mode on and off, turning my phone on and off and network reset and taking sim in and out.
    so i backed up my phone and restored to factory settings as i don't think i did the option of choosing manually select a carrier.
    my network is still 'searching...' and it won't let my wifi to allow me to activate my iphone. i have tried to connect to itunes and it still won;t work.
    i keep getting a message about no activation server.
    this is a new iphone. i got it replaced on saturday.
    PLEASE SOMEONE HELP ME!!!!!!!!!!!!!!!!!!!!!!!!!!!

    Hello,
    If this is a new iPhone then you will have free access, as all iPhones come with it, to Apple support. I would have them take care of an issue like this.
    Hope this helps.
    Regards,
    Jake

  • b font color ='red' Java JDBC and Oracle DB URGENT HELP PLEASE /font /b

    Hello, I am a newbie. I'm very interested in Java in relation to JDBC, Oracle and SAP.I am trying to connect to an Oracle DB and I have problems to display the output on the consule in my application. What am I doing wrong here . Please help me. This is my code: Please Explain
    import java.sql.*;
    import java.sql.DriverManager;
    import java.sql.Connection;
    public class SqlConnection {
         public static void main(String[] args) {
              Class.forName("oracle.jdbc.driver.OracleDriver"); //Loading the Oracle Driver.
              Connection con = DriverManager.getConnection
              ("jdbc:orcle:thin:@34.218.5.3:1521:ruka","data","data"); //making the connection.
              Statement stmt = con.createStatement ();// Sending a query to the database
              ResultSet rs = stmt.executeQuery("SELECT man,jean,test,kok FROM sa_kostl");
              while (rs.next()) {
                   String man = rs.getString("1");
                   String jean = rs.getString("2");
                   String test = rs.getString("3");
                   String kok = rs.getString("4");
                   System.out.println( man, jean, test,kok );//here where my the
                                                 //compiler gives me errors
              stmt.close();
              con.close();
    }

    <b><font color ='red'>Java JDBC and Oracle DB URGENT HELP PLEASE</font></b>Too bad your attempt at getting your subject to have greater attention failed :p

  • Just bought Elements 13. Input serial number (starting 1057), which is not recognised and the installation stalls here. Urgent help please...

    Just bought Elements 13. Input serial number (starting 1057), which is not recognised and the installation stalls here. Urgent help please...

    Maryrhire910 I am sorry that you are facing difficulty downloading and installing Photoshop Elements 12.  Are you downloading the installation files from Download Photoshop Elements products | 13, 12, 11, 10?  If so what specific error are you receiving?

  • Load XML in intranet ? urgent help please...

    Dear friends, I need urgent help: I have a CAYIN screen (which lets me display evetns, etc) and gives me the option of loading/displaying a FLASH (SWF) file, well, I need this SWF to load some XML data ("texto.xml") but  seems that when the CAYIN program which executes flash, does not allow the SWF to find the XML in the same folder...
    Then I tried many ways to load the XML file with no success till now. Some tries are :
    obj_xml.load("\\192.168.0.100\media\texto.xml")
    obj_xml.load("\media\texto.xml")
    obj_xml.load("texto.xml")
    obj_xml.load("../media/texto.xml")
    obj_xml.load("\\media\texto.xml")
    obj_xml.load("file:\\192.168.0.100\media\texto.xml")
    obj_xml.load("..\\192.168.0.100\media\texto.xml")
    I guess I am writting something wrong or forgetting something. Would anyone please help me ? because these files are in an internal server "192.168.0.100" (intranet).
    Urgent help please, thanks in advance,

    if the swf is in a directory with subdirectory media which contains texto.xml, use:
    obj_xml.load("media/texto.xml")

  • Does RULE hint cause ORA-01555 errors ?

    DB Version:9.2.0.5.0
    OS:SunOS 5.9
    Our DBA is saying that the RULE hint in the below SQL might be causing ORA-01555 error. Is it true? Does RULE hint cause ORA-01555 errors
    SELECT /*+ RULE */  COUNT(*)
      FROM ( SELECT /*+ RULE */  DISTINCT CAR_HDR.CAR_NBR AS A1, CAR_HDR.PLT_ID AS A29,
      CAR_HDR.PKT_CTRL_NBR AS A2, CAR_HDR.TOTAL_QTY AS A21, CAR_HDR.STAT_CODE AS A6,
      CAR_HDR.CURR_LOCN_ID AS A12,
      CAR_HDR.CAR_NBR  AS A145,
      CAR_HDR.WN_NBR AS A4, CAR_HDR.PCALL_NBR AS A7, CAR_HDR.CHAIN_CNT AS A119,
      CAR_HDR.SHPMT_NBR AS A35, LPN_HDR.WHSE AS A105, CAR_HDR.MISC_CAR AS A146, ''  AS A138,
      CAR_HDR.CHUTE_ID AS A132, CAR_HDR.MOD_DATE_TIME AS A82, LPN_HDR.LOCN_CLASS AS A106,
      LPN_HDR.AREA AS A107, LPN_HDR.ZONE AS A108, LPN_HDR.AISLE AS A109, LPN_HDR.BAY AS A110,
      LPN_HDR.LVL AS A111, LPN_HDR.POSN AS A112
          FROM INV_MASTER , CAR_DTL , LPN_HDR , CAR_HDR 
           WHERE CAR_HDR.CAR_NBR=CAR_DTL.CAR_NBR(+)
           AND CAR_HDR.CURR_LOCN_ID=LPN_HDR.LOCN_ID(+)
           AND CAR_HDR.WHSE=LPN_HDR.WHSE(+)
           AND CAR_DTL.SKU_ID=INV_MASTER.SKU_ID(+)
           AND CAR_HDR.CT_SEQ = 'ALB10'
           AND INV_MASTER.INV_CODE = 98
           AND INV_MASTER.TRACK_CODE = 'P10' )
          

    user636669 wrote:
    DB Version:9.2.0.5.0
    OS:SunOS 5.9
    Our DBA is saying that the RULE hint in the below SQL might be causing ORA-01555 error. Is it true? Does RULE hint cause ORA-01555 errorsThe full statement is causing the ORA-01555 error. Each line of the statement is important therefore each line is reponsible for the error. I personally think the DISTINCT keyword has a bigger influence than the RULE hint.
    I suggest to check what you want to do with that count result. maybe there are better ways to get the same result. Maybe you can even ignore the distinct keyword or remove some outer joins. Using the CBO might result in the same plan as using the RBO, so you you will never know if that removing the hint will help or if if you'll get the same problem later again.

  • Help with inner join PLEASE IGNORE

    Hi I was doing a select with a subquery but I need that the where clause check to values so I couldn't get it so I decided to create a INNER JOIN
    Before
    insert into BPMTEMP (select * from ODS_VIEWER.BAN_EVENTOS_CONFIRMACION@DBLINK1 where id_solicitud and accion not in (select (id_solicitud, accion) from ODS_VIEWER.BAN_CONFIRMA_RESPUESTA@DBLINK1) and rownum <=200);but the problem with the inner join is that it doesn't accept me the external database source
    insert into BPMTEMP (select ODS_VIEWER.BAN_EVENTOS_CONFIRMACION@DBLINK1.*, ODS_VIEWER.BAN_CONFIRMA_RESPUESTA@DBLINK1.*
    from ODS_VIEWER.BAN_EVENTOS_CONFIRMACION@DBLINK1
    INNER JOIN ODS_VIEWER.BAN_CONFIRMA_RESPUESTA@DBLINK1
    ON [email protected]_solicitud = [email protected]_solicitud
    ON [email protected] = [email protected]
    AND rownum <=200); it shows an:
    ORA-02084:
         database name is missing a component
    Cause:      supplied database name cannot contain a leading '.', trailing '.' or '@', or two '.' or '@' in a row.
    how can I solve this????
    thanks for your help
    Edited by: Diego Guillen on 29/12/2009 11:14 AM

    Hi
    Please remove the @dblink stuff in the column descrptions or use a table alias. This should help.
    drop database link lokal;
    create database link lokal
       CONNECT TO whateveruserineed IDENTIFIED BY whateverthing
       USING 'lokal11g';
    select HR.COUNTRIES.*  from HR.COUNTRIES@lokal;
    select x.* from HR.COUNTRIES@lokal x;And as Dan Morgans says, pls. post you ? in the right forum next time :-))
    Mette

  • Help on Inner Join Query

    Hi ABAPers,
    I was trying to develop a report for which query is something like this.
    *& Report  ZT_SERIAL
    REPORT  ZT_SERIAL.
    TABLES : SER01,SER03,OBJK,LIKP,LIPS. " LIKP - SD invoice header table, LIPS - SD invoice details table
    TYPE-POOLS: SLIS.
    DATA: AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
    MANDATORY WHILE DECLARING ALV ***
    DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV..
    DATA: V_EVENTS TYPE SLIS_T_EVENT.
    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: P_FIELDTAB TYPE SLIS_T_FIELDCAT_ALV.
    DATA: I_TITLE_SL_NO_TRACK TYPE LVC_TITLE VALUE 'SERIAL NO TRACKER'.
    DATA : BEGIN OF ITAB OCCURS 0,
           OBKNR LIKE OBJK-OBKNR,     "OBJECT LIST
           OBZAE LIKE OBJK-OBZAE,     "OBJECT COUNTER
           KUNDE LIKE SER01-KUNDE,    "CUSTOMER NO
           MATNR LIKE OBJK-MATNR,     "PART NO
           SERNR LIKE OBJK-SERNR,     "SERIAL NO
           MBLNR LIKE SER03-MBLNR,    "GRN/MATERIAL DOC NO
           LIEF_NR LIKE SER01-LIEF_NR,"OUTBOUND DELV NO
           DATUM LIKE SER01-DATUM,    "OUTBOUND DELV DATE
           TASER LIKE OBJK-TASER,     "HEADER TABLE
           ANZSN LIKE SER01-ANZSN,    "NO OF SERIAL NOS
           VGBEL LIKE LIPS-VGBEL,     "SALES ORDER NO
           END OF ITAB.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_KUNDE FOR SER01-KUNDE,
                      S_VGBEL FOR LIPS-VGBEL,
                      S_MATNR FOR OBJK-MATNR,
                      S_SERNR FOR OBJK-SERNR,
                      S_MBLNR FOR SER03-MBLNR,
                      S_LIFNR FOR SER01-LIEF_NR,
                      S_DATUM FOR SER01-DATUM.
    SELECTION-SCREEN : END OF BLOCK B1.
    PERFORM TRACKING.
    PERFORM FLDCAT.
    PERFORM BUILD_LAYOUT.
    ***CALL FUNCTION TO DISPLAY IN ALV FORMAT*******
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
      EXPORTING
        I_CALLBACK_PROGRAM = SY-REPID
        I_GRID_TITLE       = I_TITLE_SL_NO_TRACK
        IS_LAYOUT          = LAYOUT
        IT_FIELDCAT        = P_FIELDTAB[]
        I_SAVE             = 'A'
        IT_EVENTS          = V_EVENTS
      TABLES
        T_OUTTAB           = ITAB.
    ***END OF CALL FUNCTION
    FORM TRACKING.
    SELECT OBJKOBKNR OBJKOBZAE OBJKMATNR OBJKSERNR OBJK~TASER
           SER01KUNDE SER01LIEF_NR SER01DATUM SER01ANZSN
           SER03~MBLNR
           LIPS~VGBEL
           INTO TABLE ITAB FROM OBJK
           INNER JOIN SER01 ON OBJKOBKNR = SER01OBKNR
           INNER JOIN SER03 ON OBJKOBKNR = SER03OBKNR
           INNER JOIN LIPS ON SER01LIEF_NR = LIPSVBELN
           WHERE
           OBJKTASER = 'SER01' OR OBJKTASER = 'SER03'.
           OBJK~MATNR IN S_MATNR AND
           OBJK~SERNR IN S_SERNR AND
           SER01~KUNDE IN S_KUNDE AND
           SER01~LIEF_NR IN S_LIFNR AND
           SER01~DATUM IN S_DATUM AND
           SER03~MBLNR IN S_MBLNR AND
           LIPS~VGBEL IN S_VGBEL.
    ENDFORM.
    *&      Form  fldcat
          text
    FORM FLDCAT.
      PERFORM FLDCAT1 USING 'KUNDE' 'Customer No'.
      PERFORM FLDCAT1 USING 'VGBEL' 'Sales Order No'.
      PERFORM FLDCAT1 USING 'MATNR' 'Tejas Part No'.
      PERFORM FLDCAT1 USING 'SERNR' 'Serial No'.
      PERFORM FLDCAT1 USING 'MBLNR' 'Material Doc No'.
      PERFORM FLDCAT1 USING 'LIEF_NR' 'Outbound Delv No'.
      PERFORM FLDCAT1 USING 'DATUM' 'Outbound Delv Date'.
    ENDFORM.                    "fldcat
    *&      Form  fldcat1
          text
         -->FNAM       text
         -->FTEXT      text
    FORM FLDCAT1 USING FNAM FTEXT.
        DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
              L_FIELDCAT-FIELDNAME  = FNAM.
              L_FIELDCAT-SELTEXT_M = FTEXT.
      IF FNAM EQ 'MATNR'."OR fnam EQ 'PKUNAG'.
        L_FIELDCAT-KEY = 'X'.
      ENDIF.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      APPEND L_FIELDCAT TO P_FIELDTAB.
    CLEAR fldcat1.
    ENDFORM.                                                    "fldcat1
    *&      Form  build_layout
          text
    FORM BUILD_LAYOUT .
      LAYOUT-NO_INPUT          = 'X'.
      LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
      LAYOUT-ZEBRA = 'X'.
      LAYOUT-TOTALS_TEXT       = 'Totals'(256).
    layout-coltab_fieldname = 'CELL_COLOUR'.
    *clear layout.
    ENDFORM.                   
    But when I run this query,the program gets terminated.Can you please help me in rectifying the query and generate the output?
    Thanks in advance
    Bhavin

    Hi
    I have corrected the code please copy and past it and then try.
    Report ZT_SERIAL.
    TABLES : SER01,SER03,OBJK,LIKP,LIPS.
    " LIKP - SD invoice header table, LIPS - SD invoice details table
    TYPE-POOLS: SLIS.
    DATA: AFIELD TYPE SLIS_FIELDCAT_ALV.
    DATA: FIELDCAT TYPE SLIS_T_FIELDCAT_ALV.
         + MANDATORY WHILE DECLARING ALV ***
    DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV..
    DATA: V_EVENTS TYPE SLIS_T_EVENT.
    DATA: LAYOUT TYPE SLIS_LAYOUT_ALV.
    DATA: P_FIELDTAB TYPE SLIS_T_FIELDCAT_ALV.
    DATA: I_TITLE_SL_NO_TRACK TYPE LVC_TITLE VALUE 'SERIAL NO TRACKER'.
    DATA : BEGIN OF ITAB OCCURS 0,
    OBKNR LIKE OBJK-OBKNR, "OBJECT LIST
    OBZAE LIKE OBJK-OBZAE, "OBJECT COUNTER
    KUNDE LIKE SER01-KUNDE, "CUSTOMER NO
    MATNR LIKE OBJK-MATNR, "PART NO
    SERNR LIKE OBJK-SERNR, "SERIAL NO
    MBLNR LIKE SER03-MBLNR, "GRN/MATERIAL DOC NO
    LIEF_NR LIKE SER01-LIEF_NR,"OUTBOUND DELV NO
    DATUM LIKE SER01-DATUM, "OUTBOUND DELV DATE
    TASER LIKE OBJK-TASER, "HEADER TABLE
    ANZSN LIKE SER01-ANZSN, "NO OF SERIAL NOS
    VGBEL LIKE LIPS-VGBEL, "SALES ORDER NO
    END OF ITAB.
    SELECTION-SCREEN : BEGIN OF BLOCK B1 WITH FRAME TITLE TEXT-001.
    SELECT-OPTIONS : S_KUNDE FOR SER01-KUNDE,
    S_VGBEL FOR LIPS-VGBEL,
    S_MATNR FOR OBJK-MATNR,
    S_SERNR FOR OBJK-SERNR,
    S_MBLNR FOR SER03-MBLNR,
    S_LIFNR FOR SER01-LIEF_NR,
    S_DATUM FOR SER01-DATUM.
    SELECTION-SCREEN : END OF BLOCK B1.
    PERFORM TRACKING.
    PERFORM FLDCAT.
    PERFORM BUILD_LAYOUT.
    ***CALL FUNCTION TO DISPLAY IN ALV FORMAT*******
    CALL FUNCTION 'REUSE_ALV_GRID_DISPLAY'
    EXPORTING
    I_CALLBACK_PROGRAM = SY-REPID
    I_GRID_TITLE = I_TITLE_SL_NO_TRACK
    IS_LAYOUT = LAYOUT
    IT_FIELDCAT = P_FIELDTAB[]
    I_SAVE = 'A'
    IT_EVENTS = V_EVENTS
    TABLES
    T_OUTTAB = ITAB.
    ***END OF CALL FUNCTION
    FORM TRACKING.
    *SELECT OBJK~OBKNR
          OBJK~OBZAE
          OBJK~MATNR
          OBJK~SERNR
          OBJK~TASER
          SER01~KUNDE
          SER01~LIEF_NR
          SER01~DATUM
          SER01~ANZSN
          SER03~MBLNR
          LIPS~VGBEL
      INTO TABLE ITAB FROM OBJK
      INNER JOIN  SER01 ON OBJKOBKNR = SER01OBKNR
      INNER JOIN  SER03 ON OBJKOBKNR = SER03OBKNR
      INNER JOIN  LIPS ON SER01LIEF_NR = LIPSVBELN
      WHERE
    *( OBJKTASER = 'SER01' OR OBJKTASER = 'SER03' ) and
    *OBJK-MATNR IN S_MATNR AND
    *OBJK~SERNR IN S_SERNR AND
    *SER01~KUNDE IN S_KUNDE AND
    *SER01~LIEF_NR IN S_LIFNR AND
    *SER01~DATUM IN S_DATUM AND
    *SER03~MBLNR IN S_MBLNR AND
    *LIPS~VGBEL IN S_VGBEL.
    SELECT a~OBKNR         "OBJK
           a~OBZAE
           a~MATNR
           a~SERNR
           a~TASER
           b~KUNDE         "SER01
           b~LIEF_NR
           b~DATUM
           b~ANZSN
           c~MBLNR        "SER03
           D~VGBEL        "LIPS
       INTO TABLE ITAB FROM  ( OBJK as a
       INNER JOIN  SER01 as b ON aOBKNR = bOBKNR
       INNER JOIN  SER03 as c ON aOBKNR = cOBKNR
       INNER JOIN  LIPS as  d ON bLIEF_NR = dVBELN )
       WHERE
    ( aTASER = 'SER01' OR aTASER = 'SER03' ) and
    a~MATNR IN S_MATNR AND
    a~SERNR IN S_SERNR AND
    b~KUNDE IN S_KUNDE AND
    b~LIEF_NR IN S_LIFNR AND
    b~DATUM IN S_DATUM AND
    c~MBLNR IN S_MBLNR AND
    d~VGBEL IN S_VGBEL.
    ENDFORM.
    *& Form fldcat
       * text
    FORM FLDCAT.
    PERFORM FLDCAT1 USING 'KUNDE' 'Customer No'.
    PERFORM FLDCAT1 USING 'VGBEL' 'Sales Order No'.
    PERFORM FLDCAT1 USING 'MATNR' 'Tejas Part No'.
    PERFORM FLDCAT1 USING 'SERNR' 'Serial No'.
    PERFORM FLDCAT1 USING 'MBLNR' 'Material Doc No'.
    PERFORM FLDCAT1 USING 'LIEF_NR' 'Outbound Delv No'.
    PERFORM FLDCAT1 USING 'DATUM' 'Outbound Delv Date'.
    ENDFORM. "fldcat
    *& Form fldcat1
        text
        -->FNAM text
        -->FTEXT text
    FORM FLDCAT1 USING FNAM FTEXT.
    DATA: L_FIELDCAT TYPE SLIS_FIELDCAT_ALV.
    L_FIELDCAT-FIELDNAME = FNAM.
    L_FIELDCAT-SELTEXT_M = FTEXT.
    IF FNAM EQ 'MATNR'."OR fnam EQ 'PKUNAG'.
    L_FIELDCAT-KEY = 'X'.
    ENDIF.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    APPEND L_FIELDCAT TO P_FIELDTAB.
       * CLEAR fldcat1.
    ENDFORM. "fldcat1
    *& Form build_layout
       * text
    FORM BUILD_LAYOUT .
    LAYOUT-NO_INPUT = 'X'.
    LAYOUT-COLWIDTH_OPTIMIZE = 'X'.
    LAYOUT-ZEBRA = 'X'.
    LAYOUT-TOTALS_TEXT = 'Totals'(256).
       * layout-coltab_fieldname = 'CELL_COLOUR'.
    *clear layout.
    ENDFORM.
    Regards,
    Venkat

  • Need help with inner join and distinct rows

    Hey Guys,
    i have
    1) BaseEnv Table 
    2) Link Table
    3) BaseData Table
    Link table has three columns Id,BaseEnvId,BaseDataId 
    the BaseEnvID is unique in the table where as BaseDataId can be repeated i.e multile rows of BaseEnv Table can point to same BaseData  table row
    Now i want to do  BaseEnvTable inner join Link Table inner join BaseData Table and select 5 columsn ; Name,SyncName,Version,PPO,DOM  from the BaseData table.. the problem is that after i do the inner join I get duplciate records..
    i want to eliminate the duplicate records , can any one help me here

    Please post DDL, so that people do not have to guess what the keys, constraints, Declarative Referential Integrity, data types, etc. in your schema are. Learn how to follow ISO-11179 data element naming conventions and formatting rules. Temporal data should
    use ISO-8601 formats. Code should be in Standard SQL as much as possible and not local dialect. 
    This is minimal polite behavior on SQL forums. Now we have to guess and type, guess and type, etc. because of your bad manners. 
    CREATE TABLE Base_Env
    (base_env_id CHAR(10) NOT NULL PRIMARY KEY,
    Think about the name Base_Data; do you have lots of tables without data? Silly, unh? 
    CREATE TABLE Base_Data
    (base_data_id CHAR(10) NOT NULL PRIMARY KEY,
    Your Links table is wrong in concept and implementation. The term “link” refers to a pointer chain structure used in network databases and makes no sense in RDBMS. There is no generic, magic, universal “id” in RDBMS! People that do this are called “id-iots”
    in SQL slang. 
    We can model a particular relationship in a table by referencing the keys in other tables. But we need to know if the relationship is 1:1, 1:m, or n:m. This is the membership of the relationship. Your narrative implies this: 
    CREATE TABLE Links
    (base_env_id CHAR(10) NOT NULL UNIQUE
       REFERENCES Base_Env (base_env_id),
     base_data_id CHAR(10) NOT NULL
       REFERENCES Base_Data (base_data_id));
    >> The base_env_id is unique in the table where as base_data_id can be repeated I.e multiple rows of Base_Env Table can point [sic] to same Base_Data table row. <<
    Again, RDBMS has no pointers! We have referenced an referencing tables. This is a fundamental concept. 
    That narrative you posted has no ON clauses! And the narrative is also wrong. There is no generic “name”, etc. What tables were used in your non-query? Replace the ?? in this skeleton: 
    SELECT ??.something_name, ??.sync_name, ??.something_version, 
           ??.ppo, ??.dom
    FROM Base_Env AS E, Links AS L, Base_Data AS D
    WHERE ?????????;
    >> I want to eliminate the duplicate records [sic], can any one help me here?<<
    Where is the sample data? Where is the results? Please read a book on RDBMS so you can post correct SQL and try again. 
    --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

  • Help: Modifying inner join

    Hello Folks,
    I have an Access Query and am rewriting the whole query in Oracle to run a report.The thing is Am a beginner in oracle and am scratching my head on how to modify this inner join. please help me in rewriting this inner join in oracle. thanks a million
       ((Debtor INNER JOIN MAX_TRANS_DATE AS MAX_TRANS_DATE_1 ON Debtor .
            EVENT_ID = MAX_TRANS_DATE_1.EVENT_ID) INNER JOIN
            TMP$ALL_RECOVERY_TYPE
            ON(Debtor . EVENT_CASE_ID = TMP$ALL_RECOVERY_TYPE . EVENT_CASE_ID) AND
            (Debtor . EVENT_ID = TMP$ALL_RECOVERY_TYPE . EVENT_ID))
    INNER JOIN CUBS TRANSACTIONS
        ON (Debtor . EVENT_ID = CUBS TRANSACTIONS . EVENT_ID)
       AND (Debtor . EVENT_CASE_ID = CUBS TRANSACTIONS . EVENT_CASE_ID)

    Thanks for getting back. But still am unable to get the correct data. I will try to break it down.
    Microsoft Access Table MAX_TRANS_DATE menitoned above in the inner join was originally coming from table called TRANSACTIONS i.e.( MAX_TRANS_DATE = SELECT [Transactions].[EVENT_ID], Max([Transactions].[TRANSDATE]) AS MaxOfTRANSDATE
    FROM Debtor INNER JOIN Transactions ON [Debtor].[EVENT_ID]=[Transactions].[EVENT_ID]
    GROUP BY [Transactions].[EVENT_ID];
    Here the problem is am recreating the access database query in oracle database and we dont have MAX_TRANS_DATE in the Oracle database but we do have TRANSACTIONS table.
    So i just used TRANSACTIONS in the inner join instead of MAX_TRANS_DATE.
    But the result is wrong.The Field Transdate from TRANSACTIONS is pulling dates as 10/5/2006 instead of 02/01/2010. I suspect something is wrong with the joins.Please help me. I can provide the old access query and the new oracle query that i have created.
    Thanks
    Edited by: user11961230 on Mar 5, 2010 11:49 AM

  • Help with Inner Join query in SQL

    Hope someone can help with this, as this is quite an involved project for me, and I'm just about there with it.
    My table structure is :
    table_packages
    packageID
    package
    packageDetails
    etc
    table_destinations
    destinationID
    destination
    destinationDetails
    etc
    table_packagedestinations
    packageID
    destinationID
    ..so nothing that complicated.
    So the idea is that I can have a package details page which shows the details of the package, along any destinations linked to that package via the packagedestinations table.
    So this is the last part really - to get the page to display the destinations, but I'm missing something along the way....
    This is the PHP from the header, including my INNER JOIN query....
    PHP Code:
    <?php
    $ParampackageID_WADApackages = "-1";
    if (isset($_GET['packageID'])) {
      $ParampackageID_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
    $ParamSessionpackageID_WADApackages = "-1";
    if (isset($_SESSION['WADA_Insert_packages'])) {
      $ParamSessionpackageID_WADApackages = (get_magic_quotes_gpc()) ? $_SESSION['WADA_Insert_packages'] : addslashes($_SESSION['WADA_Insert_packages']);
    $ParampackageID2_WADApackages = "-1";
    if (isset($_GET['packageID'])) {
      $ParampackageID2_WADApackages = (get_magic_quotes_gpc()) ? $_GET['packageID'] : addslashes($_GET['packageID']);
    mysql_select_db($database_connPackages, $connPackages);
    $query_WADApackages = sprintf("SELECT packageID, package, costperpax, duration, baselocation, category, dateadded, agerange, hotel, educational_tours, field_trips, corporate_outings, plant_visits, budget_package, rollingtours, teambuilding, description, offer FROM packages WHERE packageID = %s OR ( -1= %s AND packageID= %s)", GetSQLValueString($ParampackageID_WADApackages, "int"),GetSQLValueString($ParampackageID2_WADApackages, "int"),GetSQLValueString($ParamSessionpackageID_WADApackages, "int"));
    $WADApackages = mysql_query($query_WADApackages, $connPackages) or die(mysql_error());
    $row_WADApackages = mysql_fetch_assoc($WADApackages);
    $totalRows_WADApackages = mysql_num_rows($WADApackages);
    $colname_educationalDestinations = "1";
    if (isset($_GET['PackageID'])) {
      $colname_educationalDestinations = (get_magic_quotes_gpc()) ? packageID : addslashes(packageID);
    mysql_select_db($database_connPackages, $connPackages);
    $query_educationalDestinations = sprintf("SELECT * FROM destinations INNER JOIN (packages INNER JOIN packagedestinations ON packages.packageID = packagedestinations.packageID) ON destinations.destinationID = packagedestinations.destinationID WHERE packages.packageID = %s ORDER BY destination ASC", GetSQLValueString($colname_educationalDestinations, "int"));
    $educationalDestinations = mysql_query($query_educationalDestinations, $connPackages) or die(mysql_error());
    $row_educationalDestinations = mysql_fetch_assoc($educationalDestinations);
    $totalRows_educationalDestinations = mysql_num_rows($educationalDestinations);
    ?>
    And where I'm trying to display the destinations themselves, I have : 
    <table>
            <tr>
                     <td>Destinations :</td>
                </tr>
               <?php do { ?>
            <tr>
                 <td><?php echo $row_educationalDestinations['destination']; ?></td>
            </tr>
            <?php } while ($row_educationalDestinations = mysql_fetch_assoc($educationalDestinations)); ?>
    </table>
    If anyone could have a quick look and help me out that would be much appreciated - not sure if its my SQL at the top, or the PHP in the page, but either way it would be good to get it working. 
    Thanks.

    First off, you need to get the database tables so that there is a relationship between them.
    In fact, if there is a one to one relationship, then it may be better to store all of your information in one table such as
    table_packages
    packageID
    package
    packageDetails
    destination
    destinationDetails
    etc
    If there is a one to many relationship, then the following would be true
    packages
    packageID
    package
    packageDetails
    etc
    destinations
    destinationID
    packageID
    destination
    destinationDetails
    etc
    The above assumes that there are many destinations to one package with the relationship coloured orange.
    Once you have the above correct you can apply your query as follows
    SELECT *
    FROM packages
    INNER JOIN destinations
    ON packages.packageID = destinations.packageID
    WHERE packages.packageID = %s
    ORDER BY destination ASC
    The above query will show all packages with relevant destinations

  • URGENT HELP PLEASE (MY N73 sometimes do not recive...

    i am facing this problem with my nokia n73 , sometimes if i try to open the inbox from the main window (i click on messages) , the inbox will not opened it will stay on the main window and if there is any one how sent me a message it will not be delivered even no delivery report will be shown on the sender mobile , but if i turn off then turn it on all the messages will be display, please i need your urgent help, because i send my mobile to nokia store to install a new software just before one month. because it used to hang when i use the camera.

    hi! i went to nokia yesterday and they said that the only solution is to upgrade the software but you need to do a back up coz all the data will be lost. My phone is good condition now and i can received messages without restarting my phone over and over again...
    give me also a update on after you send it to nokia center...for upgrading new software.

  • URGENT HELP PLEASE - drop index hangs on SAP

    Hi all,
    OS = Linux
    DBVersion = Oracle10.2.0.2
    Need some urgent help advise please on how to get around this problem.
    On a SAP system, am trying to drop six indexes, largest is 300MB and smallest is 50MB.
    I tried running drop index sapusername.index_name on the 50MB index via SQL*Plus and it seems to be taking forever. Can anyone please suggest if there is anything I can check on the database on why it is taking such a long time?
    I can leave it to run overnight but worried that when I come back the next day, it will still be hanged. Is there any quick way of dropping the index, .i.e. drop immediate ... :-)
    Am not using SAP's BRTOOLs as it is also hanging from there and the SAP-ADMIN had approved for the DBA to drop it from our end instead.
    Any response and advise on this will be very much appreciated.
    From Google'ing, I found some that mentioned that the fault could be because of the existence of the constraints on the table that I am dropping the index of.
    Checking the table, it has 17 SYS_ named constraints. None of these constraints have INDEX_NAME that refers to the indexes that am dropping.
    Should I disable the constraints and then run the drop index again?
    Thanks in advance.
    Edited by: user649596 on Apr 13, 2010 11:49 PM

    Should I disable the constraints and then run the drop index again?NO, certainly not !!
    Ask SAP Support on what methods you should use to diagnose the "hang" and what your next step(s) should be.
    Hemant K Chitale

  • Firewire Port not working, URGENT help please¡¡¡

    Hello People, i´ve just got a new Mac Mini  last week, and i´ve been trying to get my Alesis MasterControl audio interface, and is just a complete mess.
    This happened right after i´ve upgraded to 10.8.3 so i don´t know, the weird thing is that if i connect my old iBook to the Mac Mini the FW800 port works, but everytime i connect the audio interface, nothing happens, also the drivers from alesis, are up to date. i first thought about the port of the Mixer went bad, but it has 2 and non of them works, also thought about the cable but the same cable works when i connect my iBook, and the mixer is not bus powered, it has it´s own power supply.
    Needless to say i´ve already done the usual reset PRAM, turn of the Mac unplugged for 30 hour to reset the bus. etc.
    This is the usual firewire only system log that i get:
    31/03/13 08:01:20.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 08:01:30.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 11:33:23.529 system_profiler[528]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 11:35:43.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 11:38:55.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 11:42:08.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 11:44:39.124 CleanMyMacHelperTool[583]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.3.8671"
    31/03/13 11:44:39.146 CleanMyMacHelperTool[583]: Wont clean /Volumes/AlesisFirewire-3.5.3.8671 because disk image
    31/03/13 11:44:39.148 CleanMyMacHelperTool[583]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.3.8671"
    31/03/13 11:44:39.149 CleanMyMacHelperTool[583]: Wont clean /Volumes/AlesisFirewire-3.5.3.8671 because disk image
    31/03/13 11:44:52.727 coreservicesd[62]: Application App:"AlesisFirewireUninstaller" [ 0x0/0x7f07f]  @ 0x0x7fb5c8c30050 tried to be brought forward, but isn't in fPermittedFrontASNs ( ( ASN:0x0-0x80080:) ), so denying.
    31/03/13 11:44:52.727 WindowServer[85]: [cps/setfront] Failed setting the front application to AlesisFirewireUninstaller, psn 0x0-0x7f07f, securitySessionID=0x186a5, err=-13066
    31/03/13 11:47:28.533 CleanMyMacHelperTool[656]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.3.8671",
        "/Volumes/AlesisFirewire-3.5.6.11675"
    31/03/13 11:47:28.544 CleanMyMacHelperTool[656]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.3.8671",
        "/Volumes/AlesisFirewire-3.5.6.11675"
    31/03/13 11:49:26.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 11:52:39.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 11:57:22.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 11:57:34.000 kernel[0]: Alesis Firewire - 3.5.3.8671 preliminary - x86_64 CJ - May  3 2010 02:43:28
    31/03/13 11:58:36.982 com.apple.launchd.peruser.501[155]: ([0x0-0x1d01d].tc.tctechnologies.AlesisFirewire.controlpanel[238]) Job appears to have crashed: Abort trap: 6
    31/03/13 11:58:37.252 ReportCrash[242]: Saved crash report for AlesisFirewire Control Panel[238] version 3.5.3 (3.5.3.8671) to /Users/m1kygarcia/Library/Logs/DiagnosticReports/AlesisFirewire Control Panel_2013-03-31-115837_Mac-mini-de-Miguel.crash
    31/03/13 11:58:39.831 system_profiler[267]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 11:58:50.676 com.apple.launchd.peruser.501[155]: ([0x0-0x23023].tc.tctechnologies.AlesisFirewire.controlpanel[274]) Job appears to have crashed: Abort trap: 6
    31/03/13 11:58:50.837 ReportCrash[242]: Saved crash report for AlesisFirewire Control Panel[274] version 3.5.3 (3.5.3.8671) to /Users/m1kygarcia/Library/Logs/DiagnosticReports/AlesisFirewire Control Panel_2013-03-31-115850_Mac-mini-de-Miguel.crash
    31/03/13 11:58:53.638 system_profiler[277]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 11:59:09.747 CleanMyMacHelperTool[300]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.6.11675"
    31/03/13 11:59:09.905 CleanMyMacHelperTool[300]: Wont clean /Volumes/AlesisFirewire-3.5.6.11675 because disk image
    31/03/13 11:59:09.906 CleanMyMacHelperTool[300]: Mounted devices (
        "/Volumes/AlesisFirewire-3.5.6.11675"
    31/03/13 11:59:09.907 CleanMyMacHelperTool[300]: Wont clean /Volumes/AlesisFirewire-3.5.6.11675 because disk image
    31/03/13 12:00:47.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 12:00:59.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 12:01:56.720 system_profiler[269]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 12:05:40.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 12:08:52.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 12:12:42.277 AlesisFirewire Control Panel[245]: -_continuousScroll is deprecated for NSScrollWheel. Please use -hasPreciseScrollingDeltas.
    31/03/13 12:12:42.277 AlesisFirewire Control Panel[245]: -deviceDeltaX is deprecated for NSScrollWheel. Please use -scrollingDeltaX.
    31/03/13 12:12:42.278 AlesisFirewire Control Panel[245]: -deviceDeltaY is deprecated for NSScrollWheel. Please use -scrollingDeltaY.
    31/03/13 12:13:53.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 12:25:29.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 12:25:38.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 12:28:30.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 12:28:33.906 system_profiler[273]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 12:31:41.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 12:35:16.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 12:35:26.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 12:37:53.513 system_profiler[266]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 12:39:36.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 12:39:49.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 12:42:55.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: 53 bus resets in last 3 minutes.
    31/03/13 12:46:50.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: 68 bus resets in last 3 minutes.
    31/03/13 13:01:30.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 13:01:41.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 13:05:27.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: 79 bus resets in last 3 minutes.
    31/03/13 13:06:31.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:09:43.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:13:31.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 13:13:45.006 com.apple.kextd[11]: Can't load /System/Library/Extensions/IOFireWireIP.kext - ineligible during safe boot.
    31/03/13 13:13:45.008 com.apple.kextd[11]: Load com.apple.iokit.IOFireWireIP failed; removing personalities from kernel.
    31/03/13 13:13:54.818 com.apple.kextd[11]: Can't load /System/Library/Extensions/AlesisFirewire.kext - ineligible during safe boot.
    31/03/13 13:13:54.823 com.apple.kextd[11]: Load tc.tctechnologies.driver.AlesisFirewire failed; removing personalities from kernel.
    31/03/13 13:13:56.372 com.apple.kextd[11]: Can't load /System/Library/Extensions/AlesisFirewire.kext - ineligible during safe boot.
    31/03/13 13:13:56.375 com.apple.kextd[11]: Load tc.tctechnologies.driver.AlesisFirewire failed; removing personalities from kernel.
    31/03/13 13:15:40.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:18:46.763 com.apple.kextd[11]: Can't load /System/Library/Extensions/IOFireWireIP.kext - ineligible during safe boot.
    31/03/13 13:18:46.768 com.apple.kextd[11]: Load com.apple.iokit.IOFireWireIP failed; removing personalities from kernel.
    31/03/13 13:18:46.797 com.apple.kextd[11]: Can't load /System/Library/Extensions/AlesisFirewire.kext - ineligible during safe boot.
    31/03/13 13:18:46.800 com.apple.kextd[11]: Load tc.tctechnologies.driver.AlesisFirewire failed; removing personalities from kernel.
    31/03/13 13:18:50.775 system_profiler[221]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 13:18:52.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:21:03.488 system_profiler[235]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 13:22:37.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:24:07.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in now active, GUID 003ee1fffe88dc6a; max speed s800.
    31/03/13 13:24:19.000 kernel[0]: Alesis Firewire - 3.5.6.11675 (x86_64) Aug 16 2011 01:20:23
    31/03/13 13:31:00.926 system_profiler[316]: SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    31/03/13 13:33:03.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: 134 bus resets in last 3 minutes.
    31/03/13 13:35:11.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:38:24.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:41:36.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:44:48.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 13:58:13.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    31/03/13 14:01:25.000 kernel[0]: FireWire (OHCI) TI ID 823f built-in: no valid selfIDs for more than 3 minutes after bus reset.
    Can somebody help, please i´d gladly appreciate it.

    I have this
    System Profiler[170]
    SPFWR ERROR: FireWire bus may be unstable. Other FireWire devices may be present.
    & this
    kernel FireWire (OHCI) Lucent ID 5901 built-in: no valid selfIDs for more than 3 minutes after bus reset.
    Pls, help!!

Maybe you are looking for

  • Use of  T- Code CO1P

    Hi PP expert Can u tell me the use of  T- Code CO1P.(disply purpose ) If I excute that what happened.(It is use as like COGI). regards , NItu....

  • Prin character mode report (do not want to use Samba)

    Helo, i need input from someone experience implement oracle reports 10g for character mode report. this is the issue : 1. Client doesn't want to use Samba cause some security issue. 2. Because of issue no.1 we can not use file sharing or printer shar

  • How to read fieldcatalog of Data Entry View in CAT2

    Hi,      I have a requirement wherein I need to validate the time data of 'Data Entry View' in TCode: CAT2. Here, there is a table control which uses dynamic field catalog (for days Eg: MO 11/07, TU 11/08.....SU 11/13).        Whenever a user enters

  • Still Clip Duration

    I'm just starting to use Imovie HD, and i'm having problems editing the length of still clips. I can make them as short as i want, but can't make them longer by dragging in the editing bar. I looked in help, and where they tell you to double click th

  • Running Employee.java

    Hi, I modified Employee.java(hostname/uid/pwd) to connect to my remote Oracle database but when I run it, I keep getting a "Network Adapter could not establish connection" error message. My system is not on a network but I have a dial-in connection t