Skip to Content
author's profile photo
Former Member

Creating Number generators

Hi,

In maxdb you can create Number generator by specifying

CREATE TABLE mytab (seqcol SERIAL PRIMARY KEY, other_col CHAR (20))

so the seqcol generates sequential numbers.

In Web AS netweaver you need to create a datadictionary to specify the create table sql.

How do you specify the default generation of number generators?

thanks

Padmaja

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

1 Answer

  • author's profile photo
    Former Member
    Mar 09, 2004 at 04:02 PM

    Hi Padmaja,

    When creating tables in Java Dictionary, you can only use data types supported by Open SQL. Since the SERIAL type is not supported, I don't think you can use this function with the Java Dictionary. However,if you need to use it, you could try to register a datasource with Native or Vendor SQL support and then create the table without using Java Dictionary and Open SQL. You can get more information about Open, Native and Vendor SQL in SAP NetWeaver Developer Studio help -> SAP Web AS for J2EE Applications -> Development Manual -> Developing Business Logic -> Java Persistence.

    I hope this helps.

    Zornitsa

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member

      Thanks a lot for the info.

      I had read about the native sql and vendor sql and the api's but wanted to see if open sql will be able to create the default type.

      Also I read that CMP can create automatic primary keys and the container generates them.

      But we are using BMP so cannot use that either.

      thanks a lot

      Padmaja