Loop excluding the numbers
Hi allThe code below is a loop that inserts values from 1 to 10 in the column of the results which part messages in the table.
BEGIN
FOR v_LoopCounter IN 1.10 LOOP
INSERT INTO messages (results)
VALUES (v_LoopCounter);
END LOOP;
END;
/
I need to create a loop that insert the numbers 1 to 10, excluding 6 and 8.
Do you know how can I exclude the values of 6 and 8 when the code inserts data into the table?
Thank you much in advance.
Published by: 899335 on December 17, 2011 13:41
BEGIN
FOR v_LoopCounter IN 1..10 LOOP
IF v_LoopCounter NOT IN (6,8)
THEN
INSERT
INTO messages(results)
VALUES (v_LoopCounter);
END IF;
END LOOP;
END;
/
SY.
Tags: Database
Similar Questions
-
Excluding the chapters of automatic chapter numbering
Hi guys, first time poster!
I need help.
I've set up each of my chapters with automatic chapter headings (Type > text Variables > insert Variable > chapter number)
So that part works fine.
The problem I have is (as you can see in my screenshot), for my books, Chapter 1 begins in the 7th entry on the book panel. So, instead, Chapter 1 to 7, the chapter number. I'm doing this right? I can't find a solution. Must file as a table of contents and pages copyright etc is not in the compilation of the book? I want to export an entire PDF (what I know how to do) rather than having to connect a PDF file. I checked the "Document numbering Options" and under chapter numbering I don't see really an option to exclude the first entries of 4 or 5 and do the 7th in the list "Chapter 1".Any ideas?
Thank you very much!
The lower part of this Panel is for the chapters of the Document
You can see you have configured automatic chapter numbers
For Chapter 1, you should have
You must choose whether to start chapter numbering in chapter: 1
Then in your previous documents before
You must configure them so that they start numbering in Chapter 1 of too - but use a different numbering style as A, B, C, etc..
Or anything that works for you.
Bottom line is you need to select first chapter in the book and start the numbering of Chapter 1.
-
A loop in the letters instead of numbers
I need to create an array of strings containing ranging A100 at X 999. I tried a loop in the letters, but I don't think this is possible
var arrayAct = new Array();
for (i = 'A'; I < = 'X'; i ++) {}
for (i2 = 100; i2 < = 999; i2 ++) {}
arrayAct.push (String (i + i2));
}
}
Yes, but like this:
for (var i = "A".charCodeAt (0); ") i<= "x".charcodeat(0);="">=>
Console.println (string.fromCharCode(0)) (i));
}
-
Look for the string of the numbered array element.
This is my first post, so I'll probably miss one thing or another. I will look nothing missed as soon as possible. I write code LV to test additional County stored in a CSV text file. Counties represent the stimulated current of a diode in a beam of radiation. The product is a QA device for a medical radiation treatment machine. The Integrator output proportional to the current diode accumulates as a whole into account in the text file. My LV code puts the numbers in the tables, calculates the incremental time derived and analyzed statistically. Numbers of the columns in the table data represent unique components. Default number of data column is sorted in a 1 d table has no column number. As if not column 10 represents CR39 of PCB 11. I need an algorithm how to connect a string such as CR39-PCB11 to the element of the array 1 d failure or relate to the string to the column in the data table that fails. Could you suggest a way to do this?
If I understand you correctly, instead of these numbers that are in the Updates (odd) 'zero', you want to get premium channels. For the moment, the operator uses a lookup table, to find the chain (component) that corresponds to the column number.
It's easy, because you only need an array of strings (corresponding to the column number 0 n) and use the array index with the index of the column. Place it in a loop for get all the clues of failures (the loop autoindexing for).
Felix
-
Hello
Once, I am for another question, desire to learn more about labview and these countless obscure secrets.
Well my problem seem is a common problem, but I have not found the answer in other topics.
Here are the levels of my (simpler if you look directly at VI) VI1st level, I have an event to bring the action or return to the main Vi
level 2 (during the measurement process), I have an loo whilep with an event case inside to stop the loop if the process is blocked. but it does not work.And to make matters worse I can't press the keys at the start of the measure
I'm on this problem for 10 hours is not a question asked without thinking, but I am really stuck.
Thank you
Firstly, stacking of the structures of the event is going to be tricky, very quickly, so I want to disencourage to do until you are an experienced developer of LV. You are currently a little diving on the "first numbers", which is generally understood as the warnings from the structure of the event.
The second thing is that I understand that you want to terminate the wait function itself (which represents your external code). This can be done. The reason is simple: LV is just waiting for the code complete. So saying LV to stop his execution will happen as soon as LV "took over". This will happen once the external code is complete.
You CAN complete the thread using the Windows API, but you should / must restart the entire application of the LV to prevent corruption of memory created by the son put to death (not recommended).
hope this helps,
Norbert
-
Some otherwise identical digital controls have white behind the numbers, other gray
On the attached screenshot, there are two Express Digital controls in the lower right corner. I did the replace operation to make sure that both are the same type of control, still it white behind the numbers and the other is grey behind the numbers.
I do not change the settings of these controls when I inserted the. I don't see anyway to change the background number without having to build a custom control.
The two controls appear in the same loop, are of type DBL, floating point with 2-digit precision.
Can someone tell me why these environments is different and if there is anything I can do about it?
You must choose the background color to change the background of the indicator. Note that there are two color boxes in the choice of colors. The upper left corner is for the text. Bottom right is for the background.
-
CONNECT IN a loop in the user data
Could someone help me because I can not find a solution.
I want to build a tree of 3 tables (parent-> children-> detail)
Everything works fine with 2 tables, but when I add the third table I get always an error ORA: ORA-01436: CONNECT BY a loop in the user data
CREATE TABLE nineham (organisatie_id NUMBER
(, naam VARCHAR2 (50));
--
CREATE TABLE seizoenen (seizoen_id NUMBER
organisatie_id NUMBER
(, naam VARCHAR2 (50));
--
CREATE TABLE competities (competitie_id NUMBER
seizoen_id NUMBER
(, naam VARCHAR2 (50));
--
INSERT INTO nineham (organisatie_id, name) VALUES (1, 'ORGANISATIE_1');
INSERT INTO nineham (organisatie_id, name) VALUES (2, 'ORGANISATIE_2');
--
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 1, 'SEIZOEN_1');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 1, 'SEIZOEN_2');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (1, 2, 'SEIZOEN_3');
INSERT INTO seizoenen (seizoen_id, organisatie_id, naam) VALUES (2, 2, 'SEIZOEN_4');
--
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (1, 1, 'COMPETITIE_1');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (2, 1, 'COMPETITIE_2');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (3, 2, 'COMPETITIE_3');
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (4, 2, "COMPETITIE_4");
INSERT INTO competities (competitie_id, seizoen_id, naam) VALUES (5, 2, "COMPETITIE_5");
--
--
--
SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display
LEVEL AS lvl
DE)
SELECT NULL AS parent
child organisatie_id
naam
To nineham
UNION ALL
SELECT organisatie_id AS parent
child seizoen_id
naam
OF seizoenen
UNION ALL
Seizoen_id SELECT parent
Child AS NULL
naam
OF competities
)
START WITH parent IS NULL
CONNECT BY PRIOR child = parent
;
Hello
When you perform a CONNECT BY query, you must have an identifier unique to each child. You use numbers that are unique to each table, but are no longer unique when you UNION the paintings together. When the query finds children 1, the fact that average organisatie_id = 1, or does that mean seizoen_id = 1, or does this mean competetite_id = 1?
Etbin suggested you change data. Which can be difficult; It might not even be possible. In addition, you must make sure that the new IDS are unique. When you assign advent = 10 to a node, for example, you must be sure that 10 is not an organisatie_id.
Here is another solution that is guarranted to generate unique IDS, without changing the actual tables:
SELECT LPAD (' ', LEVEL * 2, ' ') | Naam AS display
LEVEL AS lvl
DE)
SELECT NULL AS parent
organisatie_id AS child
, 1 AS the level of
naam
To nineham
UNION ALL
SELECT organisatie_id AS parent
seizoen_id AS child
, 2 AS the level of
naam
OF seizoenen
UNION ALL
SELECT seizoen_id AS parent
Child AS NULL
, 3 AS the level of
naam
OF competities
)
START WITH parent IS NULL
AND level = 1
CONNECT BY PRIOR child = parent
AND layer = FIRST + 1
;
The composite key formed by your original ID, and the new level number is unique.
Note that the query above is exactly what you have posted, with the addition of the lines that refer to level.
-
nested for loop in the collection
Hi Experts,
Collection1
============
SELECT o.object_id
LOOSE COLLECTION l_obj_info
FROM (SELECT n.node_id, n.object_id
N nodes
START WITH n.node_id = 100
N.node_id CONNECT BY PRIOR = n.parent_node_id) n
JOIN IN-HOUSE
objects o ON o.object_id = n.object_id
WHERE o.object_type_id = 285;
s Collection2
============
SELECT *.
LOOSE COLLECTION l_tab
OF ((SELECT REGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))
OF THE DOUBLE
CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));
END;
collection3
============
SELECT o.object_id
LOOSE COLLECTION l_fin_tab
Of objects o JOIN ATTRIBUTES att
ON o.object_id = att.object_id
WHERE o.object_id = collection1.object_id
- AND att. VALUE = collection2.val;
Please tell me how to implement for loop in the collection3 to get the values of collection1 and s collection2.
I tried in the way below
CREATE or REPLACE TYPE LIST_OF_ATTRIBUTES_TYPE AS TABLE OF THE varchar2 (4000);
/
CREATE or REPLACE TYPE LIST_OF_OBJECT_IDS_TYPE AS TABLE OF THE number (9);
/
(F_get_objects_by_type_id) CREATE or REPLACE FUNCTION
i_object_type_id in NUMBERS
i_l_text IN VARCHAR2,
i_scope_node_id NUMBER
)
RETURN list_of_object_ids_type
AS
CURSOR objs_info
IS
SELECT o.object_id
FROM (SELECT n.node_id, n.object_id
N nodes
START WITH n.node_id = i_scope_node_id
N.node_id CONNECT BY PRIOR = n.parent_node_id) n
JOIN IN-HOUSE
objects o ON o.object_id = n.object_id
WHERE o.object_type_id = i_object_type_id;
l_tab list_of_attributes_type: = list_of_attributes_type ();
-l_obj_info list_of_object_ids_type: = list_of_object_ids_type ();
l_fin_tab list_of_object_ids_type: = list_of_object_ids_type ();
BEGIN
BEGIN
SELECT *.
LOOSE COLLECTION l_tab
OF ((SELECT trREGEXP_SUBSTR (i_l_text, "[^,] +', 1, NIVEAU)))
OF THE DOUBLE
CONNECT BY REGEXP_SUBSTR (i_l_text, "[^,] +', 1, LEVEL") IS NOT NULL));
END;
IF l_tab. COUNT > 0
THEN
BECAUSE me IN objs_info
LOOP
FOR j IN l_tab. FIRST... l_tab. LAST
LOOP
SELECT o.object_id
LOOSE COLLECTION l_fin_tab
O JOIN ATTRIBUTES att OBJECTS ON o.object_id =
att.object_id
WHERE
att. VALUE = l_tab (j) and o.object_id = objs_info (i);
END LOOP;
END LOOP;
END IF;
RETURN l_fin_tab;
END f_get_objects_by_type_id;
/
What this different problem from that of pls 00382 expression is incorrect, as they were returning a record type ?
Please do not raise the same question several times. The answer is always the same. Your data model is seriously wrong - and that's the reason why you can't get data from it.
-
Exclude negative numbers?
Is it possible to exclude negative numbers appear in numeric fields (currency)?
For example, if a user tries to enter a negative number in a given area, is there a way to tell Adobe to clear the entry, or, better still, to prevent the user to do?
Thanking you in advance.
Hi Susan,.
If you use the LC Designer, please use the following script to the output of the digital field event in the area of the script editor
If (NumericField1.rawValue<>
{
NumericField1.rawValue ="";
xfa.host.messageBox ("Please enter the positive value");
xfa.host.setFocus (NumericField1);
}
Let me know if it works,
-
Hi all
Can someone help me I have a document that contains many said for example that there numberes from 1-100. Here, I want to remove numbers from 1-100 for example say 22, 23 and 23 after the removal of these figures, I want the rest numberes numbering the final number should be 97.
Im trying with the code but cannot find the answer below.
myDoc var = app.activeDocument;
app.findTextPreferences = null;
app.findTextPreferences.findWhat = "^ 9;
app.findTextPreferences.position = Position.SUPERSCRIPT;
var myFound = myDoc.findText ();
change of var = 0;
for (var i = 0; i < myFound.length; i ++) {}
myFound [i] .appliedCharacterStyle = myDoc.characterStyles.item ("Sup");
{If (myFound [i] .appliedCharacterStyle! = {myDoc.characterStyles.item ("Sup"))}
app.changeTextPreferences.changeTo = "" + change;
change ++;
myDoc.changeText ();
}
}
Thanks in advance,
Kind regards
Learner
So you have to get numbers, no numbers, use Grep to find all the numbers: \d+
Find all the numbers and replace their contents with the value of the counter of the loop for. no need to bother with that content really is.
Then you have to work at the end of the numbers found in the beginning because the length of the number wioll change, for example 10 (two digits) can change to 9 (one digit). Like this
app.findGrepPreferences = null; app.findGrepPreferences.findWhat = '\\d+'; app.findGrepPreferences.position = Position.SUPERSCRIPT; numbers = myDoc.findGrep(); for (i = numbers.length-1; i > -1; i--){ numbers[i].contents = String(i+1); numbers[i].appliedCharacterStyle = myDoc.characterStyles.item("Sup"); }
Peter
-
Try to connect to my Yahoo on Safari brings back me in a continuous loop to the login page. My registration using Firefox works fine.
IM using ios10 on an iPhone 6 s
-
The numbers won't let me record time
Hello
I transferred my data from old iMac (mid-2010/Mavericks) numbers to a new (end 2015/El Capitan). In addition to the fact that I can't use the wonderful version of iWork and I'm stuck with a version with an annoying interface, numbers will not work correctly.
I have a table to track the interactions I have with my students online. In a column, I record the time spent in particular student tutoring. Although the numbers transferred the old data to the new program, it won't let me enter the duration in. I can't copy and paste. And since I get paid according to time spent, it is a crucial column.
How can I fix it?
Thank you
Kim
Kim,
It is always easier to help when you see what you see. Use this link to help you post a screenshot. It is safer to remove the personal information from the screenshots. So duplicate sheet and change called a remove personal information:
How to post a screenshot on the Apple Discussion Forums
Explaining what happens when you type in a cell where you try to enter the hour.
-
How to exclude the songs, didn't like in a smart playlist
How exclude the songs didn't like in a smart playlist.
Note the songs that you don't like as 1 Star then add side is not 1 star smart selection criteria.
-
follow all the numbers listed entirely
Hello
in the column on the left side of the iTunes window where it shows for example that number piece is played in a particular selection, on my mac, not every number is registered. Before each issue was the show in its entirety, after that I must have clicked on something accidentally column now looks something like this:
4271
4272
42...
4274
42...
42...
4277
It seems to be no regular pattern, the numbers that appear entirely seem to be chosen at random. Another observation is that the column with the number does not have a position, even if I don't remember if that was the case before the problem arose.
I tried to adjust the size of the column by dragging the column, open iTunes full screen and also removed some categories of view option to create more space for the numbers. Everything I tried had unsuccessfully, unfortunately, can someone point me in the right direction please?
Thank you
Someone else posted about it recently. I think there may be a way to adjust the font size in views or somewhere. Also report the problem to Apple:
-
How to copy contacts to the numbers
I use OS X El Capitan and unabl to copy contacts to the numbers that I have already with just drag and drop. Can therefore anymor?
Yes - I tried. OS X 10.11.6. 3.6.2 numbers; Contacts 9.0
Maybe you are looking for
-
Is it possible to prevent the update until I'm ready to Firefox?
As above
-
BlackBerry Bold 9900 Smartphones 7.1 update: I lose data?
I got a BlackBerry email inviting me to upgrade the OS on my Bold 9900 to 7.1. If I go ahead, my handset data will remain intact, or will be backed up and restored (I think to update via Desktop for PC software)? And if a backup and a restore is nece
-
NET: ERR_Cert_Date_Invalid - Windows 7
Separated from this thread. Operating system: win 7 homeURL (if applicable):Error message: NET::ERR_CERT_DATE_INVALIDInstalled extensions:
-
Problems with SMS interception using notifyIncomingMessage on some BB
Hello I use following code to detect incoming SMS and inform the user about a device external hw. //... import javax.wireless.messaging.*; import javax.wireless.messaging.MessageListener; import javax.wireless.messaging.MessageConnection; //... Messa
-
BlackBerry Smartphones able to unluck
Hello Phone works fine yesterday, but I went to unlock the last night and I can't select unlock with the key scroll, if I press back on 'Unlock', or 'U', I can go to the password screen. But then the "A" key does not work! All advice appreciated that