on 08-12-2015 1:31 PM
Hello SCN,
I have create a table as mentioned below with VARCHAR columns:
create column table fuzzytest ( a int,b varchar(10),c varchar(10))
insert into fuzzytest values ( 1,'ABCD','CD')
insert into fuzzytest values ( 2,'ABCD','AB')
insert into fuzzytest values ( 3,'ABCD','BC')
insert into fuzzytest values ( 4,'ABCD','AD')
We can fire queries like below to search for a specific value , example : 'CD'
But can we compare 2 columns? I wanted to display the records when Column C is a substring of Column B , example as shown below:
1,ABCD,CD
2,ABCD,AB,
3,ABCD,BC
Request your help to let me know If I am missing something here? or is this is jst not supported?
Hi Krishna,
This seems to be not supported, tested on SP10 and received error below:
Could not execute 'select t.*,score() from fuzzytest t where ...' in 458 ms 776 µs .
SAP DBTech JDBC: [8] (at 55): invalid argument: The second argument cannot include any column: line 3 col 20 (at pos 55)
Anyhow, it also doesn't make sense as the score will be totally corrupted as the key factor is changing row by row.
If your quest is find it substring maybe this is enough:
where t.b like '%' ||t.c || '%'
Regards, Fernando Da Rós
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
User | Count |
---|---|
94 | |
11 | |
10 | |
9 | |
9 | |
7 | |
6 | |
5 | |
4 | |
4 |
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.