Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  • Users: Dagon
  • Order by date
  1. Dagon

    Parse out columns of text

    If you desperately wanted to use the Oracle 11 pivot function, you could do something like this: create table testdenorm (id number, path varchar2(100 char), security varchar2(50 char)); insert into testdenorm values ( 208...
  2. Dagon

    Returning Confirm to HTML from JS function

    Sorry, this got garbled. It was supposed to say this: I created a button in a form with a confirm dialog to allow the user to cancel the action using: <button> ... onclick="return confirm('Are you sure?')" </button> That works fine and the button action is cancelled if the user clicks...
  3. Dagon

    Returning Confirm to HTML from JS function

    That works fine and the button action is cancelled if the user clicks Cancel on the confirm box. But I really want it to be a bit more sophisticated and take parameters to determine whether it displays the dialog box or not. As a first step, I have a JS function such as: function...
  4. Dagon

    delete data using a trigger

    Try changing IF :OLD.EVDATE >= 'SYSDATE' THEN to IF :OLD.EVDATE >= SYSDATE THEN
  5. Dagon

    Generating an error using a trigger

    Yes, that's exactly what I would expect to appear.
  6. Dagon

    Generating an error using a trigger

    Month" appears to pad the month name with spaces (presumably to the length of the longest month). Trimming it should fix the problem: create or replace trigger trigtest BEFORE INSERT OR UPDATE OF evdate ON event FOR EACH ROW BEGIN IF TRIM(TO_CHAR(:NEW.evdate,'MONTH')) = 'AUGUST' THEN...
  7. Dagon

    Combine Mutiple Statements into one

    You can use the "create schema" command to create multiple options in one session, but I don't think you can also include a drop table. I'm not entirely sure why it would be such a big deal, though.
  8. Dagon

    Object type returns error

    BTW, even if you get round the problem of it not recognising your type, the code is completely wrong. You haven't initialized your objects or extended them to add new elements. I've put together an example to show you how you should use object types in PL/SQL. CREATE OR REPLACE TYPE...
  9. Dagon

    Object type returns error

    All objects and packages, that is.
  10. Dagon

    Object type returns error

    Are all the objects being created by the same user?
  11. Dagon

    CLOB

    It's impossible to diagnose anything without more information here. What is the report doing? What is it written in? How are you populating the v_a return variable?
  12. Dagon

    sql query - working days between two dates (including public holidays)

    True, but you could easily combine it with the formula you already heave for excluding weekdays. Alternatively, you could populate the weekends into the table as well, which would be very easy to do using a query such as: select next_day(trunc(sysdate), 'Saturday')+(7*(level-1)) from dual...
  13. Dagon

    I have a string: ,off,on,off

    As I suggested in my response to getjjb's duplicate posting, LTRIM could also be used. I think this would be better because the function would then work regardless of whether there was a leading comma or not.
  14. Dagon

    Convert string to an Array

    That sounds quite reasonable because effectively you have an empty element at the start of your string. You could just trim off the leading ',' with something like: lv_str varchar2(50) := ltrim(p_in_string, ',');
  15. Dagon

    sql query - working days between two dates (including public holidays)

    How can U3L.DTK.DATE3 be a third table? Your other tablek is U3L.DTK.DATE2 and DATE2 is clearly the column name, so U3L must be schema and DTK must be the table name. One possibility would be to do something like this: create table end_dates (date2 date, id number); create table...
  16. Dagon

    Create Multiple table

    There is also the "Create Schema" command (which doesn't actually create a new schema, despite the name).
  17. Dagon

    using dynamic SQL and CURSUR effectively

    It's a bit difficult to answer when you have variables such as M_DATE and V_AS_OF_DATE which you never declare and are never set anywhere. Perhaps if you gave us code that actually worked rather than badly written fragments, we might be able to make progress better. But in general I don't see...
  18. Dagon

    Oracle procedure returning a table

    The problem is that you are trying to access id_table as if it were a table: WHERE c.parent_record_id IN (SELECT x.name_and_address_id FROM id_table x WHERE x.parent_record_id <>...
  19. Dagon

    Oracle procedure returning a table

    Example: select cast( multiset( select Your code: SELECT CAST(multiset (INSERT INTO id_table Can you spot the difference?
  20. Dagon

    Oracle procedure returning a table

    Also, I've never heard of anyone using UNIONS with INSERTS either.

Part and Inventory Search

Back
Top