Can anybody change this logic ?
Hi,
In a form I have a block :serial_entry and two text fields one is vfi_range_quantity(number),fm_serial_number(char) I will enter vfi_range_quantity is 3 and tab curosr goes to fm_serial_number and will enter 546-878-335
and press tab it will pop up message saying 546-878-335,546-878-336,546-878-337. Its working fine.
The code for this is attached at the end.
Now what I want is I will enter vfi_range_quantity is 3, fm_serial_number 546-878-000 its poping up the message saying 546-878-0,546-878-1,546-878-2. What I want is 546-878-000,546-878-001,546-878-002
AND If I Enter vfi_range_quantity is 3 fm_serial_number 546-878-999
its poping up the message saying 546-878-999,546-878-1000,546-878-1001.
What I want is 546-878-999 only..
Thanks,
Devender
When-Validate-item of fm_serial_number
DECLARE
l_fm_serial_number VARCHAR2 (100);
l_part_number VARCHAR2 (100);
len_fm_serial_number NUMBER;
temp_part VARCHAR2 (50);
temp_part1 VARCHAR2 (50);
temp_part5 VARCHAR2 (500);
temp_part2 NUMBER;
temp_part3 NUMBER;
temp_part4 NUMBER;
v_count_parent NUMBER:=1;
v_count_vmsn NUMBER;
BEGIN
len_fm_serial_number:=length(:serial_entry.fm_serial_number);
IF len_fm_serial_number = 11 THEN
temp_part3:= 9;temp_part4:=7;
END IF;
IF v_count_parent != 0 THEN
BEGIN --++++
temp_part2 :=
TO_NUMBER (SUBSTR (:serial_entry.fm_serial_number, temp_part3, 3));
FOR i IN 1 ..:serial_entry.vfi_range_quantity
LOOP
BEGIN
temp_part1 :=
SUBSTR (:serial_entry.fm_serial_number, 1, temp_part4)|| '-'|| TO_CHAR (temp_part2);
TEMP_PART := NULL;
END;
temp_part2 := temp_part2 + 1;
temp_part5 := temp_part5||','||temp_part1;
END LOOP;
Message(temp_part5);
Message(temp_part5);
END; --++++
END IF;
END;
-------------------------------
DECLARE
FUNCTION generate_serial_numbers(
p_serial_no IN VARCHAR2,
p_range IN PLS_INTEGER)
RETURN VARCHAR2 IS
part3_num PLS_INTEGER;
retval VARCHAR2(100) := '';
BEGIN
BEGIN
part3_num := To_Number(SubStr(p_serial_no,9));
EXCEPTION
WHEN Value_Error THEN
Raise_Application_Error(-20000,'Bad serial no - use ''nnn-nnn-nnn''');
END;
FOR i IN 0..(p_range - 1) LOOP
IF part3_num + i <= 999 THEN
IF i != 0 THEN
retval := retval || ', ';
END IF;
retval := retval || SubStr(p_serial_no,1,8) || To_Char(part3_num + i,'fm009');
END IF;
END LOOP;
RETURN retval;
END;
BEGIN
Dbms_Output.put_line(generate_serial_numbers('546-878-1',3));
Dbms_Output.put_line(generate_serial_numbers('546-878-001',3));
Dbms_Output.put_line(generate_serial_numbers('546-878-999',3));
Dbms_Output.put_line(generate_serial_numbers('546-878-1',6));
Dbms_Output.put_line(generate_serial_numbers('546-878-egg',6));
END;
/any use?
Similar Messages
-
When I create a New Folder (on the desktop or in Finder), the system uses the Generic Document Icon instead of the Generic Folder Icon. How can I change this back?
All of a sudden I noticed that most of the folders on my computer were no longer using the folder icon, but the generic document icon. I had to manually change back the icon being used by opening Get Info for each folder and copying and pasting the generic folder icon from some folders that remained unchanged. Now whenever I create a New Folder (right click -> "New Folder"), the icon that shows up is the generic document icon (white page with top right corner turned down). And I have to manually change it so it shows up as a folder in Finder or on my desktop. I don't know why or how this switch happened. All of the folders now on my computer look ok, but I need to change the default so when I create a New Folder it uses the correct icon.
I have also Forced Relaunch of my Finder and rebooted the system. I downloaded Candybar but am not sure what will fix anything, so I haven't proceeded.
Anyone know how I can do this? Thanks.Anyone?
-
My iPhone 4S appears to be using an old Apple ID and keeps asking for my sign in. How can I change this to my current ID -this applied to iCloud only.
Thanks for the response -
Unfortunately - I can not use my Old Apple ID at all - Apple/Itunes is not recognizing it at all. I thought about your last suggestion and the system is not accepting the old ID and password. I believe this is because the old id (email address) is associated to a service (Verizon) that I no long have. When I discontinued service with Verizon, their email address that I used as my Old apple ID become invalid.
I am sure this scenario happens frequently - hopefully Apple can find a better solution in the future.
Thanks,
dr -
I have 2 iphones that share the same apple ID I do not want them to share contacts and apps how can I change this?
You can use separate AppleIDs for iCloud, iMessage and iTunes - you just need to create unique AppleIDs for the iCloud accounts if syncing contacts that way (you will need an email address that is not already registered as an AppleID though to get another AppleID).
Apps are a different matter in that purchases are tied to the AppleID used to log in to the store to make the purchase. So you can create another AppleID for iTunes as well and use different ones on the different phones, but any apps you have already purchased with your existing AppleID are permanently tied to that AppleID.
Really, unless you are sharing apps, content and such, there is no reason to use the same AppleID on each anyway. So the simplest solution is to create new AppleID(s) for the second device. If you need an email address to do that, just get a gmail account (or hotmail, yahoo or any other free email account). -
3 iphones in household.All use same apple ID.But all contacts get mixed between phones and facetime calls come in from other contacts.How can we change this so our phone information isn't visible to each other?
Use separate Apple IDs for each family member and use Family Sharing features of those things (if any) that you do want to share. https://www.apple.com/ios/whats-new/family-sharing/
-
My iPhone and iPad are on my moms icloud account and i just got a macbook air and i want all my devices on my own iCloud account - i went to all of my settings and it won't let me change my iCloud account on my phone and iPad. can i change this?
You will have to do more than simply changing settings in your moms account. To set up everything in your own account, go to Settings > iCloud > scroll down and press sign out. From this, check out this link for how to setup iCloud on all of your devices after making a new icloud account on your phone: https://www.apple.com/icloud/setup/
Before you set that up, you will have to make a new iCould account which you can simply do after you sign out of your mom's account on your devices.
Hope I can help! -
When I tap on the to line to add an address sometimes people's names come up that I don't have as contacts. How can I change this setting?
The only way that I know currently know of to remove old or incorrect email addresses from the Mail app is to reset the iPad back to factory defaults, which I assume that you don't want to to. You could try leaving feedback for Apple and maybe one day we'll day be able to edit them : http://www.apple.com/feedback/ipad.html#ipad
-
Trying to d/l Kindle and Amazon aps to new iPad w/Retina Display. User ID is pre-populated with the incorrect email address for my Apple account. How can I change this to my correct Apple User ID?
You should setup as new.
Settings>General>Reset>Erase all content and settings -
After the latest update, all my apple products reverted to an old icloud account. As it no longer exists, I cannot get into it to delete it and add the correct id. How can I change this, especially on my Macbook pro? There is no p/w related to it and even though I tried to reset "password" it won't allow as the id does not exist, neither does the email associated with the old id. How do I switch it to a newer id?
It's all rather odd because the old account cannot 'no longer exist' - if you don't have the correct password you won't be able to get into it, but you can't actually delete an iCloud account from the server.
I'm afraid you will need the services of iCloud Support. If you currently happen to have AppleCare, either because you recently bought Apple hardware or have paid to extend the inititial period, you can contact them here:
http://www.apple.com/support/icloud/contact/
You will need the serial number of the covered hardware.
If you are not covered by AppleCare, then - in common with other free email services - there is no free support and you may be asked to pay a fee. -
When I right click on a link "Open link in new tab" since a few days, it "jumps over" the tab to the right and opens in the tab next to that. How can I change this back to opening in the tab next to the page from which I opened as it used to be?
Start Firefox in [[Safe Mode]] to check if one of the add-ons is causing the problem (switch to the DEFAULT theme: Tools > Add-ons > Themes).
* Don't make any changes on the Safe mode start window.
See:
* [[Troubleshooting extensions and themes]]
* [[Troubleshooting plugins]]
If it does work in Safe-mode then disable all extensions and then try to find which is causing it by enabling one at a time until the problem reappears.
* Use "Disable all add-ons" on the [[Safe mode]] start window to disable all extensions.
* Close and restart Firefox after each change via "File > Exit" (Mac: "Firefox > Quit"; Linux: "File > Quit") -
When I want to attach a file to an e-mail I'm sending from my iCloud account it makes the file show up in the body of the e-mail instead of attaching it as a separate file the receiver can open. How can I change this?
It should be an attachment. Your Mac just displays a preview of certain attachments (such as .pdfs) in the body of the message. A PC, for example, will see it as an attached file rather than a preview.
You can save the attachment on your Mac by Control-clicking on it and selecting Save Attachment. -
I am using OSX 10.9.5 and Outlook Web App for emails. When I download an attachment it replaces the space in the file name with %20 - how can I change this?
Click on the below link :
https://get.adobe.com/flashplayer/otherversions/
Step 1: select Mac OS X 10.6-`0.`0
Step 2 : Safari and FIrefox
Then click on " Download Now" button. -
I can no longer access my cloud as it is under the original ID (email address/password) which I can no longer access. How can I change this?
I'm following. I'm having the same problem.
-
When i send a text message from my iphone 5s, it is sending it from my icloud email rather than my phone number , how can i change this ?
ThanxSettings>Messages>Send/Receive>Start New Conversations From....put a check next to your phone number.
-
I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14. I have been able to print larger pictures. I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this? I need 16x20's
I am shooting with a Nikon D60 on Fine Format and unable to print larger than 11x14. I have been able to print larger pictures. I am told iPhoto reduces the size of the file when uploaded. Is this true? If so how can I change this? I need 16x20's
Maybe you are looking for
-
Error while Executing DTP for 0ic_c03
Hi Friends, While executing the 2lis_03_bx DTP for the cube 0ic_c03, i am facing this peculiar problem. Executing the DTP takes a lot of time and after some time i am getting the error "Status 'Processed with Errors' Message no. RSBK257" I have tried
-
Common headers and footers in web applications
I want to include common headers and footers in all web applications. I do not want to include the header/footer in each application WAR file. I've tried to follow Orion's tutorial for building a response filter, and I get it working to the point tha
-
LR3, PS CS5, Camera Raw 6.2, oh my! Compatibility issues?
I am using LR3.2, PS CS5 (12.0.1) and Camera Raw 6.2 on Mac OS (Snow Leopard). When I open an image from Lightroom in Photoshop, filters such as Surface Blur take about 10 minutes (literally) to complete. Wile the filter is running, I checked CPU and
-
Can't preview images as thumbnil or cover flow
Hi everyone. Previously i was able to view images in finder as thumbnails as well as cover flow, but yesterday i found out that that the images in finder takes the "preview" icon although although that in the finder view options the show icon preview
-
How to check any clearing accounting document to settle a goods issues delivery. I have a goods issue document. I would like to know is there any clearing document for the goods document. Thanks!