Results 1 to 2 of 2
  1. #1
    Join Date
    May 2006
    Location
    Leipzig/Germany
    Posts
    1

    Question Unanswered: trouble getting my sp done

    hello

    i'm having touble getting my sp done. the problem is as follow..i've found an sp tokenize (which works fine) with the following signature:

    CREATE PROCEDURE TOKENIZE (
    S VARCHAR(10000),
    DELIM CHAR(1))
    RETURNS (
    ID INTEGER,
    TKN VARCHAR(10000))
    AS
    DECLARE VARIABLE I INTEGER;
    DECLARE VARIABLE LEN INTEGER;
    DECLARE VARIABLE FIRSTCHAR CHAR(1);
    DECLARE VARIABLE S2 VARCHAR(10000);
    begin
    ...
    SUSPEND;
    end^

    then i build myself another sp (which also works fine) with this signature:

    CREATE PROCEDURE GET_DICENTRIES_BY_ASDSKRPT (
    ASDSKRPTINPUT VARCHAR(15))
    RETURNS (
    ID BIGINT)
    AS
    begin
    ...
    suspend;

    end^

    now, what i'm trying to do is write another sp (get_dicentries_by_all_asdskrpts) that accepts a '.'-tokenized string as a parameter (e.g. 'bla.bli.blo.blu'; number of tokens NOT fixed at 4!) and returns the intersection of

    GET_DICENTRIES_BY_ASDSKRPT('bla'), GET_DICENTRIES_BY_ASDSKRPT('bli'), GET_DICENTRIES_BY_ASDSKRPT('blo') AND GET_DICENTRIES_BY_ASDSKRPT('blu')

    does any of you have an idea how to go about?

    thanx,

    martin

  2. #2
    Join Date
    Nov 2004
    Location
    on the wrong server
    Posts
    8,835
    Provided Answers: 6
    the blind man has a function called CSVtoINT. if you ask him nice, he might post it. I would, but I do not not want to agravate him.
    “If one brings so much courage to this world the world has to kill them or break them, so of course it kills them. The world breaks every one and afterward many are strong at the broken places. But those that will not break it kills. It kills the very good and the very gentle and the very brave impartially. If you are none of these you can be sure it will kill you too but there will be no special hurry.” Earnest Hemingway, A Farewell To Arms.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •