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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

trouble getting my sp done

Status
Not open for further replies.

sancho1980

Technical User
Nov 25, 2005
15
DE
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
 
you will have better luck getting an answer in the Microsoft SQL Server forum, this is ANSI SQL

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top