SQL query - to indicate the folder lasr
Hello
SQL, example:
800 company, "AC1" acccount_type, 'C1' chno FROM dual UNION all THE
800 company, 'AC1' acccount_type, 'C2' chno FROM dual UNION all THE
800 company, 'AC2' acccount_type, 'C3' chno FROM dual UNION all THE
800 company, 'AC2' acccount_type, 'C4' chno FROM dual UNION all THE
800 company, 'AC2' acccount_type, 'C5' chno FROM dual UNION all THE
600 company, 'BC1' acccount_type, 'C1' chno FROM dual UNION all THE
600 company, 'BC1' acccount_type, 'C2' CHNO FROM dual
I want to output this way-
Compay Account_type chno hdr
AC1 800 C1 Y
AC1 800 C2 Y
AC2 800 C3 Y
AC2 800 C4 Y
AC2 C5 800 N
BC1 600 C1 Y
BC1 600 C2 N
Thank you
You mean something like this?
SQL > ed
A written file afiedt.buf1 WITH TEST ACE)
2. SELECT 800 company, account_type "AC1", "C1" chno IN double UNION ALL
3. SELECT 800 company, account_type "AC1", "C2" chno IN double UNION ALL
4. SELECT 800 company, "AC2" account_type, 'C3' chno IN double UNION ALL
5. SELECT 800 company, "AC2" account_type, 'C4' chno IN double UNION ALL
6. SELECT 800 company, "AC2" account_type, 'C5' chno IN double UNION ALL
7. SELECT 600 company, account_type "BC1", "C1" chno IN double UNION ALL
8. SELECT 600 company, account_type "BC1", "C2" double chno
9)
10. SELECT company, account_type, chno
11, case when row_number() over (partition by order of the company of account_type, chno) =.
12 count (*) over (partition by company) then "n".
13 else 'Y '.
14 end as hdr
15 TEST
16 * order by company, account_type, chno
SQL > /.
COMPANY VAC CH H
---------- --- -- -
BC1 600 C1 Y
BC1 600 C2 N
AC1 800 C1 Y
AC1 800 C2 Y
AC2 800 C3 Y
AC2 800 C4 Y
AC2 C5 800 N
7 selected lines.
Tags: Database
Similar Questions
-
Column of Outlook Express folder in find
When Outlook Express 6 detects emails from a name in the right column indicates the folder in which it is in. How can you tell which folder this folder is located in?OE does not have the capacity to tell you where the folder is located in the folder hierarchy. You can select different trees under local folders to find what subfolder is and what kind of tree it is under. Unless folders.dbx is corrupted (which happens a bit), then OE will not create folders for you. If folders.dbx is corrupt or not, I would suggest that you backup the files and the registry (see www.oehelp.com/OETips.aspx#6) before things become corrupt, because you seem to have a complex organization from your e-mail folders.
Steve
-
SQL query to display the sum of the values of each June and December
Hello having problems of construction of a query to the list SQL query to display the sum of the values of each June and December each year.
My Table;
TABLE name: MONTH_TERM
Fields with values:
TERM_KEY MONTH_ACTUAL MONTH_DATE 82 500 01/11/2015 0:00 82 450 01/12/2015 0:00 82 405 01/01/2016 0:00 82 400 01/02/2016 0:00 82 450 01/03/2016 0:00 82 425 01/04/2016 0:00 82 435 01/05/2016 0:00 82 410 06/01/2016 0:00 82 409 01/07/2016 0:00 82 415 01/08/2016 0:00 82 420 09/01/2016 0:00 82 422 10/01/2016 0:00 82 436 11/01/2016 0:00 82 556 01/12/2016 0:00 82 568 01/01/2017 0:00 82 624 02/01/2017 0:00 What I would like to see in a query result:
TERM_KEY MONTH_ACTUAL MONTH_DATE Total of 6 months 82 500 01/11/2015 0:00 82 450 01/12/2015 0:00 950 82 405 01/01/2016 0:00 82 400 01/02/2016 0:00 82 450 01/03/2016 0:00 82 425 01/04/2016 0:00 82 435 01/05/2016 0:00 82 410 06/01/2016 0:00 2525 82 409 01/07/2016 0:00 82 415 01/08/2016 0:00 82 420 09/01/2016 0:00 82 422 10/01/2016 0:00 82 436 11/01/2016 0:00 82 556 01/12/2016 0:00 2658 82 568 01/01/2017 0:00 82 624 02/01/2017 0:00 ---
Here's my query:
Select
"TERM_KEY,"
"MONTH_ACTUAL,"
to_char(MONTH_DATE,'MM/YYYY') MONTH_DATE,
DEAL to_char (MONTH_DATE, 'MM')
WHEN '06' THEN (SELECT SUM (MONTH_ACTUAL)
OF MONTH_TERM
WHERE the to_char (MONTH_DATE, 'MM') between 1 and 6
AND term_key = 82)
WHEN '12' THEN (SELECT SUM (MONTH_ACTUAL)
OF MONTH_TERM
WHERE the to_char (MONTH_DATE, 'MM') between 7 and 12
AND term_key = 82)
ELSE null
END as SIX_MO_CUMM,
of MONTH_TERM
where term_key = 82
It's my results:
TERM_KEY MONTH_ACTUAL MONTH_DATE Total of 6 months 82 500 01/11/15 0:00 82 450 01/12/15 0:00 3608 82 405 01/01/16 0:00 82 400 01/02/16 0:00 82 450 01/03/16 0:00 82 425 01/04/16 0:00 82 435 01/05/16 0:00 82 410 01/06/16 0:00 3717 82 409 01/07/16 0:00 82 415 01/08/16 0:00 82 420 01/09/16 0:00 82 422 10/01/16 0:00 82 436 01/11/16 0:00 82 556 01/12/16 0:00 3608 82 568 01/01/17 0:00 82 624 01/02/17 0:00 Any ideas on how to fix would be great
Select term_key,
month_actual,
month_date,
case mod (to_char (month_date, 'mm'), 6)
When 0 then sum (month_actual)
During)
term_key partition
order of month_date
between the previous month '5' interval and the current line
)
end '6 MONTHS in TOTAL'
from tbl
order of term_key,
month_date
/
TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
---------- ------------ --------- --------------
82 500 NOVEMBER 1ST, 15TH
82 450 1 DECEMBER 15 950
82 405 1 JANUARY 16
82 400 1 FEBRUARY 16
82 450 1ST MARCH 16
82 425 1ST APRIL 16
82 435 1 MAY 16
82 410 2525 1 JUNE 16
82 409 1 JULY 16
82 415 1ST AUGUST 16
82 420 16 - SEP - 01TERM_KEY MONTH_ACTUAL MONTH_DAT 6 MONTHS TOTAL
---------- ------------ --------- --------------
82 422 1 OCTOBER 16
82-436 NOVEMBER 1, 16
82 556 2658 1 DECEMBER 16
82 568 1 JANUARY 17
82 624 1 FEBRUARY 1716 selected lines.
SQL >
SY.
-
Hello
SQL query to find the total number of source based nonsource passangersbetween source and destination station and passenger station on the same chekindate.
Please help on this script and let me know if you need more details.
---
You use a SELECT statement. Let me know if you need more details.
-
SQL query to represent the data in the graph bar
Hello
JDev 11.1.1.5.0
We must create a dashboard to track the translation. We have created the ADF table with buttons 'Create', 'Update' and 'Delete' to manipulate the table.
Our DB table structure is
File_id (PK), File_Name, ToSpanish - ARE (YES/NO), beginning of the ToSpanish, ToChina(YES/No), ToChina-Date... etc.
Once the translated file required language then user must update the DB table using the button "Update".
So far, we have implemented the requirement above.
We need represent the status of the translation in the graph bar with the language as X access and file count get access Ex: Spanish-100 China - 200 files files
Please suggest the sql query to retrieve the necessary info from the DB table that can be represented in the graph bar. Also, it would be great, if you can provide a pointers to create a bar chart.
Thanks in advance,
MSR.
If you set your major increment and minor than 1, then you won't not show decimal points. You can try setting these 10 or 100 to reach your goal.
Subtype = "BAR_VERT_CLUST" >
-
SQL query to get the items for which transactions have not been saved
Hi people,
Have a small doubt I want to compile a SQL query in the inventory where I get these items for what transactions do not have been recorded during a period of at least one specified number of days.
The days might be 30 days or 2 months depends on. If I want to get those items for which no transactions were reported for lets say 30 days. Could someone give me an idea of how to go about this thing? I use r12. I came up with the following query, but it gives a lot of records. The commented parts of this query is only commented on
SELECT DISTINCT msi.segment1,
MSI. Description,
MSI.primary_uom_code,
MSI.inventory_item_id
MSI mtl_system_items_b / *,.
mtl_material_transactions mmt * /.
WHERE / * msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND NVL ((SELECT SUM (transaction_quantity)
OF mtl_onhand_quantities
WHERE inventory_item_id = msi.inventory_item_id),
0) = 0
AND TRUNC (mmt.transaction_date) < = SYSDATE - & D
AND * / NOT EXISTS (SELECT *)
OF mtl_material_transactions mmt
WHERE msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND TRUNC (mmt.transaction_date) < SYSDATE - & D);
Hi fatimakhellil
Try the following code and mark it as correct if your problem be resolved.
SELECT DISTINCT msi.segment1,
MSI. Description,
MSI.primary_uom_code,
MSI.inventory_item_id,
MSI.organization_id,
Ms.secondary_inventory_name,
(select max (transaction_date) in the mtl_material_transactions where msi.inventory_item_id = inventory_item_id
AND msi.organization_id = organization_id) last_transaction_date
OF mtl_system_items_b msi.
Ms. mtl_secondary_inventories
WHERE ms.organization_id (+) = msi.organization_id
AND msi.source_subinventory = ms.secondary_inventory_name (+)
AND NOT EXISTS (SELECT *)
OF mtl_material_transactions mmt
WHERE msi.inventory_item_id = mmt.inventory_item_id
AND msi.organization_id = mmt.organization_id
AND mmt.subinventory_code = ms.secondary_inventory_name
AND mmt.organization_id = ms.organization_id
AND TRUNC (mmt.transaction_date) BETWEEN TRUNC (SYSDATE - & d) AND TRUNC (SYSDATE))
-
SQL query to get the NULL records after the last matching flag
I have a xx1 table with id and flag columns. So I want the data in this table, after the last flag matched. I want that data to id 7 in the rooms. Even if the id 2,3,5 are null flag 'Y' was at 6. ID so I need a query to get the data of the xx1 table after the last correspondence flag (from 7 to 9 id).
SQL > create table xx1
2 (identification number,
3 flag varchar2 (10));
Table created.
SQL > insert into xx1 values (1, 'Y');
1 line of creation.
SQL > insert into values xx1 (2, null);
1 line of creation.
SQL > insert into values xx1 (3, null);
1 line of creation.
SQL > insert into xx1 values (4, 'Y');
1 line of creation.
SQL > insert into values xx1 (5, null);
1 line of creation.
SQL > insert into xx1 values (6, 'Y');
1 line of creation.
SQL > insert into values xx1 (7, null);
1 line of creation.
SQL > insert into values xx1 (8, null);
1 line of creation.
SQL > insert into values xx1 (9, null);
1 line of creation.
SQL > select * from xx1.
FLAG OF THE ID
---------- ----------
1. IS
2
3
4. IS
5
6. IS
7
8
9
9 selected lines.
SQL >
Hello
user11164339 wrote:
Hi Frank - when I run the query, I don't see the results data.
I get
FLAG OF THE ID
----- ----------
7
8
9
What you do differently?
-
SQL query to retrieve the same record because no. boxes
Hi all
I have a table of Bill XXINV.
the columns are
INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES
1122 XXITEM1 1 5
1123 XXITEM2 2 6
I can do a sql query so that I can retrieve the same records repeated as number INVH_BOXES.
Select * from XXINV
where invh_no = 1122
output:
INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES
1122 XXITEM1 1 5
Desired output:
INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES
1122 XXITEM1 1 5
1122 XXITEM1 1 5
1122 XXITEM1 1 5
1122 XXITEM1 1 5
1122 XXITEM1 1 5
or
INVH_NO INVH_ITEM_CODE INVH_QTY INVH_BOXES
1122 XXITEM1 1 1 of 5
1122 XXITEM1 1 2 of 5
1122 1 3 5 XXITEM1
1122 XXITEM1 1 4 of 5
1122 XXITEM1 1 5 of 5
Please suggest. Like I need to print each line in a single page to stick them on boxes so that packaging.
Kind regards
Afzal.
Just add INVH_ITEM_CODE to the connection by the clause.
Select invh_no
invh_item_code
invh_qty
to_char (, 'fm99') | 'from ' | TO_CHAR (invh_boxes, 'fm99') invh_boxes
of xxinv
where invh_no = 1122
connect
by level<=>=>
and prior invh_item_code = invh_item_code
and prior sys_guid() is not null
-
SQL QUERY THAT RETURNS THE PL/SQL
Hello
I'm putting in 4.2 below apex
DECLARE
date of frdate: =: P22_FROMDATE;
date date: =: P22_TODATE;
l_date1 varchar2 (11): = to_char(frdate,'dd-mon-yyyy');
l_date2 varchar2 (11): = to_char(todate,'dd-mon-yyyy');
v_sql varchar2 (32000);
v_Name varchar2 (4000): = months_name (frdate, todate);
char (1) of the v1: = q "[']";
number of lbr1 (6): =: P22_FROMBRANCH;
number of LBR2 (6): =: P22_TOBRANCH;
number of M1 (6): = 11;
Start
v_sql: ='SELECT * FROM (SELECT LBRCODE, PRDACCTID, MN, AVGX FROM (SELECT LBRCODE, PRDACCTID, MN, SUM (BALL) BALL, COUNT (MN) DAYS, ROUND (SUM (BAL) count (MN), 2) AVGX ';))
v_sql: = v_sql | "FROM (SELECT LBRCODE, PRDACCTID, TO_CHAR (BALDATE,'|)) CHR (39) | ' MM' | CHR (39) |') ' | ' ||'|| CHR (39) | » _'|| CHR (39) |' | ' || «TO_CHAR (BALDATE,'|)» CHR (39) | ' AAAA '. CHR (39) |') MN, BALL ';
V_SQL: = V_SQL | "(SELECT Q2. LBRCODE, Q2. PRDACCTID, T1. BALDATE, T_OST_NEW (Q2. LBRCODE, Q2. PRDACCTID, T1. BALDATE) BALL ';
V_SQL: = V_SQL | "FROM (select TO_DATE('||) Chr (39) | l_date1 | Chr (39) | «, » || CHR (39) | ' DD-MON-YYYY ' | CHR (39) |') baldate FROM DUAL Union all the ';
V_SQL: = V_SQL |' select (TO_DATE('||) Chr (39) | l_date1 | Chr (39) | «, » || CHR (39) | ' DD-MON-YYYY ' | CHR (39) |') + level) double baldate ';
V_SQL: = V_SQL |' connect by level < = (TO_DATE('||) Chr (39) | l_date2 | Chr (39) | «, » || CHR (39) | ' DD-MON-YYYY ' | CHR (39) |') -TO_DATE('||) Chr (39) | l_date1 | Chr (39) | «, » || CHR (39) | ' Dd-mon-yyyy ' | CHR (39) |')) ) Q1,';
V_SQL: = V_SQL | "(SELECT LBRCODE,'|) ' (rpad (prdcd, 8,'|)) V1 ||'' || v1 |') || LTRIM (rpad('|| v1 ||) » x'|| V1 | «, 25, » || v1 | » 0' || v1||'),'|| v1 | » x'|| v1 |')) prdacctid OF D009021 WHERE the LBRCODE between ' | : P22_FROMBRANCH |' and ' | : P22_TOBRANCH | "AND moduleinfo =' | TO_NUMBER(:P22_SELECTLIST);
V_SQL: = V_SQL |') ((Q2)) GROUP BY LBRCODE, PRDACCTID, MN))';
V_SQL: = V_SQL | "PIVOT (MAX (AVGX) (MN) IN (';))
V_SQL: = V_SQL | V_NAME;
V_SQL: = V_SQL |')) ORDER OF LBRCODE, PRDACCTID ';
RETURN V_SQL;
END;
I created all the elements of the required page
I get the error message like missing expression
to test, I created a function to return the query, it works very well know to return a query that gives me desired report
am I missing something?
Help, please
HEMU wrote:
Hello Sir
Sorry to bother you again
I tried to use «function that returns colon-delimited topics»
and I got following error
unable to determine query headings: ORA-06550: line 1, column 138: PLS-00103: Encountered the symbol ";" when expecting one of the following: . ( ) , * % & = - + < / > at in is mod remainder not rem => <> or != or ~= >= <= <> and or like like2 like4 likec between || multiset member submultiset The symbol ")" was substituted for ";" to continue.
failed to parse SQL query:
can take you a look at page901 once again please and a function named months_namex
is it feasible that I'm looking for?
The immediate cause of this error is simply incorrect report headings function call syntax:
return months_namex(to_date(:p901_fromdate,'dd-mon-yyyy'),to_date(:p901_todate,'dd-mon-yyyy')
This should be:
return months_namex(to_date(:p901_fromdate,'dd-mon-yyyy'),to_date(:p901_todate,'dd-mon-yyyy'));
However there is no
months_namex
function defined in the workspace. -
Need for SQL query to get the result.
Region
Month Trx type Summary of the resolution AMERICAS -13 may Adjustments Fix EMEA -13 may Adjustments Incorrect AMERICAS -13 may Credit memo Incorrect EMEA -13 may Invoice Fix AMERICAS -13 may Credit memo Fix OFD -13 may Adjustments Fix AMERICAS -13 may Invoice Incorrect DVL -13 may Adjustments Fix DVL -13 may Adjustments Fix OFD -13 may Adjustments Fix Above my Table and here is the result required. Similarly for other regions as well. Can someone help me with the SQL query?
Region Summary of the resolution Setting Credit memo Invoice Total general AMERICAS Fix 1 1 2 Incorrect 0 1 1 2 Like this?
SQL > select * from transaction_audit;
MTH TRX_TYPE REGION BOARD
-------- ------ ----------- ---------
AMERICAS-13 may SETTINGS CORRECT
EMEA-13 may INCORRECT ADJUSTMENT
AMERICAS-13 may CREDIT MEMO INCORRECT
EMEA-13 may INVOICE CORRECT
AMERICAS-13 may CREDIT MEMO CORRECT
OFD-13 may SETTINGS CORRECT
AMERICAS-13 may INVOICE INCORRECTE
LAD-13 may SETTINGS CORRECT
LAD-13 may SETTINGS CORRECT
OFD-13 may SETTINGS CORRECT10 selected lines.
SQL > select region
2, resolution_summary
3, count (decode (trx_type, "ADJUSTMENTS", trx_type)) adjustments
4, County (decode (trx_type, 'HAVING', trx_type)) credit_memo
5, County (decode (trx_type, "BILL", trx_type)) Bill
transaction_audit 6
Group 7
8 by region
9, resolution_summary
10 Decree
11 by region
12, resolution_summary
13.REGION TAKE ADJUSTMENTS CREDIT_MEMO INVOICE
-------- --------- ----------- ----------- ----------
CORRECT THE AMERICAS 1 1 0
0 1 1 INCORRECT AMERICAS
EMEA CORRECT 0 0 1
INCORRECT EMEA 1 0 0
DAL ADDRESS 2 0 0
OFD CORRECT 2 0 06 selected lines.
SQL >
-
IOM sql Query to get the status of the failed task
Hello world
We have an obligation as we need to get the status of a particular task (say Create User in OID - Completed\Rejected status resource) for the particular user. We are able to get the status of the provisioed of resources to the user but not the status of the special mission which is trigerred for the user.can someone put some light on it. We must have the SQL query to do this.
Thanks in advance.
Kind regards
MKNHello
Use this query to get the status of the task, also check the coomentsSELECT USR. USR_LOGIN, OSI. SCH_KEY, ANN. SCH_STATUS, STA. STA_BUCKET OF
OSI, CHS, STA, MIL, TOS, PKG, OUEDRAOGO, USR, OBJ, OST
WHERE OSI.MIL_KEY = MIL.MIL_KEY
AND ANN. SCH_KEY = OSI. SCH_KEY
AND STA. STA_STATUS = SCH. SCH_STATUS
AND TOS. PKG_KEY = PKG. PKG_KEY
AND MIL. TOS_KEY = TOS. TOS_KEY
AND OUÉDRAOGO. USR_KEY = USR. USR_KEY
AND OUÉDRAOGO. OST_KEY = OST. OST_KEY
AND OST. OBJ_KEY = OBJ. OBJ_KEY
AND OSI. ORC_KEY = OUEDRAOGO. ORC_KEY
AND OBJ. OBJ_NAME = "User AD".
AND OST. OST_STATUS = "Provisioning" - filter accordinglly
AND STA. STA_BUCKET = 'pending' - filter accordinglly
AND PKG. PKG_NAME = "AD User" - filter accordinglly
AND MIL.MIL_NAME = 'System' - filter accordinglly Validation
;
Thank you
Kuldeep -
SQL query to get the number of days monthwise
Hello
I'm new to sql, can someone please tell me query to find the number of days between the two dates months wise.
say
FIRSTDATE last date
21/03/2011-25/06/2011
March April May June
9 22 23 18Hello
Welcome to the forum!
Here's one way:
WITH all_dates AS ( SELECT start_date + LEVEL - 1 AS a_date FROM ( SELECT TO_DATE ('21/03/2011', 'DD/MM/YYYY') AS start_date , TO_DATE ('25/06/2011', 'DD/MM/YYYY') AS end_date FROM dual ) CONNECT BY LEVEL <= end_date + 1 - start_date ) SELECT TO_CHAR ( TRUNC (a_date, 'MONTH') , 'fmMonth YYYY' ) AS month , COUNT (*) AS num_days FROM all_dates WHERE a_date - TRUNC (a_date, 'IW') < 5 GROUP BY TRUNC (a_date, 'MONTH') ORDER BY TRUNC (a_date, 'MONTH') ;
What is a 'working day '? I guess you mean every day except Saturday or Sunday, but the query aboveare sometimes figures less than you have asked:
MONTH NUM_DAYS --------------- ---------- March 2011 9 April 2011 21 May 2011 22 June 2011 18
Are a few days working on Saturday or Sunday? How do you get the 22 working days in April 2011 and 23 in may?
SQL is good at obtaining results with a variable number of rows, but you have to say exactly the desired number of columns when you write the query.
If you really need the output of the way you said, with any number of columns, then watch in swing or a grouping of the chain . See the FAQ forum
https://forums.Oracle.com/forums/Ann.jspa?annID=1535
"4. How can I convert rows to columns. -
SQL query to get the range of Date values
Hello
The database is Oracle11i.
I'm looking for a way to generate a list of the dates of a fixed date in the past (could be hardcoded) at the time of the day (sysdate).
In other words, if the fixed date is June 19, 2011, and assuming today ' today is June 24, 2011 the SQL must be able to generate the
Next: -.
June 19, 2011
June 20, 2011
June 21, 2011
June 22, 2011
June 23, 2011
June 24, 2011
And the constraint is that I can not make any change to the database in question. I can only shoot a (SELECT) SQL query. NO.
use time dimension type of approach (time dimension is not available here) and no procedure, etc. from PL/SQL. Is it possible?
Thank youJaimeen Shah wrote:
HelloThe database is Oracle11i.
I'm looking for a way to generate a list of the dates of a fixed date in the past (could be hardcoded) at the time of the day (sysdate).
In other words, if the fixed date is June 19, 2011, and assuming today ' today is June 24, 2011 the SQL must be able to generate the
Next: -.
June 19, 2011
June 20, 2011
June 21, 2011
June 22, 2011
June 23, 2011
June 24, 2011And the constraint is that I can not make any change to the database in question. I can only shoot a (SELECT) SQL query. NO.
use time dimension type of approach (time dimension is not available here) and no procedure, etc. from PL/SQL. Is it possible?
Thank you
SQL> def date_start = '13/11/2010' SQL> def date_end = '22/11/2010' SQL> with 2 data as ( 3 select to_date('&date_start', 'DD/MM/YYYY') date1, 4 to_date('&date_end', 'DD/MM/YYYY') date2 5 from dual 6 ) 7 select to_char(date1+level-1, 'DD/MM/YYYY') the_date 8 from data 9 connect by level <= date2-date1+1 10 / THE_DATE ---------- 13/11/2010 14/11/2010 15/11/2010 16/11/2010 17/11/2010 18/11/2010 19/11/2010 20/11/2010 21/11/2010 22/11/2010
-
IF NEW VARIABLE in SQL QUERY, DISPLAYS as the LAST COLUMN + rpad does not
Hello all and thanks in advance.
(1) if I add a new variable to my sql query to select a column, which was already on the table, it shows it in the report of the table as the last column on the right. In other words, if I add "the street" to
something like city, postal code, street, store, Manager, etc., instead of placing the Street between CP and the Bank, the place like I said as the last column on the right.
(2) when the values entered in the cells of the tables, Yes, they extend to their length, but, only if it is a Word. If it is two, as when I enter the value of 'very good '.
then two lines as well as by a newline within the cell, for example, which in fact too high the rank. I tried sdap spaces with rpad but this did not work. something like rpad (stock, 20,' ')
I have to say that the table is in the same page where there is a form, as the table grows in length it's actually squeezing the form on the left.
(3) rpad did not work with the simpler syntax, but less would be with what I need, because it turns out that I am using DECODE to perform a conversion between the displayed value and
value returned in my select list of values, something like: DECODE (TO_CHAR (stock), '1', 'Black', '2', 'Average', '3', 'good', '4', 'Very good', null) AS stock
so, I tried to put the rpad there in several places, but either he gave the parse error or it has left empty do not pick up all the values in the column.
Thank you very much
AlvaroAlvaro
(1) this is the standard behavior of the constructor of the apex. You can change the order of display with arrows in the report column attributes.
(2) you have to play with the style of the column attributes to accomplice this. For the style of the instance = "" white-space: pre; ' in the attributes of the element column attributes. " White-space: normal would be put on several space (' ') 1. So no matter how you add with rpad, they will display as 1.
Set a width or as attribute in a class style for this column.Nicolette
-
SQL query to get the numbers from 0 to 99
How can we write a sql query to get values from 0 to 99... This should not come from any tableSELECT LEVEL - 1 FROM DUAL CONNECT BY LEVEL <= 100 /
SY.
Maybe you are looking for
-
Inkjet e: 5740 5740 printer does not print color cyan &; alignment problem
Hello Recently, I replaced my lights on my P 5740 printer ink cartridge while trying once photograpgh print [6 x 4] & have had nothing more than headaches since. The cyan color does not print ink levels indicate that it is used. I cleaned the heads o
-
Error deleting windows partition
I created a 35 GB windows with bootcamp partition, but realized it wasn't enough for my needs... then decided to delete the bootcamp partition. at the end of the process, appeared an error related to the score and realized that the windows partition
-
Impossible to reinstall Windows on iMac 5 k (end of 2014) w / Fusion drive
This past weekend, I had a problem with my Windows gel partition when running games, so I decided to reinstall completely the partition from the ground up. During installation, I keep running into this caveat that I can not go beyond: "we could not c
-
HP Pavilion 17z - f100 CTO: Dragon-fur
Hey Dragon fur - it's brush - 01/09/2015 - HP Pavillion 17z - PC CTO (ENERGY STAR) f-100 I had much trouble contact you - I was - for so now stuck long - stuck in professional sites IT cause me to be recognized by MS & HP as a COMPUTER professional -
-
MSN home page is too large and are not my toolbars
How do the smaller home page?