How to extract a number of length fixed to a string
HelloI have a requirement to find all numbers of 9 digits in a string with delimiters.
I tried
SELECT REGEXP_SUBSTR (REPLACE ('12345678978979798ZXC3ASD456FGH8TED63456789123',' '),'[[: digit:]] {9}') FROM dual
WHERE REGEXP_SUBSTR (REPLACE ('12345678978979798ZXC3ASD456FGH8TED63456789123',' '),'[[: digit:]] {9}') IS NOT NULL;
It gives me 123456789
But I want to output of
123456789 634567891
Help, please.
Thank you
G
Use Back-referencing to extract all the secondary channels of a particular model:
Ranit>> with xx as(
2 select '12345678978979798ZXC3ASD456FGH8TED63456789123' x from dual
3 )
4 select
5 replace(regexp_replace(x,'([[:digit:]]{9})|.','.\1'),'.')
6 from xx;
REPLACE(REGEXP_REP
------------------
123456789634567891
@NSK - what will happen if a 3 ^ rd ^ substring exists? You have hardcoded for 2 SUBSTRs.
Tags: Database
Similar Questions
-
How to create a file of length fixed
Can someone suggest a simple technique to create fixed-length files? CSV and delimited files is quite simple using CFFILE. Is there an elegant way to create fixed-length files?Simple: use LJustify() or RJustify() on your data lines.
FOR EXAMPLE:
-
How to extract the number and other particulars
I am trying to write a simple Select query that returns a list of
Used EMPLOYEE_TABLE and in the second column names a count of the
number of entries for each employee in the EMPLOYEE_ATTENDANCE table.
Can anyone suggest how I might do this?
For example:
I have two tables EMPLOYEE_TABLE and EMPLOYEE_ATTENDENCE.
EMPLOYEE_TABLE:
emp_number emp_name
1A
2B
3 C
4 D
EMPLOYEE_ATTENDENCE:
emp_number emp_time
1 8.00
1 8.00
1 8.00
4 8.00
4 9.00
4
4
4
3
3
3
2
Now my requirement is I want to retrieve the list of employees with emp_name and the number of days
the employee came (ie the number of entries in the EMPLOYEE_ATTENDENCE table).
Some, such as:
A 3
B 1
A q
D 5Select
a.emp_name, b.emp_attendence
Of
Employee_Name has,
(select emp_number, count (emp_number) "emp_attendence" of the employee_attendence by employee_number group) b
where a.emp_number = b.emp_number;Kind regards
Navneet -
How to extract 3 or n - th element of a string separated by commas
Hello
Let's say I have a string "oracle, java, .net, perl, basic, html.
and I want to extract the 4th item.
Please guide me
Thanks in advanceTry this
http://nimishgarg.blogspot.com/2010/06/Oracle-nth-record-from-comma-seprated.html
for example:
SELECT REGEXP_SUBSTR(MYCOL, '[^,]+', 1, *4*) AS VAL
Of
(
SELECT 'oracle, java, .net, perl, basic, html.
AS DOUBLE MYCOL.
)Alexander gelin
http://nimishgarg.blogspot.com/ -
How to extract the date of birth of the employee Table
Hi experts,
I'm new to SQL, help for my problem Pls
I saw an employee table
CREATE TABLE 'NIM_EMP '.
(VARCHAR2 (20) "EMP_NO")
"EMP_NAME' VARCHAR2 (100),
VARCHAR2 (50) "EMP_DESIG."
'HIRE_DATE' DATE,
NUMBER OF "EMP_SAL."
NUMBER OF "EMP_DEPT."
DATE OF THE "DATE OF BIRTH".
) ;
with data is as
Emp_No - 203
EMP_Name - Thérèse
EMP_Desg - system administrator
HIRE_Date - 10/12/2011
EMP_SAL - 25000
EMP_DEPT - 10
DATE OF BIRTH - 09/02/1987
Problem-1 - I want to show the birthday information to all users, because "it is today the anniversary of Mr.Upendran as - 25 years"
Problem-2 - "today, Mr. Upendran is completed a year of Service in our concern" (this is based on the Date of HIRING)
How to extract data from SQl
Thanks in advance,
Thérèse913370, you are right in both cases. I have corrected my code for the raw material.
The second question may be fixed, because there is no sex information in the table. -
I got a phone call from a person claiming to be from the care team of the windows service how they got my number and I took his number, I think it's fake
Hello
There are telephone directories, etc., etc.
It's a SCAM
they want or money on your part for programs without value or make an identity theft on you to get even more money and get your internet banking passwords and credit card information, you get allows you to download the software to 'fix' or 'test' for your computer
read this:
http://www.Microsoft.com/security/online-privacy/msName.aspx
Microsoft has none of the unsolicited telephone calls to help you fix your computer
In this type of scam cybercriminals are calling you and claim to be of Support technique Microsoft. They offer help with your computer problems. Once scammers have earned your trust, they try to steal and damage your computer with malicious software, including viruses and spyware.
Although the law enforcement can trace phone numbers, often authors use pay telephones, disposable cell phones or stolen cellular phone numbers. Better avoid fooling themselves rather than try to repair the damage afterwards.
Treat all unsolicited sceptically telephone calls. Don't provide personal information.
If you receive an unsolicited call from someone who claims to be from Technical Support Microsoft, hang up. We do not have such calls.
If you think you might be a victim of fraud, you can report it. For more information, see: what to do if you think you have been scammed.
-
How can I find number of objects in a layer?
I have a document with hundreds of layers. I want to delete the specific purpose of layers. I iterate through all the layers, but I couldn't iterate over objects within a single layer to find that specific object.
I there a way I can go through all objects in the layer?
or
How can I find number of objects in a layer?
I'm going through the API documents but could not find.
Here is the code I wrote,
var artLayer = undefined; if(app.documents.length == 0) { app.documents.add(); } var myDocument = app.activeDocument; var layerCount = myDocument.layers.length; for (var index = layerCount - 1; index >= 0; index-- ) { var targetLayer = myDocument.layers[index]; var layerName = new String( targetLayer.name ); if(layerName == "Colorways") { artLayer = myDocument.layers[index]; //Can I iterate through objects in a layer?? // for(var newIndex = 0; newIndex < artLayer.items.length;newIndex++) // { // Need something like this // } break; } }
instead of points, you should use "pageItems.
for (newIndex var = 0; newIndex)< artlayer.items.length;newindex++)="" there="" is="" no="" "items"="">
for (newIndex var = 0; newIndex)<>
or as in your second post, instead of the activeDocument, target your layer
index
index
-
How to get and set the length and the width of the content of the layer?
How to get and set the length and the width of the content of the layer
All layers are packed not equal. a layer as adjustment have no limits. Layer to smart object can have two different sizes. The size of the object and the size of the object may be transformed. All smart object layers have an associated transform. To transform a smart object layers you need to work with the size of the object the generated pixels fot the layer. Text layer can be resized with a transform or by changing the font size. Pixelated layers are resize via a transformation. The script method is resize. When you resize the number of pixelsits made by interpolation. You can specify what method to use or set Photoshop interpolation preferably by default.
There is also a bug in Photoshop scripts if you pause the story said make a selection and use resize. Photoshop will properly support up to a State before where you suspended history. This bug seems to be in all versions of Photoshop.
If you look ate the script in my bug report, you should get a good idea of how to resize a layer.
Photoshop: Bug Script resize the rear paper folded to a history State
-
Procedure to another procedure call, how to extract values
I have couple of procedure in a package and I try to call proceedings in procedureb.
How to extract the values of proceedings in ProcedureB? And also I want to get only columns A and B in ProcedureB.TYPE T_CURSOR IS REF CURSOR; PROCEDURE ProcedureA (acct IN number, o_cur OUT T_CURSOR) AS BEGIN Open o_cur for SELECT A, B, C, D, E, F FROM DEMO; END ProcedureA PROCEDURE ProcedureB (param1 IN number, param2 IN number) AS get_cursor T_CURSOR; BEGIN ProcedureA(111, get_cursor); END;
>
How to extract the values of proceedings in ProcedureB?
>
Try something like thisTYPE rectype IS RECORD (colA demo.a%TYPE, colB demo.b%TYPE ); rec1 rectype; LOOP FETCH get_cursor INTO rec1; EXIT WHEN get_cursor%NOTFOUND; DBMS_OUTPUT.PUT_LINE(rec1.colA); END LOOP; DBMS_OUTPUT.PUT_LINE('end test');
-
How to detect the number of created quickobjects
How to detect the number of quickobjects created? quickobject are quickbox2d.
Basically, I have a timer that will countdown to 4 seconds and it will create a falling ball, it will get removed when she falls down. However, I want only there so that if more than 5 bullets are in step, it will cease to create until it is less than 5 to start creating some balls again. Is there a way I can do?
It's the timer to create the ball
If (! _ballCreation_timer) {}
_ballCreation_timer = new timer (4000);
_ballCreation_timer.addEventListener (TimerEvent.TIMER, _onBallCreationTimer);
}
_ballCreation_timer. Start();
Function which create the ball based on clock
function _onBallCreationTimer (e:TimerEvent): void {}
_doCreateNewBall();
}
function _doCreateNewBall() {}
_ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});
MAKE A LIST OF BALLS
_balls_array.push (_ball_quickobject);
}
This is the part where if the table (QuickObject) ball falls down and are destroyed
addEventListener (Event.ENTER_FRAME, _onEnterFrame);
DRAW EACH BALL FALLING OUT OF THE SCREEN
function _onEnterFrame (aEvent: Event): void {}
for each (var quickObject: QuickObject in _balls_array) {}
BALL FALLING OUT OF THE SCREEN?
If (quickObject.y / PHYSICS_SCALE > 1080) {}
_doHandleBallOffScreen (quickObject);
}
}
}
DESTROY THE BALL FALL OFF THE SCREEN IF
function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}
DESTROY THE OBJECT
aQuickObject.destroy ();
REMOVE FROM THE CUSTOM TABLE
_balls_array.splice (_balls_array.indexOf (aQuickObject), 1);
}
check the length of _balls_array. If it is greater than 5, do not create another bullet:
If (! _ballCreation_timer) {}
_ballCreation_timer = new timer (4000);
_ballCreation_timer.addEventListener (IMER TimerEvent.T, _onBallCreationTimer);
}
_ballCreation_timer. Start();
Function which create the ball based on clock
function _onBallCreationTimer (e:TimerEvent): void {}
_doCreateNewBall();
}
function _doCreateNewBall() {}
If (_balls_array.length<>
_ball_quickobject = sim.addCircle ({x: PHYSICS_SCALE * (960), y: PHYSICS_SCALE * (10), RADIUS: 0.5, draggable: false});
MAKE A LIST OF BALLS
_balls_array.push (_ball_quickobject);
}
}
This is the part where if the table (QuickObject) ball falls down and are destroyed
addEventListener (Event.ENTER_FRAME, _onEnterFrame);
DRAW EACH BALL FALLING OUT OF THE SCREEN
function _onEnterFrame (aEvent: Event): void {}
for each (var quickObject: QuickObject in _balls_array) {}
BALL FALLING OUT OF THE SCREEN?
If (quickObject.y / PHYSICS_SCALE > 1080) {}
_doHandleBallOffScreen (quickObject);
}
}
}
DESTROY THE BALL FALL OFF THE SCREEN IF
function _doHandleBallOffScreen (aQuickObject: QuickObject): void {}
DESTROY THE OBJECT
aQuickObject.destroy ();
REMOVE FROM THE CUSTOM TABLE
_balls_array.splice (_balls_array.indexOf (aQuickObject), 1);
}
-
How to change the number of minutes for the exercise of the activity of the application
How to change the number of minutes for the exercise of the activity of the application
Hello
It is not currently possible to change the goal of daily exercise.
If you want to suggest that Apple consider adding this option, you can submit a request here:
-
How to adjust the number of rings on 6s before answering iPhone begins
How to adjust the number of rings on iPhone 6s before the beginning of voicemail?
Contact your operator. That is controlled by them. It is not based on the number of rings, it is based on time.
-
How to set the number of e-mail messages that are stored on my iPhone
How to set the number of e-mail messages that are stored on my iPhone – so when I don't have a network connection I can see a 'large' number of messages in my Inbox etc.
This is series is not defined in the world
You must go to settings-> mail, contacts, and calendars and check the settings of your e-mail provider offers in this area
-
Hi, how can I find number emei of stolen iPad that I erased remotely
Hi, how can I find number EMEI of my stolen iPad that I erased remotely
Conny, check down here. It's the only way.
Find the serial number or IMEI on your iPhone, iPad or iPod touch - Apple Support
-
How to increase the number of addresses in the BCC field?
How to increase the number of addresses in the BCC of email field?
What do you mean by increase in the number of addresses? The CCC line will continue to accept addresses that you add them in there. Keep just by typing in the addresses separated by a semi colon ";
Maybe you are looking for
-
Lost all my camera settings!
Hello everyone, this morning that I went on my laptop and I had a weird msg saying that something happened with my setting? The DIF is now that I've lost all the settings and my stuff! Any help? [Edited by: admin]
-
Pavilion p6 series: PCI Simple Communications Controller Driver
Hello I am getting following error message: Ethernet controller PCI\VEN_10EC & DEV_8168 & SUBSYS_2ABF103C & REV_06 PCI\VEN_10EC & DEV_8168 & SUBSYS_2ABF103C PCI\VEN_10EC & DEV_8168 & CC_020000 PCI\VEN_10EC & DEV_8168 & CC_0200 PCI Simple Communicatio
-
I kept getting the hpConnectionManager.exe error message: could not load the assembly CaslShared, 3.5.1.1, Culture = neutral, PublicKey = Version, Token = 9c6f83d5b7f3d097 the application will now exit. Since I started to get the message across, my
-
Problems when installing a driver for my scanner
Hello! I have serious problems when you try to install a driver for my scanner - Epson Perfection V700 - on my desk. It was installed earlier, but after a reinstall of XP Pro (SP3), it seems impossible to install it again. Whenever I get an errormess
-
How can I not if my cd rom is enabled or disabled
It will not read my dics.