Subject | different results |
---|---|
Author | Gediminas |
Post date | 2003-12-15T11:39:55Z |
to select records using SP, which code is:
CREATE PROCEDURE SP_SELECT_KOLEKTYVAI_SEARCH (
PAVADINIMAS_IN VARCHAR (50),MIESTAS_IN VARCHAR (24))
RETURNS (KOLEKTYVO_ID DECIMAL (15, 0),PAVADINIMAS VARCHAR (50),
MIESTAS VARCHAR (24),SALIS VARCHAR (24),VADOVO1_ID DECIMAL (15, 0),
VADOVO2_ID DECIMAL (15, 0),VADOVO3_ID DECIMAL (15, 0))
AS
BEGIN
for select *
from KOLEKTYVAI
where "Pavadinimas" starting with :Pavadinimas_in and "Miestas"
starting with :Miestas_in
into :Kolektyvo_ID , :Pavadinimas, :Miestas, :Salis, :Vadovo1_ID,
:Vadovo2_ID, :Vadovo3_ID
do
SUSPEND;
END
when executing it by the call select * from
sp_select_kolektyvai_search('',''), always got an empty dataset.
But if I execute such script:
select * from KOLEKTYVAI where "Pavadinimas" starting with '' and
"Miestas" starting with ''
got full dataset? why there is a difference in results?
Table KOLEKTYVAI is defined so:
CREATE TABLE KOLEKTYVAI (
"Kolektyvo_ID" PK_TYPE NOT NULL,
"Pavadinimas" CHAR50 COLLATE UNICODE_FSS,
"Miestas" CITY_TYPE COLLATE UNICODE_FSS,
"Salis" COUNTRY_TYPE NOT NULL COLLATE UNICODE_FSS,
"Vadovo1_ID" PK_TYPE_NULL,
"Vadovo2_ID" PK_TYPE_NULL,
"Vadovo3_ID" PK_TYPE_NULL);
CREATE DOMAIN CHAR50 AS
VARCHAR(50) CHARACTER SET UNICODE_FSS
DEFAULT ''
COLLATE UNICODE_FSS
CREATE DOMAIN CITY_TYPE AS
VARCHAR(24) CHARACTER SET UNICODE_FSS
DEFAULT ''
COLLATE UNICODE_FSS
It seems, that problem occures in "Pavadinimas" column as if I remove
"Pavadinimas" starting with part, dataset is retrieved okey. Using
unicode_fss in order to save national characters (and other language
characters in a future). Collate to table definition is added
automatically when use CHAR24 or CHAR50 domains
Using FB 1.5 RC7, ib manager 3.6.5.x
I would like to get any comments on this problem
Gediminas
Lithuania
CREATE PROCEDURE SP_SELECT_KOLEKTYVAI_SEARCH (
PAVADINIMAS_IN VARCHAR (50),MIESTAS_IN VARCHAR (24))
RETURNS (KOLEKTYVO_ID DECIMAL (15, 0),PAVADINIMAS VARCHAR (50),
MIESTAS VARCHAR (24),SALIS VARCHAR (24),VADOVO1_ID DECIMAL (15, 0),
VADOVO2_ID DECIMAL (15, 0),VADOVO3_ID DECIMAL (15, 0))
AS
BEGIN
for select *
from KOLEKTYVAI
where "Pavadinimas" starting with :Pavadinimas_in and "Miestas"
starting with :Miestas_in
into :Kolektyvo_ID , :Pavadinimas, :Miestas, :Salis, :Vadovo1_ID,
:Vadovo2_ID, :Vadovo3_ID
do
SUSPEND;
END
when executing it by the call select * from
sp_select_kolektyvai_search('',''), always got an empty dataset.
But if I execute such script:
select * from KOLEKTYVAI where "Pavadinimas" starting with '' and
"Miestas" starting with ''
got full dataset? why there is a difference in results?
Table KOLEKTYVAI is defined so:
CREATE TABLE KOLEKTYVAI (
"Kolektyvo_ID" PK_TYPE NOT NULL,
"Pavadinimas" CHAR50 COLLATE UNICODE_FSS,
"Miestas" CITY_TYPE COLLATE UNICODE_FSS,
"Salis" COUNTRY_TYPE NOT NULL COLLATE UNICODE_FSS,
"Vadovo1_ID" PK_TYPE_NULL,
"Vadovo2_ID" PK_TYPE_NULL,
"Vadovo3_ID" PK_TYPE_NULL);
CREATE DOMAIN CHAR50 AS
VARCHAR(50) CHARACTER SET UNICODE_FSS
DEFAULT ''
COLLATE UNICODE_FSS
CREATE DOMAIN CITY_TYPE AS
VARCHAR(24) CHARACTER SET UNICODE_FSS
DEFAULT ''
COLLATE UNICODE_FSS
It seems, that problem occures in "Pavadinimas" column as if I remove
"Pavadinimas" starting with part, dataset is retrieved okey. Using
unicode_fss in order to save national characters (and other language
characters in a future). Collate to table definition is added
automatically when use CHAR24 or CHAR50 domains
Using FB 1.5 RC7, ib manager 3.6.5.x
I would like to get any comments on this problem
Gediminas
Lithuania