Reg truncating special characters in BEx Query
Hi
While I try to run a query ,for some Account nos I get
IBL/5556262
#/43434434
I want to remove IBL/ and #/ in my query and just display
5556262
43434434
How do I do it in my Query designer?Kindly need your inputs
Thanks
Bharathraj.N
Hi,
You are getting this because it has compounded characteristic.
Say char1 has char2 as compounding attribute.
Now when u drag char1 in query, char2 also gets dropped.
You can avoid this, if u want only specific value for char2 (say IBL).
Remove char2 from characteristics and place it in filter with value restricted to IBL.
Hope this is clear,
Shylaja.
Similar Messages
-
Problem about printing special character in bex query analyzer
Hi,
in bex query analyzer i have created one restricted key figure , in which i have substracted two date with the help of replacement path.
So i got result.
But i am facing one problem. when in both date, if one date is null or # then it is giving some big value like -734567.
But i want some special character like X instead of this big values.
So how can i do this?
With the help of if and else it can be done.
But how can we print special character in report.
Please help me
Thank you in advancehi,
You cannot show X in a formula result. You can highlight the row using exception.
Still if you want to show X in the result then you need to create a formula variable on a char which returns X value all the times.
Then you can use the three formula variable to write a formula so that it shows the difference:
date1 -- formula variable
date2 -- formula variable
charx -- formula variable.
the formula will be
Count(date1)Count(date2)(date1 - date2) + charx *(count (delta(date1) + delta(date2))).
this would return the X value if any of the dates are empty otherwise their difference.
regards.
Arvind. -
Special Characters in SELECT Query
What is the right way of using Special character '*' in SELECT Query.
Say..
SELECT PSPID FROM PROJ
INTO TABLE IT_P_PROJ
WHERE PSPID EQ P_PROJ
In this P_PROJ is SS*. No value is populating for this . Pls suggest where am I going wrong?hi
chk this out
Field descriptor
Variants:
1. f
2. dbtab~field
3. tabalias~field
Effect
Used in the SELECT, OPEN CURSOR, UPDATE and DELETE commands to uniquely identify columns (fields) of database tables and views specified in FROM clauses.
Variant 1
f
Effect
Identifies the field f of a database table or view specified in the FROM clause. The name f may only occur once in all database tables or views, that is, it must be unique. You use this variant particularly when there is only one table specified in the FROM clause. If the uniqueness of the field cannot be guaranteed, you must use variant 2 or 3.
Example
Output a list of all customers whose names begin with 'A':
DATA: WA_SCUSTOM TYPE SCUSTOM.
<b>SELECT * FROM SCUSTOM INTO WA_SCUSTOM WHERE NAME LIKE 'A%'.
WRITE: / WA_SCUSTOM-ID, WA_SCUSTOM-NAME.
ENDSELECT</b>.
Variant 2
dbtab~field
Effect
Identifies field f in the database table or view dbtab specified in the FROM clause. The combination dbtab~field must be unique. You can use this variant if table dbtab only appears once in the FROM clause. If this uniqueness cannot be assured, you must use variant 3.
Example
Output a list of all customers whose names begin with 'A':
DATA: WA_SCUSTOM TYPE SCUSTOM.
<b>SELECT * FROM SCUSTOM INTO WA_SCUSTOM
WHERE SCUSTOM~NAME LIKE 'A%'.
WRITE: / WA_SCUSTOM-ID, WA_SCUSTOM-NAME.
ENDSELECT.</b>
Variant 3,,tabalias~field
Effect
Identifies field f in the table or view with the alias name tabalias specified in the FROM clause.
Example
Output a list of all customers whose name begins with 'A':
DATA: WA_SCUSTOM TYPE SCUSTOM.
SELECT * FROM SCUSTOM AS T INTO WA_SCUSTOM WHERE T~NAME LIKE 'A%'.
WRITE: / WA_SCUSTOM-ID, WA_SCUSTOM-NAME.
ENDSELECT.
Additional help -
Prevent interpretation of special characters in enter-query mode
My problem goes as follows:
- forms version: Forms [32 Bit] Version 6.0.8.10.3 (Production)
- non-database item block.X, char
- block.X is filled in post-query trigger. The post-query logic cannot be integrated in a view because it uses procedures, and usage of a pipelined function + view is currently not allowed due to "internal restrictions". Put simply: all logic to fill the field must remain in the post-query trigger
- user wants the field to be queryable. This is achieved by storing the entered criterium in a variable in the pre-query trigger, and using it in the post-query trigger to exclude records. E.g.
pre-query ==> help_block.query_X := block.X;
post-query ==> if help_block.query_X is not null and block.X is null or not block.X like help_block.query then raise form_trigger_failure; end if;
- this works fine for "regular" search strings. However:
- whenever the search string starts with <, <=, >, >=, !, forms seems to interpret the leading characters before doing anything else. During pre-query, block.X is null, and as soon as I use it in pl/sql, I get FRM-40831: Truncation Occured: value too long for field. E.g.
user puts the following in block.X ==> '<X', so he wants to search for records with value '<X' (text; not 'smaller than ...')
pre-query => msg.show(block.X) ==> appears to be empty/null, but right after the message, I get FRM-40831 Truncation Occured: value too long for field ...
This only happens if < is the first non-space character in the search string.
Does anyone know of a way to prevent oracle from interpreting the <, <=, ... characters entered in enter-query mode?I'm sorry for not making myself clear; I'll give it another go:
The problem is that, if I enter '<abc' in a form field in enter-query mode (so during creation of the "example record"), forms immediately interprets the < as 'smaller than' and does some obscure things with it (my guess: converting to a where clause, but since I'm using a non db field, this actually does nothing), and finishes by erasing the field contents (in the example record). In the pre-query trigger, I can no longer get the '<abc' and store it. I want one of the following:
- prevent forms from interpreting the '<' in front (same thing happens for !=, <=, >=, =, ...)
or
- capture the entered string ('<abc') before forms reacts to the '<' in front
Edited by: [email protected] on Feb 17, 2009 12:30 PM -
How to check multiple special characters in this query.
When the master_title has no comma in it, I am getting an empty master_title. This is because INSTR(master_title,',',1,1) is returning 0.
In addition, I want to be able to specify other characters besides the comma. Example: ":" "/" "-".
Can we fit these options in the INSTR to look for them as well?
Query given below.
SELECT DISTINCT e.brm_id, SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) master_title
FROM e_m_view e
WHERE e.asset_dist LIKE'%WBPI Germany%'
OR e.asset_dist LIKE '%krupp%'
OR e.asset_dist IN (SELECT FN_SETRPTG(FN_GETPIREGN('%WBPI%')) FROM dual)
AND e.kl='Live' AND NVL(wbpi_publish_date,SYSDATE) <= SYSDATE
ORDER BY 2 ASC;
---------------------This?
SQL> with t as(
2 select 'abcd,efgh' name from dual union all
3 select 'abcd:efgh' from dual union all
4 select 'abcd/efgh' from dual union all
5 select 'abcd-efgh' from dual )
6 select regexp_substr(name,'[^,:/-]+') name
7 from t;
NAME
abcd
abcd
abcd
abcd -
How can we insert datas like c to the power of 6 or single apostrephe's that are used in names in Oracle.
SQL interprets two apostrophes as the apostrophe character rather than the end of a single, viz:
insert into some_table (name) values ('Maureen O''Hara');
c to the power of 6 is a bit more complex - maybe you could store that using Unicode, but it's not the sort of thing ordinary ASCII can handle. I don't think there's a NLS character set for mathematical notation.
Oracle isn't really interested in derivation i.e. it's really interested in the value 64 not the fact that this is 2 to the power of 6. If you really need to hold this stuff then you have a couple of alternatives. One is hold it in special columns (eg value number, value_power number) which isn't very flexible. The other way is to use BLOBs, especially XML, which is a means of combining flexibility with structure.
rgds, APC -
How to check multiple special characters in instr function sql query.
Hi,
The following special characters are comma(,), slash(/), colan(:)
these special characters i need to be check in instr function.
select SUBSTR(master_title,1,INSTR(master_title,',',1,1)-1) from dual;
Can you please write the query with right answer.
Thanks in advance,
Lakshman.Why multiple post?
How to check multiple special characters in this query. -
Display special characters in Workbook / BEx-Query
Hello,
Actually we have the problem to display special characters of the customer number-descriptions in workbooks / BEx-Queries. In the text-table of 0CUST_SALES (/BI0/TCUST_SALES) we can see the special characters in the descriptions for example for Polish names (here: OBI WROCŁAW). But in the reports the special character "Ł" is replaced by "#".
The InfoObjekt is marked as non-language dependent.
In the backend we are already working with BI 7.0. At the front-end-side we are still using the 3.x-toolkit.
Does anybody have an idea?
Kind regards
DanielI had this problem with Thai characters.
You need to have a Windows configured with polish chars to see them, I fear. -
How to find Special Characters in a single query
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIMHi,
947459 wrote:
Dear Experts,
Your usual help is required to solve the query.My query is "How to find all special characters like (%$*&@,;'/+- etc. in a single query?"
Thanks.
e.g.
A_MIR
A%SIM
A*SIM
A)SIMIt's not clear what you want.
What are "special characters"? Can you list all of them?
Do you want to find rows where string_column contains any of the special characters? If so
SELECT string_column
FROM table_x
WHERE string_column != NVL ( TRANSLATE ( string_column
, 'A(%$*&@,;'/+-'
, 'A'
, 'A'
;I assume 'A' is not a special character.
You could also use regular expressions, but it will be more efficient if you don't use them unless you really need to.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements), and the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say what version of Oracle you're using (e.g. 11.2.0.2.0).
See the forum FAQ {message:id=9360002}
You'll get better replies sooner if you always include this information whenever you have a question. -
Column name in a query contains special characters
Hi folks,
The column name in a query contains special characters. For example ~ or ^. The creator of the table put these column names under double quotation while creating the table. When I get the column names form the result set meta data object it returns without quotation. Is there any way to tell the jdbc driver so that it return those column names as it was created, I mean in double quotation.
The help is urgent. I will appreciate any suggestions. Thanks �.
[using oracle driver for 10g]
Thanks
AngelinaJust because the column names were in quotations when the database was created doesn't mean that the quotes are actually part of the names. What's inside the quotes is what makes the column name in the database. If I created a column as "abcd" and put it in quotes just like that ("abcd"), it would go in the database as abcd since SQL would strip off the quotes.
And there's your answer. Just put all column names in quotes whenever you need to talk to SQL. It will strip off the quotes and understand.
I think SQL will also accept square brackets ([ and ]). -
Oracle SQL query for getting specific special characters from a table
Hi all,
This is my table
Table Name- Table1
S.no Name
1 aaaaaaaa
2 a1234sgjghb
3 a@3$%jkhkjn
4 abcd-dfghjik
5 bbvxzckvbzxcv&^%#
6 ashgweqfg/gfjwgefj////
7 sdsaf$([]:'
8 <-fdsjgbdfsg
9 dfgfdgfd"uodf
10 aaaa bbbbz#$
11 cccc dddd-/mnm
The output has to be
S.no Name
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
It has to return "Name" column which is having special characters,whereas some special chars like -, / ," and space are acceptable.
The Oracle query has to print columns having special characters excluding -,/," and space
Can anyone help me to get a SQL query for the above.
Thanks in advance.You can achieve it in multiple ways. Here are few.
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where regexp_like(translate(name,'a-/" ','a'), '[^[:alnum:]]');
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> with t
2 as
3 (
4 select 1 id, 'aaaaaaaa' name from dual union all
5 select 2 id, 'a1234sgjghb' name from dual union all
6 select 3 id, 'a@3$%jkhkjn' name from dual union all
7 select 4 id, 'abcd-dfghjik' name from dual union all
8 select 5 id, 'bbvxzckvbzxcv&^%#' name from dual union all
9 select 6 id, 'ashgweqfg/gfjwgefj////' name from dual union all
10 select 7 id, 'sdsaf$([]:''' name from dual union all
11 select 8 id, '<-fdsjgbdfsg' name from dual union all
12 select 9 id, 'dfgfdgfd"uodf' name from dual union all
13 select 10 id, 'aaaa bbbbz#$' name from dual union all
14 select 11 id, 'cccc dddd-/mnm' name from dual
15 )
16 select *
17 from t
18 where translate
19 (
20 lower(translate(name,'a-/" ','a'))
21 , '.0123456789abcdefghijklmnopqrstuvwxyz'
22 , '.'
23 ) is not null;
ID NAME
3 a@3$%jkhkjn
5 bbvxzckvbzxcv&^%#
7 sdsaf$([]:'
8 <-fdsjgbdfsg
10 aaaa bbbbz#$
SQL> -
Query to Handle special characters in the conditions
Hi all,
We have a table for colour codes and there related information but the colour codes have special characters in them like
AL&.MPD
CH(SB00
ECA&BC1
TD..0023
0O'DON4
i need to check if these exist in the table or not but when i query like
select * from art.tb_color_code where color_code in ('AL&.MPD','CH(SB00','ECA&BC1','TD..0023','0O'DON4');
i get prompts for entering the variable values there are 2500 such codes
how do i negate the special meanings of these characters
Regards
MaverickHi,
If a string literal contains an apostrophe, use two consecutive apostrophes.
For example:
'0O''DON4'is a seven-character string. The third character is an apostrophe.
As others have said,
SET DEFINE OFFwill disable the special meaning of & in SQL*Plus. -
Dynamic SQL Query to Find Special Characters in Table columns
Hi,
I am new to OTN FORUMS.
I am trying to find the columnsi of a table which have special characters in them.
I am planning on using this query
select ' select INSTR('||column_name||', chr(0))
from '||table_name||'where INSTR('||column_name||', chr(0)) >0' from user_tab_columns
where table_name='Account'
and spool the output to run as a script.
Is this the right way or do u suggest any modifications to the query?
Thanks in advance.Hi,
I think your basic approach is right. Since you can't hard-code the table- or column names into the query, you'll need dynamic SQL.
Instead SQL-from-SQL (that is, writing a pure SQL query, whose output is SQL code), you could do the whole job in PL/SQL, but I don't see any huge advantage either way.
When you say "Special character<b>s</b>", do you really mean "one given special character" (in this case, CHR(0))?
Will you ever want to search for multiple special characters at once?
What if table foo has a column bar, and in 1000 rows of foo, bar contains CHR (0). Do you want 1000 rows of output, each showing the exact position of the first CHR(0)? If the purpose is to look at theese rows later, shouldn't you include the primary key in the output? What if CHR(0) occurs 2 or more times in the same string?
If you'd rather have one row of output, that simply says that the column foo.bar sometimes contains a CHR(0), then you could do something like this:
SELECT 'foo', 'bar'
FROM dual
WHERE EXISTS (
SELECT NULL
FROM foo
WHERE INSTR ( bar
, CHR (0)
) > 0
); -
Find out the sql query for special characters.
Hi,
I have the emp table with column name first_name.In that table i have lot records with first_name inlcudes the below mentioned special characters.
¡ , ¿, ,Ä,Å,ä,ª,À,Á,Ã,à,á,ã,å,Æ,æ,Ç,ç,È,É,Ê,Ë,è,é,ê,ë,Ì,Í,Î, Ï,ì,í,î,ï, Ñ,ñ, ô, º, Ò, Ó, Ô, Õ, Ö, Ø, ò, ó, õ, ö, ø, ß, Û, Ù, Ú, Ü,ù, ú, û, ü, ÿ,
I am looking for the records with includes the above mentioned special characters in the first_name column.
Can u please give the sql query to find out the records.
Thanks&Regards
N.SivaramanI am looking for the records with includes the above mentioned special characters in the first_name column.One way would be:
select emp.*
from emp,
table (
sys.odcivarchar2list ('¡',
'Ä',
'Å',
'ä',
'ª',
'À',
'Á',
'Ã',
'à',
'á',
'ã',
'å',
'Æ',
'æ',
'Ç',
'ç',
'È',
'É',
'Ê',
'Ë',
'è',
'é',
'ê',
'ë',
'Ì',
'Í',
'Î',
'Ï',
'ì',
'í',
'î',
'ï',
'Ñ',
'ñ',
'ô',
'º',
'Ò',
'Ó',
'Ô',
'Õ',
'Ö',
'Ø',
'ò',
'ó',
'õ',
'ö',
'ø',
'ß',
'Û',
'Ù',
'Ú',
'Ü',
'ù',
'ú',
'û',
'ü',
'ÿ'
where instr (ename, column_value) > 0 -
I am having a problem returning results that include special characters. I have a list of individuals and want to allow an alpha select to display, for example, only the individuals who's last name starts with C.
I have an individual in this list who's last name is Čapek
When I do a mySQL query in mySQL Query Browser as follows, this individual is returned in results.
SELECT distinct
last_name
FROM
individuals
WHERE
last_name like 'C%'
HOWEVER, when I use the same query in a cfquery, this individual's record is not returned.
I am using mySQL 5 with ColdFusion 9 and have the mySQL connection string settings: useUnicode=true&characterEncoding=UTF-8
Any assistance would be appreciated - I've not found anything useful in my Google searches.
Many Thanks!I've not personally come across this issue before, but googling for "mysql where diacritic" (and various permutations thereof) came up with this doc, which seems to discuss your issue: http://bugs.mysql.com/bug.php?id=37413
So it could be that the JDBC driver is using a different collation than your other MySQL client (wild guess)?
Try messing around with the collation being used, and see if that helps at all? The JDBC param to set seems to to connectionCollation be (from http://dev.mysql.com/doc/refman/5.0/en/connector-j-reference-configuration-properties.html ).
Sorry if this sounds vague or is completely wrong - it's a bit of a guess - but it does sound reasonably likely to be something to do with your issue, given your description.
Adam
Maybe you are looking for
-
Hi, I am using an OO ALV, and have some fields editable. I have a field in which the user can enter upto 250 characters, but I need to display only 50 characters on the output. If i mention outputlen = 250 in my fieldcatalog, the column is displayed
-
Steps involved in Query execution
Can anyone please suggest the exact steps that take place in a query execution. I know on the broad level. But I want to know to basic level. For example we would like to know all the steps that an OLAP processor does to get the data, process it and
-
AIA FP 11.1.1.3 - Deployment Plan Generation for migrating from Dev to Test
Hi All, Can you please validate the following from a Deployment from Dev to Test perspective. We have almost completed the development for an interface using AIA 11g, and are in the process of moving the interface from one instnace to another, and an
-
Right now, it seems as if it is still showing in System Profiler, then the unnecessary BlackBerry software I downloaded from the internet is still using memory, right? How do I permanently delete it?
-
Hi.I'm using toplink with JSF in Jdeveloper.I want to retrieve data by which uses joins between various tables and and then display it in a datatable.how can I do this??Also,I want scrolls in the datatable with one column fixed and the rest of the co