Select Query: Part of the field
Hello Experts,
I have an issue.
In my selection from one table T1, i need to select just lines that have the field F1 begins by some numbers. For example, all lines that have the field F1 like that '12345678xxxxx'.
The problem is: in my selection i can't use 'Like %' or a range with Option 'CP' because the field F1 is a DECIMAL and not a CHAR!!
In the fact, the field is in the format: 'AAAAMMJJhhmmss', and i want all lines that have the date 'AAAAMMJJ' irrespective of the hour. The type of this field is DECIMAL 15.
Do you have any idea how i can do it?
Thank you in advance.
Could you try to get all data say between 20081211000000 and 20081211235959 ?
This may work to solve your problem.
Similar Messages
-
Report query not returning the field value from external table
hi
I have an issue regarding reports. I have a query having 4 fields from external table and remaining from db tables. the report query returns all the fields from the db tables and only 2 fields from external table. but the same query if I tried in plsql developer it returns all the fields values.
Can anyone please help me in this issue.
Thanks and Regards
kkDuplicate post?
value not displaying in report whereas it returns in plsql developer
value not displaying in report whereas it returns in plsql developer
Please log a SR if you do not get any reply to your thread instead of creating new one.
Thanks,
Hussein -
After installing Maverics i can no longer propertly edit my work as I cannot mark different parts of text using cmd button. Shift works as before for highlighting all the text from starting point to selected point but I can no longer use cmd to highlight different areas of the text. Is this an OS bug? Or was the button for selecting different parts of the text changed? I tried everything...
It's just a small part of what makes Pages 5 so "stunning" (Apple's word). You think stripping out the nifty ability to mark non-contiguous passages of text was neat? Sure that was nice. But Apple has gotten rid of more, so much more. And for free!
Just wait till you put the product through its paces and you discover other nice features that are missing, such as (but not limited to):
- no linking of text boxes! Yes, that's right. Now a newsletter that had a "continued on page 6" or whatever will be broken by Pages 5. Stunning! (Even more stunning, Pages 5 will strip out all sorts of formatting from documents created with Pages 4.3 and it will do ao without warning and will save the document in a NEW unified file format so that it cannot be opened by Pages 4.3, thereby potentially losing users hours and hours of work. Stunning!
There's more!
- Pages 5 has no mail merge, no bookmarks, no images in headers/footers! Pages 4.3 has those features, but this stunning new release removes them.
- Pages 5 features vastly reduced and simplified set of templates (there used to be about 130 Apple-cupplied templates, now there are about 60).
- Page 5 also boasts NO RTF SUPPORT, so a paper your wrote with Apple's own TextEdit is not natively readable with Pages: Stunning!
- No detail was too small to omit in this stunning new release: the vertical ruler, so you can easily place text or an obejct at a certain place in a document: gone! Setting the default zoom: gone! Status bar reproting word count and pagecount (e.g., Page 4 of 48): Gone! View comments in the left side bar: Gone! Autocapitalization: Gone! Search & Replace: drastically simplified!
But here's the really good news: Pages 5 is just PERFECT for creating a one page-poster advertising a new concert by Apple employee Eddie Cue. What's more you can collaborate on it with someone else, even if they're using a PC. Now that's "stunning"! -
Tell me select Query that HITs the database Directly ???
Hi,
I have a table, for this table in the Techinical Setttings I selected Buffering allowed, and buffering type is Full Bufferd.Now, I want a Select Query which hits the database directly, without fetching records from the BUFFER.
Except using SELECT BYPASSING BUFFER query ????
Regards,
V.Raghavender.hi,
· Any SELECT with a sub query or with joins
· Any set function (COUNT, MIN, MAX, SUM, AVG)
· GROUP BY
· HAVING
· SELECT DISTINCT
· ORDER BY
Examples:
SELECT /*@ SAP BYPASSING BUFFER */ * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ?
SELECT * FROM MYTAB WHERE KEY1 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? OR KEY1 = ?
SELECT MAX(DATA) FROM MYTAB WHERE KEY1 = ? KEY2 = ?
SELECT * FROM MYTAB
WHERE KEY1 = ? AND KEY2 = ? AND DATA =
(SELECT DATA FROM MYTAB WHERE KEY1 = ? AND KEY2 = ?)
if helpful pls award points.
sri -
Mass changing for accrual object assignments part of the field profit_ctr
Hi Experts,
Does any one know about mass changing for accrual object assignments part of the field profit_ctr (profit center).
How can we do this?
Best Regarts.Hi,
I have equal problem. How did you save him?
Regards,Irena -
Creating a dynamic query by choosing the field and getting the report
Hi,
Is there a way to create a report by allowing the user to choose a field from the table and design a query based on that field.
Ex In a table students with fields
(StudentNo, StudentName,Age,Qualification,Hobbies, PlaceofBirth)
Is it possible to generate a query
select * from students where Hobbies=programming;
where the user can be given the option of selecting the field and the value (Hobbies, programming), the query is generated for that, then the report is designed for that query. How could the query be generated?
Regards,
ReshmaYou sure can ;)
Here's an example.
You can create a JComboBox and have the different categories of hobbies in there and then use ActionListener on the JcomboBox.
The code will be something like this
public void actionPerformed(ActionEvent ae)
if(ae.getSource()==combo) //assuming the JComboBox object is combo
String query=new String("");
String st = combo.getSelectedItem().toString();
Connection connection=DriverManager.getConnection("jdbc:odbc:DSN","user","password");
Statement stmt=connection.createStatement();
String qry="SELECT * FROM tablename WHERE hobby=";
String query=qry+st;
ResultSet rs=stmt.execute(query); //Then do whatever you want with the ResultSet object
} -
Crystal: Hide part of the field
Hi there,
I need to hide part of the contents of a field, as shown in the example below:
Field Example: Description (remarks)
For the above example, I need to hide the information that come after the parentheses = (remarks). Only the Description should be displayed.
Thanks in advance.
Kind Regards,Create a formula like this and use it on the report instead of the field:
Split({MyTable.MyField}, '(')[1]
"Split" will split the text from the field into an array based on where the "(" is and "[1]" will give you the first element in the array which will be all of the text prior to "(".
-Dell -
Show Select query result in the text file.
Hi all,
i want to show my select statment records in the text file.
thanks in advance.
Mob.you cannot do a select in a stored procedure.
you could do something like
SQL> set serverout on
SQL> spool output.txt
SQL> declare
x varchar2(40);
begin
select * into x from dual;
dbms_output.put_line(x);
end;
X
SQL> spool offor use the utl_file package (more powerfull, less secure, write on the db-server instead of the sqlplus-client) -
Perticular select query is throwing the error..
Hi all,
i am trying to get the ffew feilds with the count of one specific feild called as bpartner but the cursor doesnot move inside the select and directly going to the message and thowing the message as output..
can u please check it out and let me know where i have to change the query....and if the code whatever is written is right or not....
thanks in advance,,,
REPORT ZDISTRICT_CUST_AUCSALES00.
TABLES: /BIC/AUCSALES00,
/BIC/TCOKEY.
DATA: BEGIN OF ITAB OCCURS 0,
BILL_DATE LIKE /BIC/AUCSALES00-BILL_DATE,
/BIC/COKEY LIKE /BIC/AUCSALES00-/BIC/COKEY,
BPARTNER LIKE /BIC/AUCSALES00-BPARTNER,
TXTSH LIKE /BIC/TCOKEY-TXTSH,
CUSTOMER TYPE I,
END OF ITAB.
DATA: BILDT LIKE /BIC/AUCSALES00-BILL_DATE.
SELECT-OPTIONS: S_BILDT FOR /BIC/AUCSALES00-BILL_DATE.
**AT SELECTION-SCREEN.
IF NOT s_bildt IS INITIAL.
write:/ 'please enter a value'.
SELECT * FROM /BIC/AUCSALES00
INTO BILDT
WHERE BILL_DATE EQ S_BILDT.
ENDIF.
IF SY-SUBRC <> 0.
WRITE:/ 'please enter a '.
MESSAGE E010 WITH 'NOT A VALID DATE'(003) S_BILL_DATE 'Found'(004).
ENDIF.
<b>SELECT A~BILL_DATE
A~/BIC/COKEY
A~BPARTNER
COUNT( DISTINCT A~BPARTNER )
B~TXTSH
INTO (BILL_DATE, COKEY, BPARTNER, COUNT, TXTSH)
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM /BIC/AUCSALES00 AS A INNER JOIN /BIC/TCOKEY AS B
ON A/BIC/COKEY = B/BIC/COKEY
WHERE BILL_DATE = S_BILDT
A/BIC/COKEY = B/BIC/COKEY
GROUP BY ABILL_DATE A/BIC/COKEY ABPARTNER BTXTSH
ORDER BY A~/BIC/COKEY.
ENDSELECT.</b>
<i>IF SY-SUBRC NE 0.
WRITE:/ 'doesnot contain any data'.
ENDIF.</i>
LOOP AT ITAB.
WRITE:/ SY-VLINE, ITAB-BILL_DATE,
15 SY-VLINE, ITAB-/BIC/COKEY,
30 SY-VLINE, ITAB-TXTSH,
45 SY-VLINE, ITAB-CUSTOMER,
60 SY-VLINE.
ULINE /(60).
AT END OF BPARTNER.
SUM.
WRITE:/45 'TOTAL NUMBER OF CUSTOMER:',45 ITAB-CUSTOMER.
ENDAT.Hi,
Try like this,
SELECT A~BILL_DATE
A~/BIC/COKEY
A~BPARTNER
COUNT( DISTINCT A~BPARTNER )
B~TXTSH
INTO (BILL_DATE, COKEY, BPARTNER, COUNT, TXTSH)
INTO CORRESPONDING FIELDS OF TABLE ITAB
FROM /BIC/AUCSALES00 AS A INNER JOIN /BIC/TCOKEY AS B
ON A/BIC/COKEY = B/BIC/COKEY
WHERE BILL_DATE<b> IN</b> S_BILDT
A/BIC/COKEY = B/BIC/COKEY
GROUP BY ABILL_DATE A/BIC/COKEY ABPARTNER BTXTSH
ORDER BY A~/BIC/COKEY.
ENDSELECT.
<b>
Regards,
Azhar</b> -
SELECT Query to get the Values in Case insensitive Format
Hi ,
This is hari,
I want to select the user name in a table ex: username="HARI" or username='Hari' or username="HaRi" like this
If i wrote the query like
select username from userdb where username="Hari";
it is displaying the records which only matches "Hari" only .
can anybody help me out on this query asap please....
the query should return all the results
which matches any of the following strings as inputs "HARI" or "HaRi" or "hAri" or the like.
Awaiting for Response,
Thanks & Regards
HariAnother solution is setting NLS_SORT to CI - case insensitive (or whatever_your_language_is_CI) and NLS_COMP to ANSI:
SQL> with t as (
2 select 'HARI' name from dual union all
3 select 'Hari' name from dual union all
4 select 'HaRi' name from dual
5 )
6 select *
7 from t
8 where name = 'hArI'
9 /
no rows selected
SQL> alter session set nls_sort = binary_ci
2 /
Session altered.
SQL> alter session set nls_comp=ansi
2 /
Session altered.
SQL> with t as (
2 select 'HARI' name from dual union all
3 select 'Hari' name from dual union all
4 select 'HaRi' name from dual
5 )
6 select *
7 from t
8 where name = 'hArI'
9 /
NAME
HARI
Hari
HaRi
SQL> SY. -
How to write select query for all the user tables in database
Can any one tell me how to select the columns from all the user tables in a database
Here I had 3columns as input...
1.phone no
2.memberid
3.sub no.
I have to select call time,record,agn from all the tables in a database...all database tables have the same column names but some may have additional columns..
Eg: select call time, record,agn from ah_t_table where phone no= 6186759765,memberid=j34563298
Query has to execute not only for this table but for all user tables in the database..all tables will start with ah_t
I am trying for this query since 30days...
Help me please....any kind of help is appreciated.....Hi,
user13113704 wrote:
... i need to include the symbol (') for the numbers(values) to get selected..
eg: phone no= '6284056879'To include a single-quote in a string literal, use 2 or them in a row, as shown below.
Starting in Oracle 10, you can also use Q-notation:
http://download.oracle.com/docs/cd/E11882_01/server.112/e17118/sql_elements003.htm#i42617
...and also can you tell me how to execute the output of this script. What front end are you using? If it's SQL*Plus, then you can SPOOL the query to a file, and then execute that file, like this:
-- Suppress SQL*Plus features that interfere with raw output
SET FEEDBACK OFF
SET PAGESIZE 0
-- Run preliminary query to generate main query
SPOOL c:\my_sql_dir\all_ah_t.sql
SELECT 'select call time, record, agn from '
|| owner
|| '.'
|| table_name
|| ' where phone_no = ''6186759765'' and memberid = j34563298'
|| CASE
WHEN ROW_NUMBER () OVER ( ORDER BY owner DESC
, table_name DESC
) = 1
THEN ';'
ELSE ' UNION ALL'
END AS txt
FROM all_tables
WHERE SUBSTR (table_name, 1, 4) = 'AH_T'
ORDER BY owner
, table_name
SPOOL OFF
-- Restore SQL*Plus features that interfere with raw output (if desired)
SET FEEDBACK ON
SET PAGESIZE 50
-- Run main query:
@c:\my_sql_dir\all_ah_t.sql
so that i form a temporary view for this script as a table(or store the result in a temp table) and my problem will be solved..Sorry, I don't understand. What is a "temporary view"? -
Query to split the field value
Hi all
In employees table I am having employee_name column data as follows
Aaron, Mrs. Jamie (Jamie)
Aaron, Mrs. Jenette (Jenette)
Abbott, Ms. Rachel (Rachel)
Breton, Mr. Jean
Britz, Mrs. Sarie (Sarie)
--> Now, I want to display the employee name like "Mrs. Jamie" (with out Surname and with out bracket included text),
--> How to achieve this by SQL query. Help me out plz
Thanks in Advance
JagadeeshNeed more sample cases:
One way (without regexp).
WITH t AS
(SELECT 'Aaron, Mrs. Jamie (Jamie)' str FROM DUAL
UNION ALL
SELECT 'Aaron, Mrs. Jenette (Jenette)' FROM DUAL
UNION ALL
SELECT 'Abbott, Ms. Rachel (Rachel)' FROM DUAL
UNION ALL
SELECT 'Breton, Mr. Jean' FROM DUAL
UNION ALL
SELECT 'Britz, Mrs. Sarie (Sarie)' FROM DUAL)
SELECT CASE
WHEN INSTR (str, '(') > 0 THEN
SUBSTR (str,
INSTR (str, ',') + 2,
INSTR (str, '.') - INSTR (str, ',') - 1)
|| ' '
|| SUBSTR (str,
INSTR (str, '(') + 1,
LENGTH (str) - INSTR (str, '(') - 1)
ELSE
SUBSTR (str, INSTR (str, ',') + 2)
END
str
FROM t;
Output:
STR
Mrs. Jamie
Mrs. Jenette
Ms. Rachel
Mr. Jean
Mrs. Sarie
Cheers,
Manik -
SAP_BS_FND addon was not selected as part of the stack xml
We are in a process of upgrading production system (SAP NW 7.0) to EhP1, we
have components SEM-BW,FINBASIS installed in the Netweaver system, we have added the system under Netweaver
We have generated the stack xml file using solution manager MoPZ but we are not
getting the option to select the upgrade addon SAP_BS_FND as part of
stack xml file
where in we had an option to select the SAP_BS_FND for Development
and Quality and we have included the addon SAP_BS_FND in stack xml file
my main question was why the component is not available for Production for selecting the option ??
Please suggest us how to proceed further, we have read the note Note
1326576 - SAP NetWeaver Systems Containing SAP ERP Software Components
which says to install the addon after upgrade
generating the stack file from Service Market Place too is not including the SAP_BS_FND in the stack xml
Please help why it is behaving different for production
Thanks,
Ravi
Edited by: ravi prasad on Aug 8, 2011 9:56 AMHi,
>The note says that if going with EhP1 with ERP components then it asking to register the system in Netweaver and then >upgarde the addon package with SAINT
You should read the note carefully, below is extract from this note:
Maintain your SEM, E-Recruiting or SAP Learning Management system as an ERP
system in SMSY in order to download the EHP packages and to be able to
maintain the system. Afterwards you must not use the generated Stack XML,
but instead use a generated Stack XML from SAP Service Marketplace and
include the packages for ERECRUIT, SEM-BW, FINBASIS or LSOFE in the
IS_SELECT phase during the installation of EHP1 for SAP NetWeaver 7.0.
Thanks
Sunny -
Spry Table - way to select only parts of the dataset to be displayed?
I have been enjoying putting together a simple spry table (DW CS3) that pulls data from an xml file. At this point when the table loads it pulls all rows from the dataset and displays them in the table. My question: is it possible to create a link or some way to pull only certain rows to be displayed. For instance if the data was about donuts and included, 4 chocolate, 6 glazed and 5 plain, is there a way to only display the 6 glazed? I have thirty rows of data and it is just a bit too much for people to be able to go through with ease and would love to have the ability to "sort" by asking for only certain types of data and then having those types displayed.
Is there a way to do this?
Thanks
TomYou can apply filters to your data set.
These samples might help you out:
Filtering with XPath
Multiple Non-Destructive Filters
Multiple Non-Destructive Filters Mode
Non-destructive Filter
XPath filtering with URL Params
URL Utils with Spry Data
Hopes this helps -
Hi,
I have a select query like this.
select vbakvbeln posnr vkorg vbakauart kunnr matnr edatu kdgrp
kvgr3 kvgr4 bsark
from ztsddelividx
inner join vbak on ztsddelividxvbeln = vbakvbeln
inner join tvak on vbakauart = tvakauart
into table rt_delividx
where spart_i = rp_spart and
edatu in ro_date and
vkorg in ro_vkorg and
werks in ro_werks and
matnr in ro_matnr and
ztsddelividx~auart in ro_auart and
kunnr in ro_kunnr and
stgak = c_stgak.
This select query is from a program in production and is working fine. But I want to know from which tables this select query is fetching the fields posnr vkorg kunnr matnr edatu kdgrp kvgr3 kvgr4 bsark .
I checked the Z table ztsddelividx. But to my surprise the fields vkorg kunnr kvgr3 kvgr4 bsark are not there in this Z table.
I want to know from which tables this select query is fetching the fields posnr vkorg kunnr matnr edatu kdgrp kvgr3 kvgr4 bsark .
Thanks in advance.
Brahma ReddyGo for a ST05 trace and check out the select statement that is being executed and built from ABAP open SQL. I hope you will get the solution. By the way, whats the SAP version you are using?
Maybe you are looking for
-
HP 3050 - Cant Connect To Anything Via Wireless
I am very baffled as to what is going on this is how my computers are connected.... My main PC is connected to my router via an ethernet cable My 2 laptops are connected via wireless They arn't in a network so to speak as in they see and share files
-
Best way to update a solaris jumpstart OS image.
Hi all,. Ive been recently building some v240's but have run into trouble with the rather out of date 02/02 instance of Solaris 8 (yes, i did say solaris 8 - it's a political thing..) Anyhow, I have cd images of Solaris 8 02/04 and have a copy of the
-
Create supplier button not visible
Hi Gurus We are running r12 on solaris 5.10. We have one custom responsibility "KGL AP Superuser". Previously we had a option of "Create Supplier" option under KGL AP Superuser--> supplier --> Entry. Now that option is not visible. But It is there is
-
Hi, I have tried to add an enum type to my app but the IDE shows an error! Unexpected token identifier. My JDeveloper version is 10.1.3 and the Java platform component version is 1.5.6 Any ideas? Thanks in advance.
-
Need serial number--CD sleeve is blank, just upc codes on box
CD sleeves are blank UPC codes and PN code on box