Validate that a string is composed from a defined character set
Hi experts,
I need to validate that a string enetered as parameter is composed of the following character set :
26 alphabets (both in capital or lower case), a (like OBrien), a blank between characters like (Mc Donald). So the total valid characters on any of these fields will be 54.
could You provide with an efficient code ?
Plz Help....
rewards gauranteed........
Hi,
Check the below code.
data: var(52) type c Value 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz'.
data: v1(14) type c value 'welcome to SDN'.
data: v2 type i.
data: v3 type i.
v3 = 0.
v2 = STRLEN( v1 ).
do v2 times.
if v1+v3(1) = space .
write:/ 'test contains character space'.
elseif v1+v3(1) ca var.
write:/ 'test'.
elseif v1(v3) = '/'.
write:/ 'test contains character /'.
endif.
v3 = v3 + 1.
enddo.
Regards,
Shravan G.
Similar Messages
-
Importing from a different character set
Oracle 8.1.7 / Windows NT
I'm trying to import a dump file which was created with character set WE8ISO8859P9. My database uses character set UTF8. Some of the records can't be inserted because of error "ORA-1401: Value too large for column". Is this because of the different character sets? If I switch my session to WE8ISO8859P9, imp says "character set conversion from x to y not supported."
How can I get these last records inserted? Here's an excerpt from the log:
Verbunden mit: Oracle8i Enterprise Edition Release 8.1.7.0.0 - Production
With the Partitioning option
JServer Release 8.1.7.0.0 - Production
<
Export-Datei wurde von EXPORT:V08.00.05 |ber konventionellen Pfad erstellt
Warnung: Die Objekte wurden von NOC_ADMIN exportiert, nicht von Ihnen.
Importvorgang mit Zeichensatz WE8ISO8859P9 und Zeichensatz UTF8 NCHAR durchgef|hrt
Import-Server verwendet Zeichensatz UTF8 (mvgliche Zeichensatzkonvertierung)
Export-Server verwendet Zeichensatz WE8ISO8859P9 NCHAR (mvgliche Zeichensatzkonvertierung)
. Import NOC_ADMIN's Objekte in NOC_ADMIN
. . Import der Tabelle "ACCESSROUTERIFS_" 782 Zeilen importiert
. . Import der Tabelle "ITEM_"
IMP-00019: Zeile zur|ckgewiesen aufgrund von Oracle-Fehler 1401
IMP-00003: Oracle-Fehler 1401 gefunden
ORA-01401: Eingef|gter Wert zu gro_ f|r Spalte
Spalte 1 33886
Spalte 2
Spalte 3
Spalte 4 1323
Spalte 5
Spalte 6 11
Spalte 7 18600
Spalte 8 18600
Spalte 9 20-NOV-2000:00:00:00
Spalte 10 processing
Spalte 11 inactive
Spalte 12
Spalte 13
Spalte 14 35682.0
Spalte 15
Spalte 16
Spalte 17
Spalte 18 05.12.00: KD weiss noch nix neues, er wird uns inf...
Spalte 19
Spalte 20 kschmid
Spalte 21 09-FEB-2001:15:50:21
Spalte 22
Spalte 23 12
Spalte 24
Spalte 25 06-NOV-2000:00:00:00
nullPlease try ORacle RDBMS support. this issues is to do with Oracle Import.
-
Clarification on Character set migration from US7ASCII to UTF8
Hi,
I need clarification on the below.
I need to migrate the database from US7ASCII to UTF8.
For this I ran csscan for user "TEST" as well as against full database.
Below log is the csscan output against full database. but my application is depended on TEST schema only. Shall I need to migrate SYS objects data as shown below or it's not required?. If required how to migrate these objects data?
Looking forward you help.
USER.TABLE Convertible Exceptional
SYS.METASTYLESHEET 58 TEST.Table_1 9 0
TEST.Table_2 11 0
TEST.Table_3 17 0
TEST.Table_4 11 0
[Distribution of Convertible Data per Column]
USER.TABLE|COLUMN Convertible Exceptional
SYS.METASTYLESHEET|STYLESHEET 58 0
Thanks,
SankarI think you need to migrate all schemas data not only one application schema because
the database character set is common to all CHAR, VARCHAR2, LONG and CLOB colums
for any tables in any schema.
In your case (US7ASCII to UTF8), you need to use export/import because:
Another restriction of the ALTER DATABASE CHARACTER SET statement is that it can be used only when the character set migration is between two single-byte character sets or between two multibyte character sets. If the planned character set migration is from a single-byte character set to a multibyte character set, then use the Export and Import utilities.
(see http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96529/ch10.htm#1009904) -
Why is that when I am composing a new message do I end up with multiple versions of my message I am composing up in my Google Trash mailbox? How can I stop this from happening?
It was very hard to see what the box says because the message displays for less than one second. However, I was able to record it with my iphone and pause it until I got a shot of the message. The box says the following:
"Do you want the application “java” to accept incoming network connections?
Clicking deny may limit the application’s behavior. This setting can be changed in the Firewall pane of Security preferences."
I did make some changes. I will see if it works.
Thank you!!! -
CRADSDatabase ERROR (5211): There is an error converting Unicode string to or from code page string
Device Blackberry Z10
Sw release 10.2.1.2977
OS Version 10.2.1.3247
The problem is known by Blackberry but they didn't make a little effort to solve this problem and they wonder why nobody buy Blackberry. I come from Android platform and I regret buying Blackberry: call problems(I sent it to service because the people that I was talking with couldn't hear me), jack problems (the headphones does not work; I will send it again to service). This synchronisation problem is "the drop that fills the glass". Please don't buy Blackberry any more.
http://btsc.webapps.blackberry.com/btsc/viewdocument.do?noCount=true&externalId=KB33098&sliceId=2&di...This is a Windows registry issue, if you search the Web using these keywords:
"how to fix craddatabase error 5211" you will find a registry editor that syas it can fix this issue. -
How to validate that only one check box is checked in detail block
Hi All,
I am using oracle Forms 10G on windows.
I need help on how to validate that only one check box is checked in detail block. I have multiple records in the detail block and I have check boxes for each record in the detail block.
I have a button to select the values from the detail records where the check box is checked. But I want to make sure that only one record is check not more than one.
How do I validate this on a push button trigger?
ThanksWhen I've done this kind of thing, I create a Form level variable of TYPE number and then add or subtract to this variable as I check and uncheck the checkboxes. If the value of the variable is 1, then you know that only one checkbox is selected. If the value is greater than 1, then you know the user has selected more than one check box. You could also add code to your When-Checkbox-Changed trigger to test the variable and instruct the user to un-check selected record before selecing a new record.
With respect to the Form level variable, you can use a GLOBAL, PARAMETER or Program Unit package specification. I prefer to use the PU Package Spec as this method has a smaller memory footprint. For example, in the Program Unit node of the object navigator create the following;
/* Form variables package spec */
PACKAGE Form_Vars IS
CheckBox_Cnt NUMBER := 0;
END;Now in your When-Checkbox-Changed trigger...
BEGIN
IF ( Form_Vars.CheckBox_Cnt = 0 ) THEN
Form_Vars.CheckBox_Cnt := Form_Vars.CheckBox_Cnt + 1;
ELSE
/* it's assumed the value is greater than 0 */
Message('Please uncheck selec ted record before choosing a new record.');
RAISE Form_Trigger_Failure;
END IF;
END;Hope this helps,
Craig B-)
If someone's response is helpful or correct, please mark it accordingly.
Edited by: CraigB on Feb 3, 2011 10:15 AM -
Is there a plugin or utility that converts .pages to and from LaTeX?
If not, how do we ask Apple for this sort of functionality as an enhancement request? Pages is a nice neat editing and authoring tool. I'd love for it to be extensible, and enable it to save in open formats. RTF is not an open format, by the way. M$ keep changing its behaviour.
Also: XHTML would be nice.Hey there, this question is similar to this one. I provided a one-way solution with AppleScript from Pages > LaTeX. See original post for details.
TeXify Pages Script:
-- Creates new file on desktop to preserve original
tell application "Pages"
set desktopPath to path to desktop folder as text
set docName to (name of document 1) & "_texified.pages"
tell application "System Events"
if exists alias (desktopPath & docName) then delete alias (desktopPath & docName)
make new file at end of folder desktopPath with properties {name:docName}
end tell
save document 1 in alias (desktopPath & docName)
open (desktopPath & docName)
end tell
-- This is the actual part that does what I call "Texifying"
tell application "Pages"
tell document 1
get properties
set {xpath, xname, xbodytext, paraCount} to {path, name, body text, get count of paragraphs}
set paraSection to {"Section", "Subsection", "Subsubsection"}
set paraInline to {"Paragraph"}
repeat with paraStep from 1 to paraCount
set paraStyle to name of paragraph style of paragraph paraStep
set paraContent to text of paragraph paraStep
if paraStyle is in paraSection then
if (paraContent as string) does not contain "{" then
if paraStyle is "Section" then
my texifyHeading(paraContent, paraStyle, "Section", paraStep)
end if
if paraStyle is "Subsection" then
my texifyHeading(paraContent, paraStyle, "Subsection", paraStep)
end if
if paraStyle is "Subsubsection" then
my texifyHeading(paraContent, paraStyle, "Subsubsection", paraStep)
end if
end if
end if
end repeat
set orig_wordCount to count of words
repeat with wordStep from 1 to orig_wordCount
set new_wordCount to (count of words) --gets recalculated with each step
set wordCompensator to (new_wordCount - orig_wordCount)
set wordContent to text of word (wordStep + wordCompensator)
set wordProps to properties of word (wordStep + wordCompensator)
set charOffset to character offset of word (wordStep + wordCompensator)
set preChar to character (charOffset - 1)
set duppreventionList to {"\\", "{", "}"}
if preChar is not in duppreventionList then
if name of paragraph style of wordProps is not in paraSection then
if bold of wordProps is true then
my replaceWord(wordContent, "textbf", (wordStep + wordCompensator))
set wordCompensator to wordCompensator + 1
end if
if italic of wordProps is true then
my replaceWord(wordContent, "emph", (wordStep + wordCompensator))
set wordCompensator to wordCompensator + 1
end if
end if
end if
end repeat
end tell
end tell
on replaceWord(word_content, tex_style, word_num)
tell application "Pages"
tell document 1
set text of word word_num to "\\" & tex_style & "{" & word_content & "}"
end tell
end tell
end replaceWord
on texifyHeading(para_content, pages_style, tex_style, para_num)
set paraSection to {"Section", "Subsection", "Subsubsection"}
set paraInline to {"Paragraph"}
set sedFix to do shell script "echo " & para_content & "| sed \"s/$(printf '\r')\\$//\""
tell application "Pages"
tell document 1
--if first character of (para_content as string) is not "\\" then
--if tex_style is in paraSection then
try
if last character of (para_content as string) is (ASCII character 13) then
set returnText to "\\" & tex_style & "{" & sedFix & "}" & "\r"
else
set returnText to "\\" & tex_style & "{" & para_content & "}"
end if
set text of paragraph para_num to returnText
set paragraph style of paragraph para_num to pages_style
--end if
end try
end tell
end tell
end texifyHeading -
Open cursor for string and select from partition (cannot bind)
Hi,
i don't manage to use a bind variable for a select ... from ... PARTITION(...).
It doesn't work to use something like
open cur for 'select ... from ... PARTITION(:1) where ...' using 'NDAY_20120301';So i have to create the cursor string with string functions each time i change the partition.
But that means, that the string changes each time.
Doesn't that prevent from re-use in library_cache?
best regards,
Frank>
So i have to create the cursor string with string functions each time i change the partition.
But that means, that the string changes each time.
>
Yes it does.
Doesn't that prevent from re-use in library_cache?
>
Yes it does.
So why do you care? Unless you have large numbers of partitions what difference does it make? Bind variables are useful to keep Oracle from doing hard parses of queries that are basically the same but use different filter values. Such as an INSERT statement that uses different values FOR EACH ROW rather
You are just constructing the main (non-filter) part of the query one time and need a single value for the entire query regardless of how many rows - that isn't really a use case for bind variables and isn't going to provide any real benefit.
So the real question is why do you even care about something that wouldn't provide any benefit to you even if you could do it?
Looks like you just want to 'roll your own' parallel processing rather that use, and pay for, Oracle's parallel functionality.
If each partition uses its own tablespace you could filter on the FILE Id of the ROWIDs since the file number will be different for each tablespace and datafile.
1. Determine the list of file numbers for each partitions tablespace.
2. Use a WHERE DBMS_ROWID.ROWID_RELATIVE_FNO (ROWID) = :n filter (or use IN (:n1, :n2))to filter rows based on file number(s) for the partition you want
See DBMS_ROWID.ROWID_RELATIVE_FNO in the PL/SQL Packages and Types doc
http://docs.oracle.com/cd/B28359_01/appdev.111/b28419/d_rowid.htm#i1004259 -
Sending string of bits from PXI to NAS
Good evening, I expose my problem:
I should send a string of bits from PXI to a memory type NAS, using the FTP protocol. I do this every 0.72 ms, then use a timedloop with a frequency of 1MHz. But implementing a timer sending time is very different from what I expect. My question is whether this problem is due to the FTP put buffer.vi that takes more time to send the string.
look your response
Attachments:
Immagine.jpg 178 KBI Dont think a FTP server is meant for being accessed every 0.72s
I would use the queue functions built into labview for buffering the data and access the FTP server at a much lower rate, every minute or every hour...
Regards Claus -
Building the varchar string to return from a pl sql function
i'm new with pl/sql and i'm having trouble trying to build the string that i want to return from a function that is inside a package. it seems my problem stems from the fact that i'm trying to incorporate a variable (varchar2) into the string to be returned. below are two attempts that i've made which do not work:
function test_policy (p_schema_name IN varchar2, p_object_name IN varchar2) return varchar2 as
predicate_value varchar2(2000);
user_name varchar2(100);
begin
select first_name
into user_name
from employees
where first_name = SYS_CONTEXT('hr_app_context', 'username');
predicate_value := 'first_name = ' || user_name;
predicate_value := 'first_name = ' || '' || user_name || '';
return predicate_value;
end test_policy;
Can someone help me with the proper syntax to build my string for the return value? Thanks.this function implements the code for a policy i've created. basically, the policy says that when i do a select on the employees table, i should only see a record whose first_name = sys_context('hr_app_context', 'username'). so, when i perform a simple select * from employees, i get an error which says policy predicate has error. i'm pretty sure the error is caused by how i'm building the return value for that function. if i hard code some return value like:
predicate_value := 'first_name = ''HR''' ;
the select statement above works fine, and i only see the record from employees where first_name = 'HR' -
Display a Date that is 30 days ago from today
Hi All, I want to display a Date that is 30 days ago from today, and I used Calendar object here is my code,
Calendar to = Calendar.getInstance();
String toYYYY = ""+to.get(Calendar.YEAR);
String toMM = "" + (to.get(Calendar.MONTH) + 1) + "";
String toDD = "" + to.get(Calendar.DAY_OF_MONTH);
Calendar from = Calendar.getInstance();
//I set the date to 30 days ago right here
from.setTimeInMillis(to.getTimeInMillis() - 1000 * 60 * 60 * 24 * 30);
String fromYYYY = "" + from.get(Calendar.YEAR);
String fromMM = ""+ (from.get(Calendar.MONTH));
String fromDD = ""+from.get(Calendar.DAY_OF_MONTH);
System.out.println("toYYY is " + toYYYY);
System.out.println("tomm is " + toMM);
System.out.println("toDD is " + toDD);
System.out.println("fromYYYY is " + fromYYYY);
System.out.println("fromMM is " + fromMM);
System.out.println("fromDD is " + fromDD);However, the display result is incorrect for the day that is 30 days ago, can somebody tell me what i did wrong, or rather, let me know if I should use something different to get the date that is 30 days ago
thanks[url http://www.javaworld.com/jw-12-2000/jw-1229-dates.html]Calculating Java dates: Take the time to learn how to create and use dates
[url http://www.javaalmanac.com/egs/java.util/CompDates.html]Comparing Dates
[url http://www.javaalmanac.com/egs/java.text/FormatDate.html]Formatting a Date Using a Custom Format
[url http://www.javaalmanac.com/egs/java.text/ParseDate.html]Parsing a Date Using a Custom Format -
How to validate that all the components are running healthy in 12.1.1
Hi All,
I have just installed EBS 12.1.1, Is there any way to validate that all the components are running healthy?
Thanks in Advance.Oracle-User wrote:
Hi All,
I have just installed EBS 12.1.1, Is there any way to validate that all the components are running healthy?You can verify that from OAM or from "adopmnctl.sh status" command.
Please see old threads which discuss the same topic.
https://forums.oracle.com/forums/search.jspa?threadID=&q=Checklist&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=Health+AND+check&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
https://forums.oracle.com/forums/search.jspa?threadID=&q=Checklist+AND+R12&objID=c3&dateRange=all&userID=&numResults=15&rankBy=10001
Thanks,
Hussein -
How to validate that XML is well-formed?
I have an "Any XML Service" on Oracle Service Bus (version 11.1.1.4) that I would like to have validate that the input is well-formed XML. There is no DTD or XSchema to apply -- it can be any generic well-formed XML. I didn't see a way to do it with a Validate Action. Is a Java Callout my only option?
Thanks,
Doug NewtonThat's interesting...
Try creating a xquery expression using fn-bea:inlinedXML(), it doesn't require XSD
The fn-bea:inlinedXML() function parses textual XML and returns an instance of the XQuery 1.0 Data Model.
The function has the following signature:
fn-bea:inlinedXML($text as xs:string) as node()*
where $text is the textual XML to parse.
Examples:
fn-bea:inlinedXML(“<e>text</e>”) returns element “e”.
fn-bea:inlinedXML(“<?xml version=”1.0”><e>text</e>”) returns a document with root element “e”.
http://docs.oracle.com/cd/E13162_01/odsi/docs10gr3/xquery/extensions.html#wp1295964
Cheers,
Vlad
It is considered good etiquette to reward answerers with points (as "helpful" - 5 pts - or "correct" - 10pts)
https://forums.oracle.com/forums/ann.jspa?annID=893 -
Day of year bug - format date/time string and scan from string?
I've noticed that the day of year returned by "Format Date/Time String.vi" starts with a value of 1 for Jan-1 while "Scan from String.vi" wants a 0 index. Is this a bug or feature?
(I'm using Labview 2010 Service Pack 1)I think the best idea is to use seconds since for your arithmetic, because it is going to be the most consistent and robust solution. Knowing that a day has 86400 seconds is all that is needed and you won't run in possible inconsistencies with date time implementations caused by our anything but logic calender. I would hazard that the functionality of converting a timestamp into year and day of year and back is impossible to make consistent without sacrificing other possibly conflicting transformation in the Timestamp into String and Timestamp from String manipulations.
"Seconds since" being the actual base unit in all LabVIEW timestamps, it is best to do any arithmetic on it in this base unit.
Rolf Kalbermatter
CIT Engineering Netherlands
a division of Test & Measurement Solutions -
SRM validate the Catalog Item when copying from old templates
Do SRM validate the Catalog Item when copying from old templates and previous shopping carts? Is this standard functionality?
Thanks,
RajanContinuation to my previous post:
My findings based on the analysis I did. Might help people who are looking for similar info.
As Jason mentioned, the Subroutine name is CATALOG_CONTENT_VALIDATE_GET
This is under package BBP_SC --> Function Group: BBP_SC_APP
After making a webservice call to get catalog details, the mapping is done as below.
IF sy-subrc EQ 0.
READ TABLE lt_enriched_item INDEX 1.
IF sy-subrc EQ 0.
ls_item_validate-price = lt_enriched_item-price.
ls_item_validate-currency = lt_enriched_item-currency.
ls_item_validate-price_unit = lt_enriched_item-price_unit.
ls_item_validate-deliv_date = lt_enriched_item-deliv_date.
ls_item_validate-leadtime = lt_enriched_item-leadtime.
ls_item_validate-unit = lt_enriched_item-unit.
ELSE.
lv_validate_item_exception = gc_yes.
ENDIF.
ELSE.
lv_validate_item_exception = gc_yes.
ENDIF.
If you go one level deeper into subroutine PERFORM sc_itm_copy_to_basket, you can see that following validations are performed.
If EITHER price, currency or price unit changes, we get the message u201C&: Price changed due to catalog validationu201D
If UOM changes, we get the message u201C&: Unit of measure changed in catalog; item not transferredu201D
When Delivery date or lead time changes, no message is raised but the new values are copied.
In a nut shell, the fields that are considered for validation are Price, Currency, Price Unit, UOM, Delivery date, Lead Time.
Thanks,
Seyed
Maybe you are looking for
-
Can I get links to automatically open in a new tab just by clicking on them?
I've selected the option to: "Open new windows in new tab instead" from the options menu. For some time this seemed to open any link I clicked on in a new tab. For some reason this feature is no longer working and new links clicked on simply overwrit
-
STL subtitle files in DVD Studio Pro - ripple
I think I have the answer - an STL is a text based file. The timing cannot be automatically rippled? Am I right? Say I wish to move a block of subtiles up by a few minutes. I have eleven shows in a row that stretch out 28 minutes for subtiling by
-
Subclass contains and extend the expand method
Hi All, I'm wondering if anybody out there has subclassed the contains query to overriding the expand() method to control the query expressions? I'm trying to include boolean search expressions along with the (+,-,~ and *) expressions. Any help would
-
What r the direct and indirect taxes
hi gurus, can any one pls give me what r the direct and indirect taxes. Thanks in advance, RAVI Moderator: Please, respect SDN rules. As it's not your first warning, upon next violation your user will be banned
-
DOI in R/3 47x200 + WAS620
Hello in order to integrate excel docs, ms excel -> r/3 and r/3 -> ms excel is DOI (desktop office integration) the most suitable tool in my work scenario (R/34.7x200+WAS620) ? Thanks in advance David Ruiz