Length / word search
hi,
i have the ff values:
ABC INC
XYZ CORPORATION
AAA INCORPORATED
ZZZ CORP
the names should be standard ie INC = INCORPORATED, CORP = CORPORATION. this should be resolved by replace(name,'INC','INCORPORATED','CORP','CORPORATION',etc). however, the CORP in INCORPORATED is again replaced by CORPORATION making the word 'INCORPORATIONORATED'.
what is the right code for this? the replace CORP should ignore the name if it already contains INCORPORATED.
pls help. thanks!
syd
Hello Syd,
The following sample code might do the trick:
SQL> CREATE TABLE sample
2 (
3 CH1 VARCHAR2(100 CHAR),
4 CH2 VARCHAR2(100 CHAR)
5 )
6 ;
Table created.
SQL> INSERT INTO sample VALUES ('ABC','INC');
1 row created.
SQL> INSERT INTO sample VALUES ('XYZ','CORPORATION');
1 row created.
SQL> INSERT INTO sample VALUES ('AAA','INCORPORATED');
1 row created.
SQL> INSERT INTO sample VALUES ('ZZZ','CORP');
1 row created.
SQL> COMMIT;
Commit complete.
SQL> UPDATE sample SET CH2='CORPORATION' WHERE CH2 != 'CORPORATION' AND CH2 LIKE '%CORP%' AND CH2 NOT LIKE '%INC%';
1 row updated.
SQL> UPDATE SAMPLE SET CH2='INCORPORATED' WHERE CH2 != 'INCORPORATED' AND CH2 LIKE '%INC%';
1 row updated.
SQL> SELECT * FROM sample;
CH1
CH2
ABC
INCORPORATED
XYZ
CORPORATION
AAA
INCORPORATED
ZZZ
CORPORATION
SQL> COMMIT;
Commit complete.Regards,
Yoann.
Similar Messages
-
CRM - transaction BP - length of search term 1/2 (adress)
Hey,
I'm working on CRM, transaction BP. I've 2 roles for customer : person and organisation.
Search term 1/2 is 20 caracters long.
But, it seems to be possible to do customizing on search term. For example, in my environnemnent, customer person may have 20 caracters long search term ; but customer organisation must have less than 10 caracters (there is an error message if I put a more than 10 caracters search term).
Could you tell me how in customizing I can control length of search term ?
Thanks
BaptisteHi,
I dont think there is any customizing for this change in length. You can instead to achcek of length in dchck event of BDT.
Smita. -
10G-form: How to do MULTIPLE WORD OR SINGLE WORD SEARCH at ITEM?
I am using 10G DB + 10G Form Builder.
I've 'database_item' where I am storing multiline text data.
I want to do MULTIPLE WORD OR SINGLE WORD SEARCH at this item through FORM.
I've tried by creating the following NON Database Items on the form:
- multiline_search_text_item, and
- multiline_result__text_item
And then writing execute_query in KEY-NEXT-ITEM trigger.
I've also tried using this in the POST-TEXT-ITEM at multiline_search_text_item:
select table.database_item into :multiline_result__text_item from table where multiline_search_text_item = :multiline_search_text_item;
Pl help me asap.
GauravWhat you want to do is not clear.
The query you wrote will select records where the table contains exactly what has been written in the search item. You can use LIKE and a wildcard search to find records which contain the search text:
select table.database_item into :multiline_result__text_item
from table
where multiline_search_text_item LIKE '%'||:multiline_search_text_item||'%';
You can use UPPER to make this case insensitive:
select table.database_item into :multiline_result__text_item
from table
where Upper(multiline_search_text_item) LIKE Upper('%'||:multiline_search_text_item||'%');
But I suspect you want either to match the individual words in the search text to individual words in the database multiline field, or find records where the search words appear (not necessarily as whole words). In that case, check out the following:
-- set up a table (multiline and various whitespaces)
DROP TABLE t;
CREATE TABLE t AS
SELECT
ROWNUM rn,
owner||Chr(9)||object_name||Chr(160)||subobject_name||' '||object_id||' '||
data_object_id||Chr(10)||object_type||' '||created||' '||last_ddl_time||' '||
timestamp||' '||status||' '||temporary||' '||generated||' '||secondary AS col
FROM all_objects;
-- check the format of the multiline text item (col)
SELECT * FROM t WHERE ROWNUM < 4;
-- a type for the function below
CREATE TYPE string_tab AS TABLE OF VARCHAR2(255);
-- this function takes a string and cuts out each word, idetifying words
-- as being separated by any whitespace. it returns a collection
CREATE OR REPLACE FUNCTION string_to_tab(
p_string IN VARCHAR2) RETURN string_tab IS
l_string LONG DEFAULT
RTrim(regexp_replace(p_string,'[[:space:]]+',' ')) || ' ';
l_data string_tab := string_tab();
n NUMBER;
BEGIN
LOOP
EXIT WHEN l_string IS NULL;
n := InStr(l_string, ' ');
l_data.extend;
l_data(l_data.Count) := LTrim(RTrim(SubStr(l_string, 1, n - 1)));
l_string := SubStr(l_string, n + 1);
END LOOP;
RETURN l_data;
END string_to_tab;
-- selecting from t where ANY of the words in the search text has
-- a match in the multiline field (as a word or part of a word), so SYS
-- matches to MDSYS and SYSTEM
SELECT DISTINCT
t.rn, t.col
FROM
t,
(SELECT column_value
FROM TABLE(CAST(string_to_tab('SYS INDEX') AS string_tab))) x
WHERE InStr(t.col,x.column_value) > 0;
-- selecting from t where ALL of the words in the search text has
-- a match in the multiline field (as a word or part of a word), so SYS
-- matches to MDSYS and SYSTEM
SELECT rn, col FROM(
SELECT
t.rn, t.col, cnt_x, Count(*) cnt
FROM
t,
(SELECT column_value , Count(1) over(PARTITION BY 1)cnt_x
FROM TABLE(CAST(string_to_tab('SYS INDEX') AS string_tab))) x
WHERE InStr(t.col,x.column_value) > 0
GROUP BY t.rn, t.col, cnt_x
WHERE cnt = cnt_x;
-- selecting from t where ANY of the words in the search text
-- match a word in the multiline field, so SYS matches only to SYS
SELECT DISTINCT
t.rn, t.col
FROM
t,
(TABLE(CAST(string_to_tab(t.col) AS string_tab))) t2,
(SELECT column_value
FROM TABLE(CAST(string_to_tab('SYS INDEX') AS string_tab))) x
WHERE t2.column_value = x.column_value;
-- selecting from t where ALL of the words in the search text
-- match a word in the multiline field, so SYS matches only to SYS
SELECT rn, col FROM(
SELECT
t.rn, t.col, cnt_x, Count(*) cnt
FROM
t,
(TABLE(CAST(string_to_tab(t.col) AS string_tab))) t2,
(SELECT column_value , Count(1) over(PARTITION BY 1)cnt_x
FROM TABLE(CAST(string_to_tab('SYS INDEX') AS string_tab))) x
WHERE t2.column_value = x.column_value
GROUP BY t.rn, t.col, cnt_x
WHERE cnt = cnt_x;For your application you would replace 'SYS INDEX' with a variable (the search field). You can use upper() and wildcards for case insensitive & 'fuzzy' searches. You might need to modify the function so it removes other delimiters such as commas and colons. -
How do you perform partial word search using PDF Open Parameters?
Hello,
We are using the 'search=' open parameter in the URL string, which open a PDF and automatically searches for a word within the PDF. It works great for whole word searches. Unfortunately, it does not work for partial word, or phrases. In other words, if I'm searching on '123456' and there is a word in the document that is '1234567', it will not find the partial word, or first 6 characters of the 7 character word. You can perform a partial or phrased search using the advance search feature of Adobe Reader. So, currently after the PDF opens, and shows no hits on the automatic search for '123456', we are able to manually search again for a partial word search, and then see matches in the document. Is there any way to specify to use a whole or partial word search when using the 'search=' open parameter, so that we can automatically match on partial and whole words? Something like 'search=123456*'?It never worked that way. Command-F shows the page search bar.
-
How can I make a word search game in actionscript 3.0
How do you make a 9x9 square grid word search on flash actionscript 3.0
I used a great book on this subject.
Gary Rosenzweig: Game Programming University. -
Sometimes, when I click a link on a web page, I see in the address bar the words: "Search bookmarks and history" (greyed out) just before I am taken to the link I clicked. A moment later, when I'm at the link, its address appears in the address bar, and all is normal. It seems that this happens only from some particular sites. Is FireFox reporting that my bookmarks and history are being searched?
Should I be worried? Is someone searching my personal data? Is this just a FireFox error msg when it has trouble finding the website I requested?That is OK. Firefox will only display the link in the location bar after the DNS look up has succeeded and a connection to the server has been established. Until that has been done you see the default setting for the location bar: Tools > Options > Privacy > Location Bar: When using the location bar, suggest
-
WHy cant i get phone service? The word " searching " has been in the upper left hand corner for 3 days. I have internet service but no phone service. Does any one have any thoughts or suggestions?
When you say you have Internet service, are you connected to wifi? Have you tried a reset on the phone? Hold the sleep/wake and home buttons together until you see the Apple logo, then release. The phone will reboot. After it starts, see what happens. Do you have a valid SIM in the phone, one that is activated through a carrier? Have you contacted the carrier to see what they say, since phone service is a carrier responsibility?
-
Hi guys,
This one's quite advanced...
I'm working on a online book project that takes a .pdf,
converts each page into a JPEG and stores them to a unique folder.
I have created a flash file that the user is directed to upon the
.pdf's upload which detects via a querystring, the folder location,
and total number of pages. This, as you have probibly guessed, is
the online book, which has all the bells and whistles of page turn
animations, a goto page function etc...
My problem is this:
I need the application to have a word search function. I know
that ideally the .pdf would have been converted to text, but I
couldn't as the layout of test to images was nowhere near perfect
on the tests I ran.
Is there any OCR styled approach that I could use in flash? I
have created JAVA applets which have performed this task before,
but never within a .swf.
An option is to install an OCR program on the server which
will run dynamically after the .pdfs upload, and store the text
into a database, however, at best (I assume), this will only allow
the user to be taken to the page, and not the line, let alone
creating a transulcent highlight, for example, over the top of the
text.
I don't expect an answer, but any feedback would be geatly
appreciated.
Thanks in advance,
Peter McConnell
EG-Consulting.com
[email protected]I don't know the answer for OCR. I would be inclined to try
investigagate ways to avoid it that would involve loading the the
content into a swf format...e.g. like flashpaper... or search for
some other way to convert the pdf to swf whilst retaining the
formatting/appearance.
The flashpaper API has for example text searching capability
built in - I'm just not sure how much of the interface you can hide
(or may not be permitted to via the licencing agreement). And if
necessary then its also possible to use bitmapData copies of a swf
format if you need to manipulate it as an image once the swf has
loaded.
Of course if the original source is bitmap you would still
need to adress the OCR problem. Don't know if that helps. -
I'm running RH for HTML Help X4.1 on Windows XP. I want to
search through all the text in all of the topics for a particular
word or word string. Is that possible? I can't find anything that
lets me do that? I realize this is NOT Win Help where I'd be
searching a Word document, but it would be very helpful to be able
to do a whole-word search of the project. Thanks.
-davidJust a word of warning. It is good practice to close your RH
project down as the in built tool does occasionally fail to spot
instances in open topics/projects. Personally most authors on here
prefer to use other tools (e.g.
FAR or
BkReplacem). -
CF perform word search on PDF files?
Can CF MX (6.1 or 7) perform a word search of PDF documents?
What I would like to do, at the minimum, is have CF search
PDF files located in a directory for a specific word, and return a
list of files that have that word (or phrase) in them.
am I asking too much?
Thanks for any and all help.
RussYes. Use the Verity search engine that comes with
ColdFusion. -
READER IX opening equipment PDF to perform an internal Word SEARCH. How is this done?
Using Reader IX to open a Service Manual and then a Word SEARCH. How is this done?
thanks....
In a message dated 8/17/2014 9:00:29 P.M. Pacific Daylight Time,
[email protected] writes:
READER IX opening equipment PDF to perform an internal Word SEARCH. How is
this done?
created by ashutoshmehra (https://forums.adobe.com/people/ashutoshmehra)
in Adobe Reader - View the full discussion
(https://forums.adobe.com/message/6649441#6649441) -
Hi all wonder if you can help me. I'm trying to write a little word search style game in java swing. However i'm a little confused as how to start. I want to be able to draw a grid with letters manually placed in it, so something like this:-
a b c a b c d e f
h e l l o w o r l d
a b c a b c d e f
a b c a b c d e f
I want each grid square to have a specific x and y co-ordinate so say h in the grid above would be at co-ordinate [1,1] and e would be [1,2], etc.
If someone could give me a bit of advice on how to get started on this, i would be most grateful!
Regards
VinceUse a JPanel with a GridLayout and add JLabels to each grid.
-
Topic Not Showing in Word Search
Hi there,
I have an important Topic that I need to show in my word
search results, but it does not. As well, the Topic does not come
up when I click on it in the Index.
I have verified that the Key word is in the title of the
Topic I wat to show up. Any ideas what is causing this or how it
can be fixed?Welcome to the forum.
Can you access the topic in any way? I am wondering if you
have excluded it with a build tag. -
I can delete my Internet history but I can't delete my words searched in different web sites. Would you like to help me?
Hi Niel,
There may be a problem with the definition of the rule to delete the characteristic. If you go to transaction RSMRT
and use the 'check' option to check the rule you created are there any errors for the check?
If not when you get the error message that you mention is there any additional error messages created in sm21
or dumps in ST22?
If not there may be a problem with the consistency of the cube if you goto RSRV>All Elementary tests>Transaction data
and run these tests for the cubes are there any error messages? If yes please try to use the repair function in RSRV
to correct any errors.
If none of the above helps you should delete the run you created, make a dummy change to the cube (e.g add a '.'
to the description of the cube, save the change and then activate the cube, please then try and create the
remodelling rule again.
Best Regards,
Des. -
Covering text on Word Search widget
Hi,
I am using the word search widget and ther is some faint text on the bottom that saus "click the first then the last letter of the work to ma e a selection"
I am trying to get wrid of that so I can put the instruction text elsewhere on the slide, but the words stay visible, even over some buttons we have got in the fram. Sending to bck doesnt work either. I have also tried covering the text with an image (of background), thenm grouping the widget with the image on front, but then that covers the buttons, even if I use send backwards...
Is ther a way if editing that instruction text so I can get rid of it?
Cheers
RosscoHi Rossco
I saw your replies only now as I am in India. Glad that you figured out a way.
To answer your question on how to assign an image to smartshape, you can go to Fill and Stroke accordion and click the Fill dropdown list. Here you have an option to browse and select a custom image.
Sreekanth
Maybe you are looking for
-
Accessibility options not working in Captivate 7
I need help. I can't get my project to in captivate 7 to be accessible. I've tried testing on JAWs and for some odd reason it seems like the enable accessbility is not working cause everything is messed up when I test on JAWs. Is their anybody that w
-
At the very bottom of most pages, I get these thin, annoying banners all the time. They relate to so many different things it is difficult to list them all. From Facebook page info to adverts. They do have a very small x at the end (be careful which
-
Changing values in a properties file
Hi, I'm working in a Struts environment and I am trying to open a .properties file in my WEB-INF/classes/ (*.properties) directory and allow the user to change those values and write them back. I access the properties by pulling them out in a Map: Lo
-
Problem with navigation of the differents views
Hello, My English is bad, sorry. The various web screens have in common that they have a menu on the left to navigate between different screens. I show you a picture: http://www.uploadfilesystem.com//viewimage.php?file=/imagenes/10/12/02/B4Z87346.jpg
-
Call Transaction - Update Local
Hi, I am using call transaction with Update mode "A". when i use this my work is being commited immediately. i want to know which UPDATE MODE i have to use .to commit my work later. and what should i write to commit at that point.(is COMMIT WOR