How to get characters between quotes
Dear All,
Ther is a line in the code
lv_v_report :='abcdef'
I want to get only the characters between the two quotes i.e abcdef.
Can someone suggest me how to do this.
Regards,
Gowtham.
2 cases.
1. If we want simply omit quotes.
2. If we want to cut characters between quotes.
P.S. From Your example, I am not 100% sure, that You really want it.
But anyway
SQL>
SQL> with tab1 as
2 (select '''abcdef''' col1 from dual)
3 select replace(col1, ''''),
4 substr(col1,
5 instr(col1, '''') + 1,
6 instr(col1, '''', 1, 2) - instr(col1, '''') - 1)
7 from tab1
8 /
REPLACE(COL1,'''') SUBSTR(COL1,INSTR(COL1,'''')+1
abcdef abcdef
SQL> Regards
Dmytro
Similar Messages
-
How to get characters between tag
SQL> SELECT id, description
2 FROM mailmessagetest;
ID
DESCRIPTION
1
EXECUTION APPROVAL - <b><VALIDATION TYPE></b> execution <b><VAL. EXE. NO.></b> f
or <b><ENTITY NAME> / <ENTITY NO.></b> has been Sent to you for ApprovalDear All
i want to extract particular some data from description column
this is my expected output..
DESCRIPTION
<VALIDATION TYPE>
<VAL. EXE. NO.>
<ENTITY NAME>
<ENTITY NO.>Can someone suggest me how to do this.with t
as
select 'EXECUTION APPROVAL - <b><VALIDATION TYPE></b> execution <b><VAL. EXE. NO.></b> f or <b><ENTITY NAME> / <ENTITY NO.></b> has been Sent to you for Approval' str
from dual
select regexp_substr(str,'<[^>]*>',1,level)
from t
where regexp_substr(str,'<[^>]*>',1,level) is not null
and regexp_substr(str,'<[^>]*>',1,level) not in ('<b>','</b>')
connect by level <=length(str) -
How to get relationship between two views in the reports
How to get relationship between two views in the reports, I am doing a deletion program , it is fully relates to views , how to get relationship between them in the reports
Hi,
Please explain your question in detail...what do you want to read ?
If you want to know about the navigation links between the views then you can use APIs like
wdComponentAPI.getComponentInfo().findInWindows("windowName").getViewUsageByID("Name").getNavigationLinks();
Iterate through the navigationLinkInfo from above collection and can read the other properties .
I haven't tried the above , but it should work !!!
Regards,Anilkumar -
How to get rid of quotes in SQL?
Hi All!
Does anybody know how to get rid of quotes in
generated SQL? I don't mean manual editing.
Are there any properties controlling this
behavior (adding "" automatically)?
Thanks in advance!
Sincerely,
LevUse PreparedSatement class,
e.g.
// Where the name field is defined as char, i.e. needs quotes in SQL.
String sql = "select * from person where name = ? ";
PreparedStatement statement = connection.prepareSatement(sql);
statement.setString(1, "Bob");
statement.executeQuery();
This will get rid of hardcoding db vendor dependant quotes in your sql,
Hope this helped. -
How to get space between two values in a single cell of a table.
hello,
how to get space between two values in a single cell of a table.
thanks a lot.
kailash.sorry i got the answer.
-
How can get difference between 2 dates in the form of days
how can get difference between 2 dates in the form of days
Hi,
Check the following program:
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60.
Regards,
Bhaskar -
Can anybody tell me how to get connectivity between Personal Oracle 8.0.3 and Developer 2000 Rel 2.1 in Win 98 Environment.
I am able to install either Oracle 8 or Developer 2000 but not both, even if I use different Oracle Homes.
When I posted the same question to www.xperts.com someone wrote to me saying that a patch has to be used to get the connectivity.
I have been trying to solve the problem for last 6 months, but could not do it.
Can you please tell me how to get the connectivity or atleast tell me which version will facilitate connectivity in a stand alone PC.
Thanks and regards,
Ashok
nullFor Windows98. Worked for me, but no guarantee it will solve your problem.
1) Install Dev2K.
2) Install PO8i in a separate Oracle home.
3) Use the following for TNSNAMES.ORA in your DEV2K Home:
# C:\ORAWINKS\NETWORK\ADMIN\TNSNAMES.ORA Configuration File:C:\orawinKS\NETWORK\ADMIN\tnsnames.ora
# Generated by Oracle Net8 Assistant
EXTPROC_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC0))
(CONNECT_DATA =
(SID = PLSExtProc)
(PRESENTATION = RO)
MYORCL =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = 127.0.0.1)(PORT = 1521))
(CONNECT_DATA =
(SERVICE_NAME = ORCL)
null -
How to get days between two dates
Hi ,
How to get days between two dates.
Regards,
Ramesh.Hi Ramesh,
REPORT ZDATEDIFF.
DATA: EDAYS LIKE VTBBEWE-ATAGE,
EMONTHS LIKE VTBBEWE-ATAGE,
EYEARS LIKE VTBBEWE-ATAGE.
PARAMETERS: FROMDATE LIKE VTBBEWE-DBERVON,
TODATE LIKE VTBBEWE-DBERBIS DEFAULT SY-DATUM.
call function 'FIMA_DAYS_AND_MONTHS_AND_YEARS'
exporting
i_date_from = FROMDATE
i_date_to = TODATE
I_FLG_SEPARATE = ' '
IMPORTING
E_DAYS = EDAYS
E_MONTHS = EMONTHS
E_YEARS = EYEARS.
WRITE:/ 'Difference in Days ', EDAYS.
WRITE:/ 'Difference in Months ', EMONTHS.
WRITE:/ 'Difference in Years ', EYEARS.
INITIALIZATION.
FROMDATE = SY-DATUM - 60. -
How to get the roles/quotas
Hi all,
Db:oracle 9.2.0.6
os:solaris 8
can anyone please tell me.....how to get below details all of database users..like user roles,quotas....
userid,default tablespace,default tablespace quota,system roles,other roles,password expairy.
thanks,
kk.kk001 wrote:
Hi all,
Db:oracle 9.2.0.6
os:solaris 8
can anyone please tell me.....how to get below details all of database users..like user roles,quotas....
userid,default tablespace,default tablespace quota,system roles,other roles,password expairy.
thanks,
kk.
You can query,
-dba_users
-dba_profiles
-dba_roles
-dba_tab_privs
-etc
Cheers -
How to get diffrence between time
Dear All,
how to get the difference b/w the time.
consider 3 attributes, say initial time,final time and Difference time.
The Data type of those attributes are Timestamps.
Example :
initial time : 8.00 a.m
final time : 1.00 p.m
difference : 5.00 hrs(final time - initial time)
Thanks in advanceThe timestamps have a method .getTime()
This will return the milliseconds since January 1, 1970, 00:00:00 GMT .
So if you do
long diff = finalTime.getTime() - initialTime.getTime();diff will be the difference in milliseconds. Using that, you can calculate how many seconds/hours/days/... it is. -
How to get rid of quotes in copied hyperlinks?
I'm using Numbers to keep my hyperlinks, and suddenly discovered that it brakes them when I try to copy-paste them anywhere outside from Numbers.
For example, link in cell looks like:
(a href="link")link tex(/a)
Note: symbols < and > are replaced with ( and ).
And I can copy it normally from the field above my table.
But I need to copy more than one link at once, and the result is: "(a href=""link"")link text(/a)"
How to disable this quoting feature?Use PreparedSatement class,
e.g.
// Where the name field is defined as char, i.e. needs quotes in SQL.
String sql = "select * from person where name = ? ";
PreparedStatement statement = connection.prepareSatement(sql);
statement.setString(1, "Bob");
statement.executeQuery();
This will get rid of hardcoding db vendor dependant quotes in your sql,
Hope this helped. -
How to get a single quote in a string
this is my code, how do i get a * ' * around the :p2_marketingcode so that the result will be
and marketingcode_id LIKE 'SP09663'
i tryed something like this ||'''||:p2_marketingcode||''';
if :p2_marketingcode is not null then
q:=q||' and marketingcode_id LIKE '||:p2_marketingcode;
end if;Try:
if :p2_marketingcode is not null then
q:=q||' and marketingcode_id LIKE '''||:p2_marketingcode||'''';
end if; -
How to get characters from a line in a file ?
Hello Everybody ,
I am able to read the lines from the file using readLine( ) method.
But i do not want to read anything that comes after the character '#'
Any thing that follows a '#' character is considered as a commet in my case.
The contents of my input file are,
#Character mappings for Japanese Shift-JIS character set
#ASCII character Mapped Shift-JIS character
m 227,128,133 #Half width katakana letter small m
n 227,128,134 #Half width katakana letter small n
o 227,129,129
p 227,129,130
q 227,129,131
r 227,129,132
s 227,129,133
t 227,129,134
u 227,129,135
v 227,129,136
w 227,129,137
x 227,129,138
y 227,129,139
z 227,129,142
My code to read the contents of the file is,
import java.io.*;
class Read
public static void main(String s[])
try{
int i=0,j,l;
BufferedReader in=new BufferedReader(
new InputStreamReader(
new FileInputStream("Character.txt")));
String []str=new String[100];
while(true)
str=in.readLine();
if(str[i]==null) break;
System.out.println(str[i]);
i++;
catch(Exception e)
e.printStackTrace();
System.out.println(e);
How do i store the values within a line in the file
to two different variables
Like say,
I read the line
i get the character 'm' store it in a variable say, char ch='m' ;
and the corresponding value 227,128,133 in a String variable.
String str="227,128,133";
Please offer some suggesstions and help me out .
Any suggesstions would be welcome and very useful.
Thanks and regards
khurramIt depends on whether the format of the file will ever change. If the "rules" regarding the structure of the file are predictable, then it's fairly simple.
In the sample file, if we assume that anything that starts with # should be ignored, and all relevant lines begin with single char, followed by three comma separated integers; then you can just do the following (haven't tested this)
import java.io.*;
class Read
public static void main(String s[])
try{
// Create a Map to store the results..
Map data = new HashMap();
// We will store the actual values in an array
int[] values = null;
// Each valid line has a character
char theChar;
// Temp storage for the integer values
String[] strValues = null;
BufferedReader in=new BufferedReader(
new InputStreamReader(
new FileInputStream("Character.txt")));
String str=null;
while(true)
str=in.readLine();
if(str==null) break;
// trim to remove any spaces
str = str.trim();
theChar = str.charAt(0);
if(theChar != '#') {
// not a comment
// Split to get the int
strValues = str.substring(1, str.length()).split(",");
// We only want the first 3 tokens
values = new int[3];
for(int i = 0; i < values.length; i++) {
values[i] = Integer.parseInt(strValues);
// Now, add the results to the map
data.put(String.valueOf(theChar, values);
System.out.println(str);
catch(Exception e)
e.printStackTrace();
System.out.println(e);
This will leave you with a Map of the character mappings, keyed on the String value of the character (just because you can't store a char in a Map) -
HOW TO GET CONNECTIVITY BETWEEN PO NUMBER AND BILL OF MATERIALS
SIR
my requirement is that to print the purchase order number and the item in that po number and if that item contains any components in BOM (tcode -cs02) then to print those all components.
Ebeln and matnr is stored in ekpo table .
corresponding to that matnr how to see the component because STPO(bom item table) do not contain ebeln and matnr field.
it contains the component field ie IDNRK
SO PLEASE TELL ME HOW TO WRITE A REPORT TO DISPLAY ALL THESE THREE THINGS
po number and item inside it and if this item contains component then to display all that components .
reply as soon as possible.Hi
Pass the PO Material and Plant
<b>EKPO-MATNR and EKPO-WERKS to MAST table and take the BOM related fields
STLAN
STLNR
STLAL</b>and use them in STKO and STPO tables and get the BOM info.
Reward points if useful
Regards
Anji -
How to get days between 2 dates in jasperreports
hi All
i m not getting how to find days b/w 2 dates in jasper reports.....
here is da detail info....
i am generating jasper reports for transaction in bank
i have to get the days b/w current transaction and last transaction dats way its needed
plz any one help me to get days b/w current and previous transactions...
i m waiting for ur respone....plz.
with regards
kotreshtake a look at Calendar in the API docs.
It should give you some ideas.
If it doesn't, look harder as the answer is right there.
Maybe you are looking for
-
Hi All, I need a script that pulls only reconciled GL Accounts. Using the GL reconciliation menu, you can reconcile GL accounts for unreconciled items. But I need to see just the reconcilied items from same window. Regards
-
Date Calculating...
Guyz, I have two block on a single canvas. (Ex: Block1 and Block2) Block1 is Tubular (With Effective_date) Date Field - Database Block Block2 is Form Type (Normal) CAL_DIS Number datatype , Non database block as well. i am fetching the dates from dat
-
Using Change Layout Tab on ALV to Export to Excel
Hi Forms! I have an ALV grid that I export to excel to allow users to manipulate the data exported further. i do this by clicking change layout -> View -> 'Microsoft Excel' -> click on the template you want to use and click the check mark to export.
-
Macbook crashing completely...help!
So this is a video of what recently happened to my Macbook C2D 2,1: https://www.youtube.com/watch?v=wel2JQ9UozU&feature=youtu.be I think I tried to click on something while the macbook was still ´waking up´ out of sleep (takes very long sometimes) or
-
Hello Everyone I'm restoring a database given by client and although it shows up in the list of companies at log in,I'm unable to log in to the database.The following error occurs Your software version is not updated [130-4] Both client and me are on