Db2

Db2

Where DBAs and data experts come together to stop operating and start innovating. Connect, share, and shape the AI era with us.


#Data


#Data
#Databases
#Operatingsystems
#Db2
#Databasesolutions
 View Only

Example Queries for CREATE_VECTOR_SAMPLE() Tables

  • 1.  Example Queries for CREATE_VECTOR_SAMPLE() Tables

    Posted 13 days ago

    Hello community,
    After binding `db2sampl_VECTOR.bnd`, you can use the Db2 stored procedure `CALL SYSPROC.CREATE_VECTOR_SAMPLE('SAMPLE_VECTOR')` in Db2 v12.1.5 to generate sample data.

    Are there any examples available here showing how to query these tables? I would like to incorporate the new vector technology into my training materials and make use of existing queries if possible. If not, perhaps we could compile some examples together?

    CREATE TABLE SAMPLE_VECTOR.MLBLOGS_ANSWERS (
      ANSWER  VARCHAR(1024)
      ) 
      IN IBMDB2SAMPLEVECTOR
      COMPRESS YES STATIC
      ORGANIZE BY ROW;

    CREATE TABLE SAMPLE_VECTOR.MLBLOGS_QUESTIONS (
      QUESTION  VARCHAR(1024)
      ) 
      IN IBMDB2SAMPLEVECTOR
      COMPRESS YES STATIC
      ORGANIZE BY ROW;

    CREATE TABLE SAMPLE_VECTOR.PATIENTS (
      PATIENT_ID  INTEGER,
      NAME  VARCHAR(30),
      AGE  INTEGER,
      GENDER  VARCHAR(6),
      CHOLESTEROL_LEVEL  INTEGER,
      BLOOD_PRESSURE  INTEGER,
      SMOKING_STATUS  VARCHAR(10)
      ) 
      IN IBMDB2SAMPLEVECTOR
      COMPRESS YES STATIC
      ORGANIZE BY ROW;

    Best Regards, Michael



    ------------------------------
    Michael Kühnel
    ------------------------------