내 장점 데이터베이스에이 비슷한을 가지고있다 -장점 데이터베이스, 대소 문자 구분 및 데이터 정렬
drop table #test;
create table #test (x cichar(50));
insert into #test (x) values ('cheese');
insert into #test (x) values ('fromage');
insert into #test (x) values ('Queso');
select
t1.x t1_x,
t2.x t2_x
from
#test t1
inner join
(
select
'CHEESE' x // String literal will be of type VARCHARFOX
from
system.iota
) t2
on t1.x=t2.x
이 나에게 메시지를 제공합니다 : -
poQuery: Error 7200: AQE Error: State = HY000; NativeError = 2213; [iAnywhere Solutions] [Advantage SQL Engine]Invalid comparison or operation on strings with different collations. ** Script error information: -- Location of error in the SQL statement is: 137 (line: 5 column: 1)
내가 좋아하는 것 : - 리터럴 'CHEESE'문자열 임시 테이블이다에서 VARCHARFOX과 열을 입력되기 때문에
t1_x t2_x
cheese CHEESE
이
은 대소 문자를 구분하지 않으려 고하기 때문에 cichar를 입력하십시오.비교에 'COLLATE ads_default_ci'를 추가하여이 인스턴스를 수정할 수 있지만 번거롭고 정확한 구문을 기억할 수 없습니다.
필자는 열 유형이나 데이터베이스 구성에 근본적으로 잘못된 것을 수행해야한다고 생각합니다.이 작업을 수행하는 데있어 우아하고 올바른 방법은 무엇입니까?
네, 그렇습니다. 파생 된 테이블이 있어야합니다. 나는 그것을 기술하기 위해 올바른 말씨를 찾고 있었다. 하지만 당신은 파생 된 테이블과 다른 무엇인가를 얻습니다. –