Eecute immediate help

hi guys plz help i dn't get where's the error in this procedure
create or replace procedure p_search (tab in varchar , rech in varchar)
as
stmt varchar(200);
begin
dbms_output.put_line('fuck shame ' || tab || ' ' ||rech );
if tab = ('GENRE') then
stmt :='CREATE MATERIALIZED view v_genre1 as select * from film where genre = :text_string' ;
execute immediate stmt using in rech;
elsif tab ='FILM' then
stmt :='CREATE MATERIALIZED view v_film1 as select * from film where titre = :text_string';
dbms_output.put_line(stmt);
execute immediate stmt using in rech;
elsif tab ='REALISATEUR' then
stmt :='CREATE MATERIALIZED view v_reali1 as select f.titre f. from film where titre = :text_string';
dbms_output.put_line(stmt);
execute immediate stmt using in rech;
else
dbms_output.put_line('il ya rien à exeuté');
end if ;
end;
error message
ORA-01027: variables attachées (bind variables) non autorisées pour opérations de définition de données
ORA-06512: à "DARK.P_SEARCH", ligne 9
ORA-06512: à ligne 8
fuck shame GENRE COMEDIE
Processus fermé.
Déconnexion de la base de données dark.

How do I ask a question on the forums?
SQL and PL/SQL FAQ
The standard advice when (ab)using EXECUTE IMMEDIATE is to compose the SQL statement in a single VARCHAR2 variable
Then print the variable before passing it to EXECUTE IMMEDIATE.
COPY the statement & PASTE into sqlplus to validate its correctness.

