1 Reply Latest reply: Mar 21, 2012 7:53 PM by Greg Block RSS

    Create a queue table ... need some guidance

    user8604530
      Hi,

      Looking for some help/assistance in creating a queue table:

      create an AQ table V_sales_ACCOUNT_AQ with following attributes:

      sales_ref (String/varchar2)
      sales_status (String/varchar2)
      event_id (long/NUMBER)
      event_date (DATE)
      sequence_id (long/NUMBER)

      this is first time, working with queue, any assistance/guidance will be appreciated.

      Best regards
        • 1. Re: Create a queue table ... need some guidance
          Greg Block
          Hi user8604530


          You could try this:

          Create an oracle object with your data ie:
          CREATE TYPE AQ_MESSAGE_TYP AS OBJECT ( 
               sales_ref                    VARCHAR2(30),
               sales_status               VARCHAR2(30),
               event_id                    NUMBER,
               event_date               DATE,
               sequence_id               NUMBER
          );
          Then create your table:
          DECLARE
                    queue_payload_type     VARCHAR2(60);
          BEGIN
                    queue_payload_type := 'AQ_MESSAGE_TYP';
               
                    DBMS_AQADM.CREATE_QUEUE_TABLE( 
                         queue_table => 'queue_table_name',
                         queue_payload_type => queue_payload_type);
          I think that would work.