Need help with SUBSTR
Hi allCane, we used the nested SUBSTR functions? The reason is that I rendered as 'VDAT-ADistrict1', 'VDAT-BDist2 '... "VDAT-FDistrict6. What I want, it's just ' a ',' B', 'C', would be ', 'E', 'F' The problem here is in some cases, it is 'District' and in some cases its 'Dist', also how to get rid of VDAT and the rear after A, B, C, D, E and F? Please advice are greatly appreciated.
Thank you
Hello
Try this: SUBSTR (DEPT2, 6, INSTR(DEPT2,'Dist')-7)
He finds the presence of the phrase Dist and everything returns posted 6 until this sentence.
It will also work: SUBSTR (DEPT2, 6, INSTR(DEPT2,' ')-6)
The second seeks the character space in the string and returns all posted to 6 up to this space character.
If you do not already have a copy of my Oracle Discoverer 10g manual I would suggest that get you a? One of the appendices contains a breakdown of all the features available in Discoverer and examples of work of most of them.
Best wishes
Michael
Tags: Business Intelligence
Similar Questions
-
Need help with Substr and Instr
I have a request
Select msg
from table_a
She returned as log messages below
Continued in logid = > 241153 < for oid = > 1621 <, GoC = > 795, bday = > 01.04.2013 <
If the message contains logid = > then I want to display
Continued in logid = > 241151 <
for example
case
When the msg like ' % logid = > %'
then
I tried the combinations of substr and instr, but cannot make it work
Any help appreciated
Gus
SQL >-samples:
SQL > with t as
2 (choose "continued in logid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013")<;' str="" from="" dual="" union="">;'>
3 select "continued in pid-online 241153< for="" oid="">1621<, gdc="">795, bday-online 01.04.2013"<;' str="" from="">;'>
4)
5. Select case-sensitive
6 when instr (str, 'logid') > 0
7 then substr (str
8, instr (str, ' > ', 1, 1) + 1
9, instr(str, '<', 1,="" 1)-instr(str,="" '="">', 1, 1)-1
10 )
11 another null - or what you want / need
12 end str
13 t;
STR
------------------------------------------------------------------------
241153
2 selected lines.
',>,>,> -
Having problems reading CLOB data > 32000 and thought that maybe I can load the data into 3 separate columns less than 32000 k each.
I tried to substring of a part of it first to see if it worked.
DDL
CREATE TABLE 'E406702 '. "" DSR3 ".
(
"RECORDNO' CHAR (8 BYTES),
'DOCUMENTUNIVERSALID' CHAR (32 BYTES),
"CREATIONDATE" TANK (30 BYTES),
VARCHAR2 (250 BYTE) "ETL_STATUS."
VARCHAR2 (4000 BYTE) "DSRDESCRIPTION."
VARCHAR2 (4000 BYTE) "FORM."
'REQUESTID' VARCHAR2 (4000 BYTE)
)
CONTROL FILE
DOWNLOAD THE DATA
INFILE 'DSR2DATA.txt' ' str "\r '"
ADD
IN THE DSR3 TABLE
FIELDS TERMINATED BY ' <: s: >.
(RecordNo CHAR (8),
DocumentUniversalID TANK (32),
CreationDate CHAR (30),
CHAR ETL_STATUS (250).
DSRDescription TANK (32700) "substr(:DSRDescription,1,32)."
SHAPE TANK (4000).
RequestId TANK (4000))
Doing this, that I was able to load half of my files.
Check the newspaper and saw
SQL * Loader: release 11.2.0.1.0 - Production on sea Feb 19 09:40:40 2014Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Control file: c:\mytest7\DSR3CONTROL.txt
Data file: DSR2DATA.txt
Chain of the treatment of the files option: ' str "\r '"
Bad leadership: c:\mytest7\DSR3CONTROL.bad
Discard File: none is specified
(Allow all releases)Number of loading: ALL
Number of jump: 0
Authorized errors: 50
Link table: 64 lines, maximum of 256000 bytes
Continuation of the debate: none is specified
Path used: classicsTable DSR3, loaded from every logical record.
Insert the option in effect for this table: APPENDColumn Position Len term Encl. Datatype name
------------------------------ ---------- ----- ---- ---- ---------------------
RECORDNO FIRST 8 CHARACTERS
String endpoint of: "<: s: > '"
DOCUMENTUNIVERSALID THEN 32 CHARACTERS
String endpoint of: "<: s: > '"
CREATIONDATE THEN 30 CHARACTERS
String endpoint of: "<: s: > '"
ETL_STATUS THEN 250 CHARACTERS
String endpoint of: "<: s: > '"
DSRDESCRIPTION CHARACTER THEN 32700
String endpoint of: "<: s: > '"
The SQL string for the column: 'substr(:DSRDescription,1,32) '.
TRAIN THEN 4000 CHARACTERS
String endpoint of: "<: s: > '"
REQUESTID THEN 4000 CHARACTERS
String endpoint of: "<: s: > '"value used for the parameter LINES increased from 64 to 6
Record 79: Rejected - error on the DSR3 table.
ORA-01461: can bind to a LONG value only for insert into a LONG columnRecord 82: Rejected - error on the DSR3 table.
ORA-01461: can bind to a LONG value only for insert into a LONG columnRecord 94: Rejected - error on the DSR3 table.
ORA-01461: can bind to a LONG value only for insert into a LONG columnRecording 160: Rejected - error on the DSR3 table.
What is the problem that. My goal was to make it work and then try to perform the following operations:
Change the ddl to
'DSRDESCRIPTION' CLOB,
'DSRDESCRIPTION1' CLOB,
'DSRDESCRIPTION2' CLOB,
Change the control for this file.
DSRDescription TANK (32700) "substr(:DSRDescription,1,32700)."
DSRDescription2 TANK (32700) "substr(:DSRDescription,32701,65401)."
DSRDescription3 TANK (15000) "substr(:DSRDescription,65402,80000)."
Is - this bad way to go on this subject?
If you can load data without any problem and read-only is a problem then you can use SUBSTR and concate (|) to read the entire string. Something like this:
Select substr (DSRDescription, 1, 32000) | substr (DSRDescription, 32001, 64000) | dsr3 substr(DSRDescription,64001);
or
with the data as
(
Select substr (DSRDescription, 1, 32000) in the DSRDescription of dsr3
Union of all the
Select substr (DSRDescription, 32001, 64000) in the DSRDescription1 of dsr3
Union of all the
Select substr(DSRDescription,64001) in the DSRDescription2 of dsr3
)
Select * from data;
Onkar
-
Urgent need help with String Manipulation
Hello;
I really need help with strings.
Let's say I have these channels:
\\ABC\DEF\GHI\xyz\xyz\xyz\xyz
\\ABC\DEF\GHI\xyz\
\\ABC\DEF\GHI\xyz\xyz\xyz\
\\ABC\DEF\GHI
\\ABC\DEF\GHI\
ABC/DEF/GHI/xyz/xyz/xyz/xyz
ABC/DEF/GHI/xyz /.
ABC/DEF/GHI/xyz/xyz/xyz /.
ABC/DEF/GHI
ABC/DEF/GHI.
I need to convert them using a SQL statement for:
\\ABC\DEF\GHI\xyz\ or //ABC/DEF/GHI/xyz/ according to the original management / or \. Please note that the "xyz" may be repeated zero or more times. I just need one end with a trailing / or -if she had one first.
I'm on Oracle 11.1.6 SE. I have a bunch of attempts with instr, substr and replace, but I think that regexp_replace could be better.
Any help would be GREAT! I have a whole team waiting on me.Hello.
Here is a way.
----------------------------------------------------------------------- with sample_table as ( select '\\ABC\DEF\GHI\xyz\xyz\xyz\xyz' str from dual union all select '\\ABC\DEF\GHI\xyz\' from dual union all select '\\ABC\DEF\GHI\xyz\xyz\xyz\' from dual union all select '\\ABC\DEF\GHI' from dual union all select '\\ABC\DEF\GHI\' from dual union all select '//ABC/DEF/GHI/xyz/xyz/xyz/xyz' from dual union all select '//ABC/DEF/GHI/xyz/' from dual union all select '//ABC/DEF/GHI/xyz/xyz/xyz/' from dual union all select '//ABC/DEF/GHI' from dual union all select '//ABC/DEF/GHI/' from dual ) select str, regexp_replace(str,'(xyz([/\])*)+$','\1') new_str from sample_table; STR NEW_STR ------------------------------ ------------------------------ \\ABC\DEF\GHI\xyz\xyz\xyz\xyz \\ABC\DEF\GHI\xyz \\ABC\DEF\GHI\xyz\ \\ABC\DEF\GHI\xyz\ \\ABC\DEF\GHI\xyz\xyz\xyz\ \\ABC\DEF\GHI\xyz\ \\ABC\DEF\GHI \\ABC\DEF\GHI \\ABC\DEF\GHI\ \\ABC\DEF\GHI\ //ABC/DEF/GHI/xyz/xyz/xyz/xyz //ABC/DEF/GHI/xyz //ABC/DEF/GHI/xyz/ //ABC/DEF/GHI/xyz/ //ABC/DEF/GHI/xyz/xyz/xyz/ //ABC/DEF/GHI/xyz/ //ABC/DEF/GHI //ABC/DEF/GHI //ABC/DEF/GHI/ //ABC/DEF/GHI/
Kind regards.
-
Need help with Flash - really basic!
Hi, I really need help with Flash and quick. I have to create an auto-run cd, but before I can create that, I have to make everything works! I took a class in College Flash, which up to 1 1/2 ago so im kind of knowledge missing!
My first problem is as follows:
I have the homepage, and it contains a button English and french.
When you click on buttons, it brings you to the next page, either resourcesFr or resourcesEn.
I tried to use the loadMovie script but and it works but the new page loads on the home page you can still see the English/french under buttons. How can I fix? I know its simple but I am short on time... Should I still use the loadMovie script?
My other problem is that im trying to have another button to link to a folder. Use the script for getURL for this as well?
Help!I was able to solve my problem... it was only the forward slash that were in the wrong way... so the correct code is:
on (release) {}
DRV = _url.substr (8.1);
getURL (drv + ": / English/brochures");
}Only took me 5 days... I think I need to buy a script book action! Laughing out loud
-
I'm suddenly needing help with my browser Firefox (6.0.2)
Hello
I'm suddenly needing help with my browser Firefox (6.0.2)(OS: I use Windows XP).
When I open the browser, I don't see is a totally white screen of white, with all the toolbars at the top.
I know that my physical connections are very good: I have tested the modem, turned the pc market etc and I can also receive/send emails.
This problem started today, September 8, 2011 and has never happened before.
Is it a coincidence that Firefox itself to day before I disconnected yesterday evening? Could this be something to do with this particular new update?
I also noticed that just before I "opened" Firefox, I now get a small box indicating:
[JAVASCRIPT APPLICATION]
Handl exc in Ev: TypeError: this oRoot.enable is not a functionThis never appeared before - I hope that it offers a clue has what is wrong.
The browser not be stuck in Mode safe, said by the way.
Of course, I can't find solutions to the problem on the internet, I don't physically see all Web sites!
(A friend sends this request in my name from their pc)Any light you can throw on this problem of confusion would be much appreciated. I'd rather not have to uninstall and reinstall Firefox if possible.
If the only option is to uninstall Firefox and reinstall from your site, I'm also in trouble (I can not see the internet or download).
In this case, would you be able to send the .exe file as an attachment to my e-mail address? In the affirmative, please let me know and I'll give you more details.Thanks in advance.
One possible cause is security software (firewall) that blocks or limits Firefox or plugin-container process without informing you, possibly after the detection of changes (update) for the Firefox program.
Delete all rules for Firefox in the list of permissions in the firewall and leave your firewall again ask permission to get full unlimited access to the internet for Firefox and the plugin-container and the update process.
See:
Start Firefox in Firefox to solve the issues in Safe Mode to check if one of the extensions of the origin of the problem (switch to the DEFAULT theme: Firefox (Tools) > Add-ons > appearance/themes).
- Makes no changes on the start safe mode window.
- https://support.Mozilla.com/kb/safe+mode
-
Need help with installation on Photosmart C7280 all-in-one
I had my printer is installed and has been using the printer for 3 wireless laptops in my house. Now, I can't even find my backup drive, so I have need help with downloading the software to use my printer and also get to use wireless. I don't know what happened, but the fax for this printer is listed, but not the printer itself. Help, please!
Click here to download the software for your printer:
has chosen the appropriate operating system that corresponds to your computer and download the full software features.
-
HP laptop: need help with internet and search for things
whenever I'm on chrome internet explore google ect and go to tab it is says unknown error or no internet connection or anything and just takes me chrome ect. I need help with this im involved in a byod class and my computer won't let me on what whatever usually it just starts out black and white and the seeds I my search request
Yes it's a Windows 10 and it arrived already installed I'll take the other info now
-
Need help with the installation of an adapter of graphics Super Palit GeForce 9500GT - 512 MB - DDR2 SDRAM in a M2N68 motherboard (narra6). Should I disable the onboard graphics in the bios? When the card is installed, no VGA work outs and the PC does not start. Checked and recontroler implementation of the card in the PCI slot. PC is a desktop HP G5200uk PC. Windows 7 operating system.
Hello
The link below is a guige to install a video card in your Pc. In particular, it seems that you will have to perhaps specify the location of the new card in the bios and save this change before you install the new card - see step 4 in the guide on the link below. If your new card fits into the PCI Express x 16 slot, you will need to define PCI Express in the bios and save the changes.
http://support.HP.com/us-en/document/c01700855
Kind regards
DP - K
-
need help with my window is in thai and I don't quite understand.
How to convert to English? I tried for days but still it cannot be changed.
because I can't read thai... Please help me step by step...my pc is touchsmart 9100 windows 7 Professional.
Not a single word is in English if I go to the "region and language" to change.
Everthing is in thai in the system.
Hello
Where have you bought the PC?
What is the operating system installed?
Best regards
ERICO
-
I need help with an installation failure to interpret and troubleshoot a Setup log.
Background: A few years ago, many editors of cinema used Final Cut Pro 6 (also contained in Final Cut Studio 2) for their editing projects. Shared Apple Final Cut X uses a different format that is not compatible with FCP6. Sometimes, these editors are called to work on a few historical projects that have been published in FCP6 and need this version to run now.
Starting with OS X Lion, FCP6 would install not in Lion and thereafter.
According research by Jeremy Johnston as noted on his blog, he discovered that Apple has inserted a file in the folder CoreServices in the Library folder of the system folder that causes versions the version Final Cut Pro X (and other older Apple programs in the same situation) do not settle. He suggested changes to this file that would seek to prevent interfering with the installation of FCP6 in Lion, many users of final cut PRO 6 were successful in their efforts to install in Lion and work with it.
Later in a discussion update on installing FCP6 in Mavericks, HawaiianHippie determined that the simplest way to perform the installation of FCP6 was simply copy this file and remove it from the system folder, install FCP6 and then restore the copied file:
https://discussions.Apple.com/message/26309669#26309669
I used this method with success to install FCS2 in Yosemite:
[click on images to enlarge]
However, in my attempts to install FCS2 in El Capitan, it fails in the last 5% to install the first DVD:
First of all, I need advice on how to display an extremely large Setup log in this thread (on MacRumors, it is a method to insert a 'code' in a small box that can be the object of a scrollbar if necessary to read all along). I am unable to find such a method to post here.
Then once approved, I need help to determine which component is causing the installation to fail and perhaps this element can be omitted from the installation:
If this element is not required, then maybe FCP6 can be installed successfully without it. And if that omitted element is necessary, perhaps a manual method to install it can be determined by pacifists.
It is my goal to help those who need to install and use FCP6 on their new Macs running El Capitan.
Here is the post on MacRumors with pre-installed Setup log:
-
Need help with the port forwarding for a XBox remote Streaming
I have a router R6200v2 and need help with port forwarding.
I came across this set of instructions for setting up stream port forwarding XBox remotely from anywhere
http://kinkeadtech.com/2015/07/how-to-stream-Xbox-one-to-Windows-10-from-anywhere-with-Internet/
I have no idea when it comes to such things and I want to make sure I do it correctly without messing up my existing home network.
Port Forwarding and triggering Port pages setup look very different from what the guy uses. Can someone walk me through what I do to set up please?
Hi @varxtis,
You must enter them in the field for a start external Port and external completion Port. You will need to send individually except for the range of 49000-65000. The steps are as follows.
1. create a Service name (it could be something else that you cannot use the same service name twice. Ex. XBOX1, XBOX2 and so forth.)
2. Select the type of service (TCP, UDP or both)
3 entry 5050 times a start external Port and external endpoints.
4. Select the IP address of your XBOX.
5. Select apply.
6 do the same for other port numbers. To the beach, use 49000 for the external departure Port and for the external completion Port 65000.
Kind regards
Dexter
The community team
-
Need help with network home using Airport extreme
I need help with my home network. I'm not very aware when it comes to all things network. Here's how my network is currently set up.
Cable modem to Airport Extreme for Gigabit Switch. Cables come out of the switch to all areas of the House. I have 2 other extreme airport connected in other rooms of the House directly on the wall that dates back to the switch. I hope I am explaining that properly.
My problem is that this seems to have caused some of my connections cable does not work. When everything is configured, it has worked well. All connections in the House worked. Then we have disconnected one of the extreme airport and moved to another location in the House to have the best wifi coverage. Since that time, a lot of the ethernet wall plugs are not working. For example, when I plug in my Macbook Pro in making ethernet in my kitchen, it says connected but it has an assigned ip address and cannot connect to the internet.
Any help you can provide would be great.
I would like to get the return tech to help you to...
But it is likely that something (or someone) has tampered with the settings.
The layout is fine... but you can cause problems with the network by creating a loop.
This can happen because the AE you moved is connected wrongly... somewhere in the network it is connected to the switch again.
Or AE is set to expand wireless... It's FAKE... It will loop the network on the back main EI wireless.
Unplug the two AE you have that function as extensions...
Turning off everything else... then it works again...
Do it in this order.
Modem... Wait 2 min
AE... Wait 2 min
Switch.
Now check that the network is working properly... power of customers in various locations and make sure everything is good.
If so, then manually reset the two AE of factory and redo their installation.
-
Need help with my Y40-80? power management
I get message to the center of the Action as follows:
Compatibility problem between your power management system and Windows
Your power management system is not compatible with this version of Windows.
The name of the model of your power management system is ACPI Lenovo compatible virtual controller.
Can anyone help please. I have windows running Y40-80 8.1 is a clean install of windows 8.1 x 64 all drivers are up to this day, just need help with the question above thank you
Lenovo today released a new bios update for Y40-80 laptops, I did the update and, so far, the error message that I posted above has not appeared again so set the mite of update of the bios not sure yet, I'll keep up to date on this subject and write again soon
-
I need help with the program of Photos on my macbook pro
I use a Macbook Pro with OS of Yosemite. I really need help with the Photo program. I never really got the hang of IPhoto and now that it's a new program, I'm really confused. Where can I go to learn this without waiting for the next workshop in a local store?
Hi, I'm fighting to open same mine, making a new software update
Maybe you are looking for
-
In Firefox Hello, I was unable to successfully launch a conversation until I disabled the "AVmedia Video Capture" delivered program pre-installed on my PC in the Cyberlink DVD Suite. This program is displayed as the camera to default web instead of m
-
Container of plug-in will never less than 28 000 K (and it is the lowest). Twice he froze looking at a page of book cover images. If I listen to Pandora so that he was working, the plugin container goes up to 105 000 K (and keeps rising), while FF ca
-
Impossible to download the BIOS for Portege Z930 - 404 error
Hello My tool tempro says that there is a new BIOS for my Portege Z930.But the link does nothing. If anyone can solve this? Or have the correct link Thank youMarkus
-
OfficeJet 5740: Windows 7 Officejet 5740 prints multiple copies of Excel (2000)
Nine Officejet 5740 e-all-in-one printer connected to the Acer PC under Windows 7 Pro (64 bit) SP1. Printer driver 17.59.00.6180 Will not print multiple copies of a small document (2000) Excel (128kb) Print large files PDF and Word and several copies
-
Software AiO KODAK for C315 will not install.
All the solutions available? I tried everything I can think of, including the updated drivers.