SQL & PL/SQL :: How To Do Spell Check Of A Column
Nov 3, 2010
how to run a spell check on a column (contains desriptions) of a table and find out if any spelling mistakes are there in the text of that column. I want to run this in pl/sql.
View 8 Replies
ADVERTISEMENT
Mar 14, 2002
I found a message which explain how to spell out numbers to words. I'm french and the purpose of my question is how to convert numbers to word (to print cheque) but in french the function found in the newsgroup was :
select decode( sign( &num ), -1, 'Negative ', 0, 'Zero', NULL ) ||
decode( sign( abs(&num) ), +1, to_char( to_date( abs(&num),'J'),'Jsp') )
from dual
/
I'm afraid but i don't undaunted how pass my number to this function (&num ???)
View 12 Replies
View Related
Nov 22, 2012
My forms & database version is
Forms [32 Bit] Version 10.1.2.3.0 (Production)
Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bit
I need a PJC for Spell Checking.
I tried to download it from
[URL]......
but the link is not working.
View 1 Replies
View Related
May 18, 2011
I have two fields in my form . In one field I am entering certain amount. I want the conversion of that amount to char in next field for e.g 1000 one thousand.
View 11 Replies
View Related
Sep 16, 2011
I have a table as follows
create table teststr (indname varchar2(20),
counter1 number,counter2 number,counter3 number,counter4 number);
insert into teststr values('a',10,20,30,30);
insert into teststr values('b',10,20,5,3);
insert into teststr values('c',2,4,5,2);
insert into teststr values('d',1,2,3,4);
insert into teststr values('e',4,5,4,4);
Now i need the output if any of the column values are same.
output should be
select indname from teststr where counter1=counter2
or counter1=counter3 or counter1=counter4
or counter2=counter3 or counter2=counter4
or counter3=counter4
a
c
e
Is ther any other way to write the query instead of the numerous or conditions if i want to compare the column values in a table.
View 6 Replies
View Related
May 16, 2011
I have a column defined as Number( 8 ) which is supposed to have date values. I would like to check if all the rows in that table have valid dates. We could use to_date(coulmn_name, 'YYYYMMDD') and catch the rownums for error conditions using pl/sql. I would like to know if we could just do it using sql only and return the row numbers for those that are invalid dates?
View 5 Replies
View Related
Dec 13, 2010
In the below code, do I need the 'NOT NULL' after the 'state char(2)'? I am guessing that I do not need it since I have the CHECK constraint on the column.
CREATE TABLE employee(
id PRIMARY KEY,
first varchar(20) NOT NULL,
middle varchar(20),
[code]....
View 10 Replies
View Related
May 13, 2013
I'm going to do some testing, and for that I require to retrieve some data based on a single column e.g test_data_col, which -
1. Has 3 or more count(test_data_col) for a given set of group by columns e.g grp_col1, grp_col2, grp_col3
2. Within the set of rows retrieved, that particular column holds some duplicate values. I don't need the duplicates displayed, just know if duplicates exist or not.
This might explain what I'm trying to do -
grp_col1, grp_col2, grp_col3, test_data_col
1, A, xyz, HELLO
1, A, xyz, HELLO
1, A, xyz, BYE
1, A, xyz, GOODBYE
2, C, pqr, WELCOME
2, C, pqr, GOOD MORNING
2, C, pqr, BAD MORNING
So for condition 1, I do something like this -
SELECT COUNT(test_data_col) cnt, grp_col_1, grp_col2, grp_col3
FROM test_tab
GROUP BY grp_col_1, grp_col2, grp_col3
HAVING COUNT(test_data_col) >= 3;
In this same query, I want to do something that will tell me if the aggregate COUNT(test_data_col) has any duplicate values within it. Again, displaying the duplicates is not important here.
SELECT COUNT(test_data_col) cnt, grp_col_1, grp_col2, grp_col3,
/*some logic*/ dup_val
FROM test_tab
GROUP BY grp_col_1, grp_col2, grp_col3
HAVING COUNT(test_data_col) >= 3;With the proper coding to replace /*some logic*/, I get following values -
cnt, grp_col_1, grp_col2, grp_col3, dup_val
4, 1, A, xyz, Y
3, 2, C, pqr, N
I just gave dup_val column to explain what I'm trying to achieve.. any other way to know the existence of duplicates in the count aggregate will be fine.My Oracle version is Oracle Database 11g Enterprise Edition Release 11.1.0.7.0
View 2 Replies
View Related
Apr 29, 2010
i want to produce a function who return XmlType element if she checks that a parameter (that i passed to here is contained in a row in a defined table)
for example
create table sec_form(
form_code VARCHAR2(8)
, sec_code VARCHAR2(5)
) ;
insert into sec_form values ('CSA','section1');
insert into sec_form values ('CSA','section2');
insert into sec_form values ('CSA','section3');
then i got my function
create or replace function checkIfSectionEnabled (elem XmlType,name_section varchar2)
return XmlType
is v XmlType;
CURSOR myCursor IS select * from sec_form where form_code = 'CSA';
begin
open myCursor;
loop
[code]....
now i'm gonna call the function (elem XmlType,name_section varchar2) and pass here "section1" for example ; and she must return me my xmltype element if she find "section1" finds section1 present;
when i try t compile i got:
Error(18,13): PL/SQL: Statement ignored
Error(18,26): PLS-00225: subprogram or cursor 'MYCURSOR' reference is out of scope
View 3 Replies
View Related
Apr 21, 2010
I have table customer which contains a column CUSTOMER_FIRST_NAME
CUSTOMER_FIRST_NAME VARCHAR2(50)
What will be sql statement to add a constraint on the CUSTOMER_FIRST_NAME column of the CUSTOMERS table so that the value inserted in the column does not have numbers ?
View 34 Replies
View Related
Jun 29, 2012
Is there a seeded function by which I can check all the rows which stored dates in varchar column.
I have a table say test (test_data varchar2(100));
Now I will insert all types of records into the table varchar,number dates and then i will write q query to etch all those records only which has dates only
INSERT INTO test(1);
INSERT INTO test('ABC');
INSERT INTO test(SYSDATE);
INSERT INTO test(TO_CHAR(SYSDATE,'DD-MON-YYYY'));
INSERT INTO test(TO_CHAR(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
INSERT INTO test('15/01/2012');
...
commit;
View 17 Replies
View Related
Jul 30, 2011
I want to put one check box to check all the check boxes.how can i do this?
View 5 Replies
View Related
Sep 16, 2010
I have a table in SQL , I am creating a column Of name in it , i want to restrict user to enter name in Capital only ,and i want to create this at table level . I tried Check Operator but failed .
create table my_tab
(U_name varchar2(30) ,
constraint ck_check (U_name = upper(m_name))
/
View 6 Replies
View Related
Dec 16, 2010
I have a text column having date data. In the format of YYYYMMDD.Some of the records might have invalid date data as well. Is there any function which checks whether it's value is a right DATE? Something like
IS_DATE(my_text_date,'DD-MM-YYYY')
should return TRUE if it's a valid date.
View 3 Replies
View Related
Jul 6, 2011
I would like to check and make sure that features like partitioning, Tuning, Diagnostics etc. have NOT been used. In Oracle 10 + we have the dba_feature_usage_statistics.
But how can we check this in 9.2 ?
View 1 Replies
View Related
Jun 18, 2013
i have a procedure like create or replace procedure studrec( a in sid%rowtype)asi sid%rowtype;beginselect sid into ifrom students; i need to check whether sid is exist in the variable i or not
View 5 Replies
View Related
Mar 6, 2013
I have one procedure which is executing daily two times(i.e morning run and evening run) . In morning run it's executing around 150 mins and evening run executing around 25 mins.
It's happening for all procedures executing in longer run in morning. There is NO LOCKS, I have checked LOCKS while executing morning run. I suspects CPU usage in morning run.
How to check CPU usage ? AND also each session how much utilizing CPU. I'm using oracle 8i database, I know it's older version but my company is using oracle 8i. So i have to look in this database version only.
View 6 Replies
View Related
Sep 17, 2013
I am not a DBA, we are using Oracle 10g DB for our PLM applictaion Enovia, we are now trying to do 4GT in our windows 2003 server where our DB kept, while reading articles about this. we are informed that /LARGEADDRESSAWARE (IMAGE_FILE_LARGE_ADDRESS_AWARE) flag needed to be set to True in the application (here it is Oracle) to use more than 2GB in the RAM.
So My question is "Whether the corresponding flag is set to TRUE or not in Oracle 10g"? Is there any way to check that?"
View 1 Replies
View Related
Oct 12, 2005
I have a script like this:
------------------------------------------------------------
DROP TABLE CON_TEST CASCADE CONSTRAINTS ;
CREATE TABLE CON_TEST (
IDI NUMBER(10,0),
USERID VARCHAR2(10),
PWD VARCHAR2(10),
NOTE VARCHAR(100)
)
----------------------
But i think if table CON_TEST doen't exist, an error message will appear. I know that in SQL Server we can check if table exists or not. So, i wonder if we can do that in Oracle?
By the way, is there any way to run a file script that contents TABLES, STORED, ... on a developed PC connect to oracle db server? (in case, i'm developing on PC, using Net Service Name to conect to Oracle DB Server)
View 9 Replies
View Related
Sep 6, 2011
How can i list all the object privileges from n user?
for example:
I granted to USER1:
GRANT ALL on my_table1 to USER1;
GRANT ALL on my_table2 to USER1;
GRANT ALL on my_tableN to USER1;
How can i list all privileges from this user over all tables?
I don't know if this is possible, but i wanna to list:
USER1 ----- UPDATE, INSERT, DELETE ON my_table1
USER1 ----- UPDATE, INSERT, DELETE ON my_table2
USER1 ----- UPDATE, INSERT, DELETE ON my_tableN
Is this possible?
View 1 Replies
View Related
Mar 27, 2007
How do i check the oracle database for an entry of the same type before i submit an entry.
basically i am taking information from a form and passing it into php which in turn uses oracle to store it in a database, how can i check that there is no entry of the same type in the database?
View 1 Replies
View Related
Sep 12, 2011
session from user U1
C:Documents and Settingsuser>sqlplus u1/u123456@orcl
SQL*Plus: Release 10.2.0.1.0 - Production on Pn Wrz 12 12:56:14 2011
Copyright (c) 1982, 2005, Oracle. All rights reserved.
Po│╣czono z:
Oracle9i Enterprise Edition Release 9.2.0.7.0 - Production
With the Partitioning, OLAP and Oracle Data Mining options
JServer Release 9.2.0.7.0 - Production
SQL> update u1.tab1 set u1.tab1.col1=3 where u1.tab1.col1=1;
1 wiersz zosta│ zmodyfikowany.
SQL>
and now i can check which table is locked
SQL> SELECT lo.session_id, lo.OBJECT_ID, obj.object_name FROM v$locked_object lo
2 INNER JOIN Dba_Objects obj ON obj.object_id = lo.OBJECT_ID;
SESSION_ID OBJECT_ID OBJECT_NAME
---------- ---------- --------------------------------------------------
34 13197 TAB1
but the question is why can i check row id of locked row?
View 9 Replies
View Related
Jul 23, 2012
I have an SP which takes filename as input parameter and loads the data into table (using UTL_FILE package), it is working fine with flat file, but if it is anything other than flat file (xls, doc, docx, pdf) then in When Others exception I'm showing as UNKNOWN Error.
Requirement: Is there a way to check the type of file (txt, xls, doc or pdf) passed as input to the stored procedure using UTL_FILE package (Only file name is send as input parameter not with file extension)
View 3 Replies
View Related
Sep 8, 2011
i need a function which checks if v_rand carrying a value is alphanumeric if nt this value of 6 alpha numeric characters must be generated again... here is the actual fn.
Function alphanumeric
Return varchar2
is
v_rand varchar2(10) := 0;
Begin
[code]......
View 4 Replies
View Related
Jul 8, 2010
How can I check whether the ASM is used in the environment? how I can check for it and if being used, how to connect to that instance later on.
View 5 Replies
View Related
Oct 30, 2012
I'm working on a feature that needs to check every table for data. At the moment I am roundtripping every time and running the query like this:
SELECT 1 FROM dual WHERE EXISTS(SELECT 'x' FROM table_name)
Is there a better way that allows me to get the result for all tables in one trip? I've tried a correlated subquery like this:
SELECT table_name, (SELECT 1 FROM dual WHERE EXISTS(SELECT 'x' FROM table_name) FROM all_tables
but I think that doesn't work because Oracle looks for a table called table_name rather than the value from the outer query.
View 13 Replies
View Related
Mar 15, 2011
I working on data transferring from one database server to another database server. but at starting i want to check weather remote database is connected or not?
for e.g.
a := get_remote_connection; --- Calling function for check remote connection return boolean
if a then
<call my data_transfer_proc>
else
exit;
end if;
reply.
View 4 Replies
View Related
Apr 13, 2013
oracleDatabase version:11gR2
Os:solaris
how to check locks on database objects .it might be any lock? any select sql query to check database object levlel locks?what basis locks will occur?
View 3 Replies
View Related
Feb 17, 2011
why my code wont work. Am trying to create a constraint so that the only data that can be entered into the size field is a number between 4 and 15.
CREATE TABLE accommodation
(chalet_no NUMBER (3) PRIMARY KEY,
chalet_name VARCHAR2(20) NOT NULL,
size NUMBER CHECK (size >3) AND CHECK (size <16),
priceperweek NUMBER (4,2) NOT NULL);
Does seem to like line 4 of the code.
View 1 Replies
View Related
Jan 19, 2010
I have a table called TRANS, and a primary key field tran_id. How would i check if there is a record matching tran_id 'DUP7927' ?
View 25 Replies
View Related