Similar Messages

  • Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem

    Hi,
    I failed to connect Tomcat 5.0.24 with Postgresql
    7.4.2. The files created by me and the changes i had
    made in the existing files are rates.jsp,
    conversionDAO.java, web.xml and server.xml. The error
    message on the top of the rest of it was "The value of
    useBean class attribute converter.conversionDAO is
    invalid". So far I found out that the coding for
    database connectivity purpose in conversionDAO.java
    cause the error. Another thing is Postgresql jdbc
    driver is required to set in the CLASSPATH for the
    java file to access the Postgresql database. I don't
    know where should I put it in Tomcat for web
    application. Anyway, I put it in
    $CATALINA_HOME/shared/lib according the book i
    refered. I do the database connectivity coding refer
    to the Tomcat Kick Start book from Sams Publishing.
    Below are the coding involved, please show me the
    mistake i had made. Thank you.
    ----server.xml----
    <Context path="/database"
    docBase="${catalina.home}/webapps/database" debug="0"
    reload="true">
    <ResourceParams name="jdbc/conversion">
    <parameter>
    <name>username</name>
    <value>myusername</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>mypassword</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>org.postgresql.Driver</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:postgresql://localhost/conversion</value>
    </parameter>
    </ResourceParams>
    </Context>
    ----web.xml----
    <servlet>
    <servlet-name>conversionDAO</servlet-name>
    <servlet-class>converters.conversionDAO</servlet-class>
    </servlet>
    <resource-ref>
    <res-ref-name>jdbc/conversion</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    ----conversionDAO.java----
    public conversionDAO() throws SQLException,
    NamingException
    Context init = new InitialContext();
    Context ctx = (Context)
    init.lookup("java:comp/env");
    DataSource ds = (DataSource)
    ctx.lookup("jdbc/conversion");
    con = ds.getConnection();
    select = con.prepareStatement(
    "SELECT rate FROM Exchange WHERE src= ? AND dst =

    Immediate HELP in Tomcat 5 to Postgresql 7.4 database connectivity problem (cont.)
    Errors log
    2004-06-06 01:07:53 StandardContext[servlets-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[servlets-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]SessionListener: contextDestroyed()
    2004-06-06 01:07:53 StandardContext[jsp-examples]ContextListener: contextDestroyed()
    2004-06-06 01:07:59 StandardContext[balancer]org.apache.webapp.balancer.BalancerFilter: init(): ruleChain: [org.apache.webapp.balancer.RuleChain: [org.apache.webapp.balancer.rules.URLStringMatchRule: Target string: News / Redirect URL: http://www.cnn.com], [org.apache.webapp.balancer.rules.RequestParameterRule: Target param name: paramName / Target param value: paramValue / Redirect URL: http://www.yahoo.com], [org.apache.webapp.balancer.rules.AcceptEverythingRule: Redirect URL: http://jakarta.apache.org]]
    2004-06-06 01:08:00 StandardContext[jsp-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[jsp-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]ContextListener: contextInitialized()
    2004-06-06 01:08:00 StandardContext[servlets-examples]SessionListener: contextInitialized()
    2004-06-06 01:08:01 StandardWrapperValve[jsp]: Servlet.service() for servlet jsp threw exception
    org.apache.jasper.JasperException: /rates/rates.jsp(5,0) The value for the useBean class attribute converters.conversionDAO is invalid.
         at org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:39)
         at org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:357)
         at org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:141)
         at org.apache.jasper.compiler.Generator$GenerateVisitor.visit(Generator.java:1217)
         at org.apache.jasper.compiler.Node$UseBean.accept(Node.java:1116)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Node$Visitor.visitBody(Node.java:2213)
         at org.apache.jasper.compiler.Node$Visitor.visit(Node.java:2219)
         at org.apache.jasper.compiler.Node$Root.accept(Node.java:456)
         at org.apache.jasper.compiler.Node$Nodes.visit(Node.java:2163)
         at org.apache.jasper.compiler.Generator.generate(Generator.java:3261)
         at org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:244)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:439)
         at org.apache.jasper.compiler.Compiler.compile(Compiler.java:422)
         at org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:507)
         at org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:274)
         at org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:292)
         at org.apache.jasper.servlet.JspServlet.service(JspServlet.java:236)
    ----more----

  • Wsdl trouble - WILL PAY FOR IMMEDIATE HELP

    I'm having trouble consuming a webservice - code works in PHP
    but coldfusion keeps getting back a null value. The function only
    takes 1 parameter, of which I'm sending. I'll paypal you money for
    your help - PM me for details

    > WILL PAY FOR IMMEDIATE HELP
    I do not believe that that is in the spirit of this forum. If
    you post your code here, you will most likely get a quick answer to
    the question anyway.

  • Need Immediate help...importing issue

         I work for a video editing company and today out of the blue, Premiere Pro started to act funny, its auto cropping clips that I am importing. It used to import these files fine and now its cutting them in half, I have tried all the basic stuff...I sort of also work IT here so the (re-install, reboot, try different settings) have all been done. The fact is it was doing it fine the other day and now it is making my workflow for the day grind to a halt until I figure this out.
    Immediate help/suggestions would be greatly appreciated.
                                                This is how its importing                                                                                 This his how it plays in a media player
    -Chris

    Im using Adobe Premiere CS5.5
    I have all updates
    Using windows 7 Pro
    Intel Core i7 2600K CPU @ 3.4Ghz
    16GB of ram
    64 bit OS
    source footage is:
    WMV File
    640x480
    2000kbps data rate
    29 fps
    I get no error codes
    this occurs immediatley when I drop it into premiere, and in the timeline and when I export.
    Thank you

  • Scrambled QT video on my PC... immediate help requested....

    Ive never had a problem with QT movies on my PC before, but for some reason every single .mov file I open is now scrambled or encoded and all I get is square chunks... with good audio. BUT... when I transfer them to my Mac G5, they play back just fine... and that is with the standard Quicktime version.
    I have Windows XP and I've had Quicktime Pro for a few years now with no difficulties... I have old and new .mov files on my hard drive that I have been playing on my PC with absolutely no problems, but all of a sudden... SCRAMBLE CITY BABY! Ive gone through some troubleshooting basics... like updating QT and directx...but to no avail.
    I consider myself somewhat technically savvy, as I am a graphics and program editor on both Macs and PCs. But this problem has got me scratching my head... I can usually solve these issues through these forums, but I cant seem to find the answer for my particular problem.
    Any immediate help would be very much appreciated... thanks!!

    Sounds like a graphics card driver or similar issues.
    Try this:
    Open the QuickTime Control Panel and click the advanced tab. Place a check mark (under the Video settings) for "Safe Mode" and try the file again. A quit and restart of QuickTime Player may be required.
    If "safe mode" works you may need to update your "driver" software before trying the "DirectX" features.

  • Query- Personnel Cost Planning-Immediate Help required

    Hi,
    I have a query.
    I am trying to Assign Percentage to Cost Item ( Personnel cost Planning)- Bonus which is a dependent cost item to Direct Cost Item-Base Salary but when I run the
    T. Code:- PHCPADMN the Bonus Percentage is not getting reflected and if I run the report-Plan data it is not showing any calculation of percentage.
    Kindly any immediate help is highly appreciable as I need to resolve it ASAP.
    Regards,
    Happy

    Hi Soniya
    I think you should look into following links:
    help.sap.com/printdocu/core/Print46c/en/data/pdf/PACMCP/PACMCP.pdf
    help.sap.com/saphelp_46c/helpdata/en/fd/45a4f79d6411d189b60000e829fbbd/content.htm
    Thanks
    Yash

  • ANOTHER SCAMMER ASKING FOR INFO screen name "Get Immediate Help"

    Scammer contacted me after posting for help with my adobe product.
    Screen name "Get Immediate Help"
    Asked to talked to me via skype and then asked for Adobe ID and password

    Looks like he was deactivated.

  • Immediate help required with decode statement in scheduling jobs

    Hi
    Iam trying to change a job that runs my procedure using dbms_job.. Here is the output I got.
    Can someone help me why this is giving me errors.
    <code>
    SQL> exec dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24'));
    BEGIN dbms_job.next_date(395,decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),-1,'trunc(sysdate) +18.5/24',1,'trunc(sysdate)+1+6.5/24')); END;
    ERROR at line 1:
    ORA-06550: line 1, column 30:
    PLS-00204: function or pseudo-column 'DECODE' may be used inside a SQL
    statement only
    ORA-06550: line 1, column 7:
    PL/SQL: Statement ignored
    </code>
    Thanks in advance

    A possible solution:
    declare
    v_next_varchar varchar2(30);
    v_next_date date;
    begin
    select decode(sign(substr(to_char(sysdate,'dd/mm/yy hh24:mi'),10,2)-17),
                              -1,'trunc(sysdate) +18.5/24',
                                 1,'trunc(sysdate) +1+6.5/24'
    into v_next_varchar
    from dual;
    execute immediate 'select ' || v_next_varchar || ' from dual ' into v_next_date;
    dbms_job.next_date(22, v_next_date);
    commit;
    end;Bye, Aron

  • Behavior of load balancers - Oracle weblogic 10.0 - immediate help required

    Hi,
    We have an environment where we have two load balancing servers for one application. We are facing an issue, where a request which comes from the front end (Ajax request) is re-submitted exactly after 3 minutes in this load balancing environment. At any time, one server is taking the requests, but the request is getting re-submitted after every 3 mins. First time, the request is taking more than 3 minutes to give the response, so, many requests are getting submitted each after 3 minutes. Can any one suggest me which setting/parameter of the load balancer cause this? And how to resolve this? We came to know that this is purely of load-balancing issue, as the same issue is not reproducible in normal environments (single server env)
    Awaiting your immediate response,
    Thanks in advance...
    Gayathri.
    Edited by: 900817 on Dec 29, 2011 9:34 PM

    If I understand your scenario,
    * a client at some other layer of your application submits an AJAX type request towards a service running on WebLogic 10.x
    * that transaction IS expected to have a long execution time -- longer than 3 minutes
    * your service on WebLogic is seeing the request submitted a second time (in error) after 3 minutes elapse while the prior thread is still running
    It sounds like:
    * the request was implemented as a synchronous call
    * your AJAX framework is using a default TCP timeout of 180 seconds (3 minutes) -- pretty standard setting
    * the client isn't seeing a response in 180 seconds and its TCP layer is assuming something errored out and is aborting the first TCP connection and resubmitting it.
    Assuming the load balancer isn't implementing its own 180 second limit on connections without any traffic flowing, you may need to either
    * find a way to tune your AJAX client to configure it to wait longer for responses
    * alter the implementation of the service to be an asynchronous call so the AJAX client waits for a callback sent by your service when execution completes.
    Hope that helps.

  • Please - immediate help needed parsing csv values into multiple rows

    Hello, we have a very immediate need to be able to parse out a field of comma separated values into individual rows. The following is an example written in SQL Server syntax which does not work in Oracle.
    The tricky part is that each ROUTES can be a different length, and each CSV can have a different number of routes in it.
    Here is an example of the table ("Quotes") of CSV values I want to normalize:
    TPNUMBER ROUTES
    1001 1, 56W, 18
    1002 2, 16, 186, 28
    Here is an example of what I need it to look like:
    TPNUMBER ROUTES
    1001 1
    1001 56W
    1001 18
    1002 2
    1002 16
    1002 186
    1002 28
    Here is the "Tally" table for the query below:
    ID
    1
    2
    3
    4
    5
    6
    7
    And finally, here is the query which parses CSV values into multiple rows but which does not work in Oralce:
    SELECT TPNUMBER,
    NullIf(SubString(',' + ROUTES + ',' , ID , CharIndex(',' , ',' + ROUTES + ',' , ID) - ID) , '') AS ONEROUTE
    FROM Tally, Quotes
    WHERE ID <= Len(',' + ROUTES + ',') AND SubString(',' + Phrase + ',' , ID - 1, 1) = ','
    AND CharIndex(',' , ',' + ROUTES + ',' , ID) - ID > 0
    It may be necessary to use a cursor to loop through the CSV table and process each row (a loop within another loop...) but this is beyond my comprehesion of PL/SQL.
    Many thanks in advance for your advice/help.
    apk

    Not sure what you are trying to do with the last step, but this should work for the first part. I assume you would use sqlldr but I just did inserts instead. You might need more than 5 "routes" in the csv. You could put some reasonable max on that number of columns:
    SQL>create table t_csv
    2 (TPNUMBER varchar2(20),
    3 ROUTE_1 VARCHAR2(5),
    4 ROUTE_2 VARCHAR2(5),
    5 ROUTE_3 VARCHAR2(5),
    6 ROUTE_4 VARCHAR2(5),
    7 ROUTE_5 VARCHAR2(5),
    8 ROUTE_6 VARCHAR2(5) );
    Table created.
    SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2) values( '1001 1', '56W', '18' );
    1 row created.
    SQL>INSERT INTO t_csv (TPNUMBER,ROUTE_1,ROUTE_2,ROUTE_3) values( '1002 2', '16', '186', '28');
    1 row created.
    SQL>create table t_quotes(
    2 tpnumber NUMBER,
    3 routes VARCHAR2(5));
    Table created.
    SQL>DECLARE
    2 L_tpnumber NUMBER;
    3 L_route VARCHAR2(5);
    4 begin
    5 for rec in (select * from t_csv) loop
    6 L_tpnumber := SUBSTR(rec.tpnumber,1,INSTR(rec.tpnumber,' ')-1);
    7 L_route := SUBSTR(rec.tpnumber,INSTR(rec.tpnumber,' ')+1);
    8 insert into t_quotes values( L_tpnumber, l_route );
    9 if rec.route_1 is not null then
    10 insert into t_quotes values( L_tpnumber, rec.route_1 );
    11 end if;
    12 if rec.route_2 is not null then
    13 insert into t_quotes values( L_tpnumber, rec.route_2 );
    14 end if;
    15 if rec.route_3 is not null then
    16 insert into t_quotes values( L_tpnumber, rec.route_3 );
    17 end if;
    18 if rec.route_4 is not null then
    19 insert into t_quotes values( L_tpnumber, rec.route_4 );
    20 end if;
    21 if rec.route_5 is not null then
    22 insert into t_quotes values( L_tpnumber, rec.route_5 );
    23 end if;
    24 end loop;
    25 end;
    26 /
    PL/SQL procedure successfully completed.
    SQL> select tpnumber, routes from t_quotes;
    TPNUMBER ROUTE
    1001 1
    1001 56W
    1001 18
    1002 2
    1002 16
    1002 186
    1002 28
    7 rows selected.

  • ORA-0 1033 Error- Immediate Help Needed!

    Hello I am a student have little knowledge abt oracle. My Oracle failed to startup showing ORA-0 1033 error. and its just 3 days before my project submission. Please Help immediately. Here is what I tried ---
    C:\>sqlplus "/as sysdba"
    SQL*Plus: Release 10.2.0.1.0 - Production on Sat Dec 18 11:23:47 2010
    Copyright (c) 1982, 2005, Oracle. All rights reserved.
    Connected to:
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 - Production
    With the Partitioning, OLAP and Data Mining options
    SQL> shu immediate
    ORA-01109: database not open
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup force mount;
    ORACLE instance started.
    Total System Global Area 293601280 bytes
    Fixed Size 1248600 bytes
    Variable Size 109052584 bytes
    Database Buffers 176160768 bytes
    Redo Buffers 7139328 bytes
    Database mounted.
    SQL> recover database;
    ORA-00283: recovery session canceled due to errors
    ORA-01122: database file 3 failed verification check
    ORA-01110: data file 3: 'K:\ORACLE\PRODUCT\10.2.0\ORADATA\INDRA\SYSAUX01.DBF'
    ORA-01207: file is more recent than control file - old control file
    SQL> alter database open;
    alter database open
    ERROR at line 1:
    ORA-01122: database file 3 failed verification check
    ORA-01110: data file 3: 'K:\ORACLE\PRODUCT\10.2.0\ORADATA\INDRA\SYSAUX01.DBF'
    ORA-01207: file is more recent than control file - old control file
    If it can be restored anyhow do help. I dont have a backup of the database!

    as i said i hv little knowledge abt oracle. I dont know if it was in archive log mode. how to find that out ! ... i think my oracle stopped working after an abnormal shutdown of the computer.
    and, the file as you can see have the error --
    ORA-01122: database file 3 failed verification check
    ORA-01110: data file 3: 'K:\ORACLE\PRODUCT\10.2.0\ORADATA\INDRA\SYSAUX01.DBF'
    any way to get this file restored??

  • I downloaded something and now when I click on safari yahoo comes up instead of top sites and I really want top sites back it's easier and google as the search engine on the top bar helped a lot too!! Please answer quick need immediate HELP!!

    I Downloaded something onto my computer and now when I click onto safari yahoo pops up instead of top sites I know certain changes come along with downloading but if there is a way back to top sites and google as my search engine I need it!! I'm not one for change and I love the whole original display that the macs have to offer when you first get your mac so thats why I really want top sites back also it was great when your in and rush and so much easier!! Please HELP immediately this is urgent!!

    Identify and remove adware
    http://www.thesafemac.com/arg/
    or use Adware Removal Tool.
    http://www.thesafemac.com/art/

  • Problem with utl_smtp.write_data - immediate help needed

    Hi,
    I have a sql code that generates a .csv file and sends it as an attachment through utl_smtp.
    Everything works fine but the .csv file's header gets broken after certain characters..wondering why this is happening..pls help.
    Please find my code below:
    SET define off;
    DECLARE
    --CURSOR VARIABLES
    v_meter_count NUMBER := 0;
    v_meter_max_count NUMBER := 0;
    v_sysdate DATE := TRUNC (SYSDATE);
    --MAIL VARIABLES
    v_run_date DATE := TRUNC (SYSDATE);
    crlf CONSTANT VARCHAR2 (10) := UTL_TCP.crlf;
    boundary CONSTANT VARCHAR2 (256)
    := '-----7D81B75CCC90D2974F7A1CBD';
    first_boundary CONSTANT VARCHAR2 (256) := '--' || boundary || crlf;
    last_boundary CONSTANT VARCHAR2 (256)
    := '--' || boundary || '--' || crlf;
    multipart_mime_type CONSTANT VARCHAR2 (256)
    := 'multipart/mixed; boundary="' || boundary || '"';
    conn UTL_SMTP.connection;
    from_name VARCHAR2 (255) := 'Nielsen Online';
    from_address VARCHAR2 (255)
    := '[email protected]';
    to_address VARCHAR2 (255)
    := '[email protected]';
    subject VARCHAR2 (255) := '';
    mime_type VARCHAR2 (255) := 'text/plain';
    attachment_file_name VARCHAR2 (255) := NULL;
    mailhost VARCHAR2 (255) := '127.0.0.1';
    --PANELISTS' DETAILS CURSOR
    CURSOR tam_panelists
    IS
    SELECT a.panel_sys_id, a.panel_site_id, a.login_id,
    b.recruit_start_date, c.meter_id, d.affiliate_id,
    d.afflt_member_id,
    (CASE
    WHEN b.last_active_date >= TRUNC (SYSDATE) - 30
    THEN 'Active'
    ELSE 'Inactive'
    END
    ) hh_status,
    (SELECT e.affiliate_description
    FROM pfshared3.lkp_affiliates e
    WHERE e.partner_id =
    NVL (d.affiliate_id, 0)
    AND e.pnl_sys_id = a.panel_sys_id) affiliate_description
    FROM mgtw.dat_ps_login_info a,
    mgtw.dat_ps_install_info b,
    mgtw.dat_ps_info c,
    mgtw.dat_ps_recruit_info d
    WHERE a.login_id LIKE 'tam%@tam%.com'
    AND a.panel_site_id = b.panel_site_id
    AND a.panel_sys_id = b.panel_sys_id
    AND a.panel_site_id = c.panel_site_id
    AND a.panel_sys_id = c.panel_sys_id
    AND a.panel_site_id = d.panel_site_id
    AND a.panel_sys_id = d.panel_sys_id
    AND a.active_flag = 1
    AND b.first_mtr_install_date IS NOT NULL
    AND b.last_active_date IS NOT NULL;
    --PANELISTS' PC DETAILS CURSOR
    CURSOR pc_activity (p_meter_id IN VARCHAR2)
    IS
    SELECT cpt_guid, first_active_date, last_active_date,
    TO_CHAR(first_install_date,'MM/DD/YYYY HH:MI') first_install_dt,
    (TRUNC (SYSDATE) - last_active_date) inactive_days,
    (CASE
    WHEN last_active_date >= TRUNC (SYSDATE) - 30
    THEN 'Active'
    ELSE 'Inactive'
    END
    ) status
    FROM pfshared3.dat_pnl_computers
    WHERE meter_id = p_meter_id
    ORDER BY last_active_date DESC;
    --RECORD TYPE FOR PANELISTS' DETAILS
    TYPE t_panelist_set IS TABLE OF tam_panelists%ROWTYPE;
    v_panelist_data t_panelist_set;
    --RECORD TYPE FOR PANELISTS' PC DETAILS
    TYPE t_pc_set IS TABLE OF pc_activity%ROWTYPE;
    v_pc_data t_pc_set;
    PROCEDURE send_header (NAME IN VARCHAR2, header IN VARCHAR2)
    IS
    BEGIN
    UTL_SMTP.write_data (conn, NAME || ': ' || header || crlf);
    END;
    BEGIN
    --MAX METER COUNT
    BEGIN
    SELECT MAX(COUNT (meter_id))
    INTO v_meter_max_count
    FROM pfshared3.dat_pnl_computers
    WHERE last_active_date IS NOT NULL
    GROUP BY meter_id;
    EXCEPTION
    WHEN OTHERS
    THEN
    v_meter_max_count := 0;
    END;
    DBMS_OUTPUT.put_line ( 'STARTED - '
    || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    conn := UTL_SMTP.open_connection (mailhost);
    UTL_SMTP.helo (conn, mailhost);
    UTL_SMTP.mail (conn, '< ' || from_address || ' >');
    UTL_SMTP.rcpt (conn, '< ' || to_address || ' >');
    UTL_SMTP.open_data (conn);
    send_header ('From', '"' || from_name || '" <' || from_address || '>');
    send_header ('To', '' || to_address || '');
    send_header ('Date', TO_CHAR (SYSDATE, 'dd Mon yy hh24:mi:ss'));
    subject := 'TW Daily Activity Report' || ' - ' || v_run_date;
    send_header ('Subject', subject);
    send_header ('Content-Type', multipart_mime_type);
    -- Close header section by a crlf on its own
    UTL_SMTP.write_data (conn, crlf);
    -- mime header
    UTL_SMTP.write_data (conn, first_boundary);
    send_header ('Content-Type', mime_type);
    UTL_SMTP.write_data (conn, crlf);
    UTL_SMTP.write_data (conn, crlf);
    -- add the attachment
    attachment_file_name := 'TW_Daily_Activity_Report_' || v_run_date || '.txt';
    UTL_SMTP.write_data (conn, first_boundary);
    send_header ('Content-Type', mime_type);
    send_header ('Content-Disposition',
    'attachment; filename= ' || attachment_file_name
    UTL_SMTP.write_data (conn, crlf);
    --CREATING HEADERS
    UTL_SMTP.write_data (conn,
    'Date of Reporting'
    || ','
    || 'Panelist ID'
    || ','
    || 'Meter ID'
    || ','
    || 'Panelist Email(Username)'
    || ','
    || 'Vendor'
    || ','
    || 'Affiliate ID'
    || ','
    || 'UID'
    || ','
    || 'Enrollment Date'
    || ','
    || 'HH Status'
    || ','
    || 'Registered PC in the HH'
    || ','
    FOR k IN 1 .. v_meter_max_count
    LOOP
    UTL_SMTP.write_data (conn,
    'Installation Date/Time MM/DD/YYYY HH:MI PC' || k || ',' || 'PC '|| k ||': Status' || ',' || 'PC '|| k ||': Date of First log' || ',' || 'PC '|| k ||': Date of Last log' || ',' || 'PC '|| k ||': Days since Last Activity' || ',' || 'PC '|| k ||': Computer ID' || ','
    END LOOP;
    UTL_SMTP.write_data (conn, crlf);
    --OPENING PANELISTS' DETAILS CURSOR
    OPEN tam_panelists;
    --FETCHING PANELISTS' DETAILS CURSOR
    FETCH tam_panelists
    BULK COLLECT INTO v_panelist_data;
    FOR i IN v_panelist_data.FIRST .. v_panelist_data.LAST
    LOOP
    --METER COUNT
    BEGIN
    SELECT COUNT (meter_id)
    INTO v_meter_count
    FROM pfshared3.dat_pnl_computers
    WHERE meter_id = v_panelist_data (i).meter_id
    GROUP BY meter_id;
    EXCEPTION
    WHEN OTHERS THEN
    v_meter_count := 0;
    END;
    --OPENING PANELISTS' PC DETAILS CURSOR
    OPEN pc_activity (v_panelist_data (i).meter_id);
    --FETCHING PANELISTS' PC DETAILS CURSOR
    FETCH pc_activity
    BULK COLLECT INTO v_pc_data;
    UTL_SMTP.write_data (conn,
    v_sysdate
    || ','
    || v_panelist_data (i).panel_site_id
    || ','
    || v_panelist_data (i).meter_id
    || ','
    || v_panelist_data (i).login_id
    || ','
    || v_panelist_data (i).affiliate_description
    || ','
    || v_panelist_data (i).affiliate_id
    || ','
    || v_panelist_data (i).afflt_member_id
    || ','
    || v_panelist_data (i).recruit_start_date
    || ','
    || v_panelist_data (i).hh_status
    || ','
    || v_meter_count
    || ','
    FOR j IN v_pc_data.FIRST .. v_pc_data.LAST
    LOOP
    UTL_SMTP.write_data (conn,
    v_pc_data (j).first_install_dt
    || ','
    || v_pc_data (j).status
    || ','
    || v_pc_data (j).first_active_date
    || ','
    || v_pc_data (j).last_active_date
    || ','
    || v_pc_data (j).inactive_days
    || ','
    || v_pc_data (j).cpt_guid
    || ','
    END LOOP;
    UTL_SMTP.write_data (conn, crlf);
    CLOSE pc_activity;
    END LOOP;
    CLOSE tam_panelists;
    -- CLOSE THE MESSAGE
    UTL_SMTP.write_data (conn, last_boundary);
    -- CLOSE CONNECTION
    UTL_SMTP.close_data (conn);
    UTL_SMTP.quit (conn);
    DBMS_OUTPUT.put_line ( 'ENDED - '
    || TO_CHAR (SYSDATE, 'DD-MON-YYYY HH:MI:SS')
    RETURN;
    EXCEPTION
    WHEN UTL_SMTP.transient_error OR UTL_SMTP.permanent_error
    THEN
    UTL_SMTP.quit (conn);
    raise_application_error
    (-20000,
    'Failed to send mail due to the following error: '
    || SQLERRM
    WHEN OTHERS
    THEN
    raise_application_error
    (-20000,
    'Script failed due to the following error: '
    || SQLERRM
    RETURN;
    END;
    Please find below the header of the .csv file generated:
    Date of Reporting     Panelist ID     Meter ID     Panelist Email(Username)     Vendor     Affiliate ID     UID     Enrollment Date     HH Status     Registered PC in the HH     Installation Date/Time MM/DD/YYYY HH:MI PC1     PC 1: Status     PC 1: Date of First log     PC 1: Date of Last log     PC 1: Days since Last Activity     PC 1: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC2     PC 2: Status     PC 2: Date of First log     PC 2: Date of Last log     PC 2: Days since Last Activity     PC 2: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC3     PC 3: Status     PC 3: Date of First log     PC 3: Date of Last log     PC 3: Days since Last Activity     PC 3: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC4     PC 4: Status     PC 4: Date of First log     PC 4: Date of Last log     PC 4: Days since Last Activity     PC 4: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC5     PC 5: Status     PC 5: Date of First log     PC 5: Date of Last log     PC 5: Days since Last Activity     PC 5: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC6     PC 6: Status     PC 6: Date of First log     PC 6: Date of Last log     PC 6: Days since Last Activity     PC 6: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC7     PC 7: Status     PC 7: Date of First log     PC 7: Date of Last log     PC 7: Days since Last Activity     PC 7: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC8     PC 8: Status     PC 8: Date of First log     PC 8: Date of Last log     PC 8: Days since Last Activity     PC 8: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC9     PC 9: Status     PC 9: Date of First log     PC 9: Date of Last log     PC 9: Days since Last Activity     PC 9: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC10     PC 10: Status     PC 10: Date of First log     PC 10: Date of Last log     PC 10: Days since Last Activity     PC 10: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC11     PC 11: Status     PC 11: Date of First log     PC 11: Date of Last log     PC 11: Days since Last Activity     PC 11: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC12     PC 12: Status     PC 12: Date of First log     PC 12: Date of Last log     PC 12: Days since Last Activity     PC 12: Computer ID     Installation Date/Time MM/DD/YYYY HH:MI PC13     PC!
    *13: Sta                                                                                                                                                                                                                                                                                                                                                                                                                               *
    tus     PC 13: Date of First log     PC 13: Date of Last log     PC 13: Days since Last Activity     PC 13: Computer ID                                                                                                                                                                     
    The one highlighted in bold is the broken header.
    Please provide a solution to this.
    Thanks
    Monika
    Edited by: 953348 on Aug 18, 2012 8:00 AM

    I can't provide a solution but maybe a little help. With the header line you posted here it seems to me that a new line starts after 2048 = 2^11 characters. This might be a limitation or a length of any variable in the package.
    Maybe you can change this value or shorten the texts in the header to stay below this limit.
    A few more things:
    - the code, that you posted here became destroyed in lines like UTL_SMTP.mail (conn, '< ' .... because the forum software tried to find html-code between the "<" and ">" signs.
    - you can mark code in your postings with (see FAQ). It makes code better readable but it does not help with the "<" and ">" signs.
    - you left your e-mail-address in the header of the code. I guess this was not your intention. You can edit it and remove the address even after posting a message.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Runtime Error in File Preview of RH7 - Immediate help needed!

    Dear all,
    we're working on a RoboHelp 7 project under version control.
    Today we encountered a major issue with ur project/database. When opening files in the preview window, they are displayed without error. As soon you click on a link within this file that leads to another HTML file, you get a pop-up with a runtime error message. You're asked either to debug or not. Selecting no displays a second runtime error with the same question. After also declining, you get to the selected HTML file.
    We have two major sorts of files: Chapter overview pages and topic files. Both are based on the same Style Sheet (CSS) and template. For the overview files the layout is just changed a bit when you create the file. Further there are some extra files don't use the template.
    Now I recognized some kind of logic:
    - When you open an overview-file, the two pop-ups always refer to runtime errors in line 46 and 49.
    - When you open a topic file, the two pop-ups always refer to runtime errors in line 50 and 53.
    - When you open a file that is blank and not based on the template, there's no error.
    Until now, the error never occured. But since today (or maybe last week und we didn't recognize), this error comes up even for files that were created months ago and never had an error before. They were changed today automatically when a renamed a chapter. Even within our "clean and working" backups we now encounter this error.
    Questions:
    - Can anyone explain, what a runtime error is at all?
    - My assumption is, that it has something to do with the CSS or template, but I'm not sure. What can be wrong there?
    - To what lines do the specifications in the pop-up refer to? Where can I find those lines?
    As we are in a very critical project phase, I really need your assistance for a quick and effective solution. Please help me as soon as possible!! Thanks!!

    Hi Tom
    Here is my own educated guess.
    When you have links of any type in a HTML document, a calculation has to occur at the time they are created. The application has to calculate where the linked item is in relation to the existing page. Then HTML shorthand is created to navigate. Up a folder level is ../ and up two folder levels is ../../. Stuff like that.
    Popups are a different story. While you are still creating links, these beasties are actually handled using JavaScript. So the path is supplied in the call to the JavaScript.
    As if that weren't complex enough, we now toss Headers and Footers into the mix. Headers and Footers are tied to the Master Page. The Master Page is always in the root level of the project. Links in a Header and Footers often break because of the assorted locations of HTML pages if you are using folders to organize your project. So when you create the link initially as part of the Master Page, things are dandy and as long as the topic is in the project root folder (same as the Master Page) things would likely work fine. But if that Master Page is associated with a topic inside a folder level or two down, things can go to pot in a hurry! (Where are we all headed? And what's with the handbasket?)
    Hopefully this helps shed some possible explanation... Rick
    Helpful and Handy Links
    RoboHelp Wish Form/Bug Reporting Form
    Begin learning RoboHelp HTML 7 or 8 within the day - $24.95!
    Adobe Certified RoboHelp HTML Training
    SorcerStone Blog
    RoboHelp eBooks

  • ***SOLVED*** Friends MSI P35 Neo has no video/post!!! Need IMMEDIATE Help!

    Ok, I have been working with computers for a LONG time.  My best friend and I built him a gaming rig.  He has a Intel Core 2 Quad 2.4ghz, a single Ati Radeon x850 Crossfire Edition, a Rosewell 550 watt power supply, and 2gb of ddr2 RAM (unknown brand...).  Today me and him decided to dust out his case and tidy up his cables to increase airflow (his brother did a bad job LOL).  Everything was working before.  Now everything is powering on: the fans/LEDs, gfx card fan, psu, hdd, dvd drive, etc, but the screen is blank and i get no post/bios.  Me and him went to the movies tonight to see Saw 5 , and I couldnt spend the night at his house to work on it.  He is EXTREMELY pissed at me and thinks I broke his whole rig.  I feel horrible.  I read the manual for his mobo and EVERYTHING is hooked up correctly.  I didnt do anything wrong.  I have been googling and heard a lot of issues with MSI mobos like this.  Please help me or my friend may never let me touch or look at his pc again.  BTW i am only 15 years old, but i truely know what i am talking about.  I know all the terms so dont feel that you have to go make it simple for my young mind hehe.  I have been working on computers for about 5+ years.  Im quite intelligent in this field.
    Help truely appreciated! 

    Quote from: kourosh on 26-October-08, 23:10:59
    i put my money on ram gone loose you may have to put the ram a few times before it works they can be funny and then naturally check the graphic card that may be loose too so double check all connection and cables  . i do not think it is cmos
    i dont think this is cmos at all.  it was fine before, and in other topics like this, reseting it has done nothing.  does ram effect things like this? already checked gfx card cables, they are in tightly. in need my friend to push down on his ram when he gets home and see if it helps.

Maybe you are looking for

  • DVD drive won't accept disks since Snow Leopard upgrade

    I just upgraded my Macbook to Snow Leopard, and now I can't insert disks into my optical drive. It just won't accept them. Help! Thanks in advance!

  • Chkdsk Utility - iTunes

    When I connect my IPOD Mini to my computer, I get the following error message: iTunes:iTunes.exe-Corrupt file The file or directory \IPod_Control\iTunes\iTunesPrefs is corrupt and unreadable. Please run the Chkdsk Utility. I cannot find the place to

  • Exporting pdf warning message...

    Hi, Not sure if you can help me but the problem I'm having is that when I export, the links work but a security box comes up asking for the user to allow access... I have no security on my pdf and can't seem to fix this... can anyone offer a suggesti

  • Problem in HTMLB..Please Help...urgent....:(

    Hello All, Please refer to the below code: package com.sap.NewOrderAssignment; import java.io.Serializable; import java.util.Calendar; import java.util.Date; import java.util.Locale; import java.util.GregorianCalendar; import com.sapportals.htmlb.*;

  • Power went out, can't open file I was working on earlier.

    I use photoshop CS5 on windows 7. Been working on a file with a few layers, then the power goes out so my computer "crashes". When I reboot my computer, I am unable to open the file I was working on earlier and instead, get the message "Could not com