Using order by with the UNION ALL operator
Hi,
I have 2 queries and i'm using UNION ALL to join both of them.
And i want to sort the final result based on a column.
When i try to do that, its not allowing me to use the ORDER BY clause.
Any suggestions??
Example
select * from xxx where job='Manager'
order by ename
union all
select * from yyy where job='Engineer'
order by ename
Thanks in advance
--Kumar
SQL> select * from test_emp where deptno = 10 order by ename
2 union all
3 select * from test_emp where deptno = 20 order by ename;
union all
ERROR at line 2:
ORA-00933: SQL command not properly ended
SQL> select * from test_emp where deptno = 10 --order by ename
2 union all
3 select * from test_emp where deptno = 20 order by ename;
select * from test_emp where deptno = 20 order by ename
ERROR at line 3:
ORA-00904: "ENAME": invalid identifier
SQL> select * from test_emp where deptno = 10 --order by ename
2 union all
3 select * from test_emp where deptno = 20 --order by ename;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7698 BLAKE MANAGER 7839 01-MAY-81 3141 1 10
7782 CLARK MANAGER 7839 09-JUN-81 2700 10
7839 KING PRESIDENT 17-NOV-81 5512 10
7934 MILLER CLERK 7782 23-JAN-82 1433 10
7369 SMITH CLERK 7902 10-OCT-06 882 123 20
7566 JONES MANAGER 7839 10-OCT-06 3279 123 20
7788 SCOTT ANALYST 7566 11-OCT-06 3307 123 20
7876 ADAMS CLERK 7788 10-OCT-06 1212 123 20
7902 FORD ANALYST 7566 10-OCT-06 3307 123 20
9 rows selected.
SQL> select * from
2 (select * from test_emp where deptno = 10 union all
3 select * from test_emp where deptno = 20)
4 order by ename;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7876 ADAMS CLERK 7788 10-OCT-06 1212 123 20
7698 BLAKE MANAGER 7839 01-MAY-81 3141 1 10
7782 CLARK MANAGER 7839 09-JUN-81 2700 10
7902 FORD ANALYST 7566 10-OCT-06 3307 123 20
7566 JONES MANAGER 7839 10-OCT-06 3279 123 20
7839 KING PRESIDENT 17-NOV-81 5512 10
7934 MILLER CLERK 7782 23-JAN-82 1433 10
7788 SCOTT ANALYST 7566 11-OCT-06 3307 123 20
7369 SMITH CLERK 7902 10-OCT-06 882 123 20
9 rows selected.
SQL>
Similar Messages
-
Whats wrong with the UNION ALL
Hi All
I have the following table and data
WITH sample_data AS
(SELECT '1' AS bin_data_id, '539' AS traffic_sample_id,
'1100' AS end_intv_time, '0' AS bin_1_data, '34' AS bin_2_data,
'19' AS bin_3_data
FROM DUAL
UNION ALL
SELECT '2', '539', '1200', '0', '65', '18'
FROM DUAL
UNION ALL
SELECT '3', '539', '1300', '0', '51', '17'
FROM DUAL
UNION ALL
SELECT '4', '539', '1400', '0', '65', '27'
FROM DUAL
UNION ALL
SELECT '5', '539', '1500', '0', '99', '48'
FROM DUAL
UNION ALL
SELECT '6', '539', '1600', '0', '426', '138'
FROM DUAL
UNION ALL
SELECT '7', '539', '1700', '0', '151', '62'
FROM DUAL
UNION ALL
SELECT '8', '539', '1800', '0', '80', '32'
FROM DUAL
UNION ALL
SELECT '9', '539', '1900', '0', '31', '11'
FROM DUAL
UNION ALL
SELECT '10', '539', '2000', '0', '37', '11'
FROM DUAL
UNION ALL
SELECT '11', '539', '2100', '0', '24', '9'
FROM DUAL
UNION ALL
SELECT '12', '539', '2200', '0', '16', '5'
FROM DUAL
UNION ALL
SELECT '13', '539', '2300', '0', '27', '12'
FROM DUAL
UNION ALL
SELECT '14', '539', '2400', '0', '55', '20'
FROM DUAL
UNION ALL
SELECT '15', '539', '0100', '0', '18', '9'
FROM DUAL
UNION ALL
SELECT '16', '539', '0200', '0', '134', '52'
FROM DUAL
UNION ALL
SELECT '17', '539', '0300', '0', '230', '69'
FROM DUAL
UNION ALL
SELECT '18', '539', '0400', '0', '15', '7'
FROM DUAL
UNION ALL
SELECT '19', '539', '0500', '0', '6', '5'
FROM DUAL
UNION ALL
SELECT '20', '539', '0600', '0', '47', '23'
FROM DUAL
UNION ALL
SELECT '21', '539', '0700', '0', '100', '41'
FROM DUAL
UNION ALL
SELECT '22', '539', '0800', '0', '196', '43'
FROM DUAL
UNION ALL
SELECT '23', '539', '0900', '0', '81', '20'
FROM DUAL
UNION ALL
SELECT '24', '539', '1000', '0', '58', '28'
FROM DUAL
UNION ALL
SELECT '25', '539', '1100', '0', '58', '24'
FROM DUAL
UNION ALL
SELECT '26', '539', '1200', '0', '60', '22'
FROM DUAL
UNION ALL
SELECT '27', '539', '1300', '0', '42', '18'
FROM DUAL
UNION ALL
SELECT '28', '539', '1400', '0', '53', '15'
FROM DUAL
UNION ALL
SELECT '29', '539', '1500', '0', '107', '43'
FROM DUAL
UNION ALL
SELECT '30', '539', '1600', '0', '441', '146'
FROM DUAL
UNION ALL
SELECT '31', '539', '1700', '0', '128', '34'
FROM DUAL
UNION ALL
SELECT '32', '539', '1800', '0', '67', '27'
FROM DUAL
UNION ALL
SELECT '33', '539', '1900', '0', '45', '22'
FROM DUAL
UNION ALL
SELECT '34', '539', '2000', '0', '24', '13'
FROM DUAL
UNION ALL
SELECT '35', '539', '2100', '0', '16', '11'
FROM DUAL
UNION ALL
SELECT '36', '539', '2200', '0', '28', '5'
FROM DUAL
UNION ALL
SELECT '37', '539', '2300', '0', '23', '8'
FROM DUAL
UNION ALL
SELECT '38', '539', '2400', '0', '73', '11'
FROM DUAL
UNION ALL
SELECT '39', '539', '0100', '0', '16', '3'
FROM DUAL
UNION ALL
SELECT '40', '539', '0200', '0', '243', '82'
FROM DUAL
UNION ALL
SELECT '41', '539', '0300', '0', '121', '55'
FROM DUAL
UNION ALL
SELECT '42', '539', '0400', '0', '17', '4'
FROM DUAL
UNION ALL
SELECT '43', '539', '0500', '0', '5', '5'
FROM DUAL
UNION ALL
SELECT '44', '539', '0600', '0', '41', '15'
FROM DUAL
UNION ALL
SELECT '45', '539', '0700', '0', '101', '34'
FROM DUAL
UNION ALL
SELECT '46', '539', '0800', '0', '184', '43'
FROM DUAL
UNION ALL
SELECT '47', '539', '0900', '0', '69', '15'
FROM DUAL
UNION ALL
SELECT '48', '539', '1000', '0', '51', '18'
FROM DUAL
UNION ALL
SELECT '49', '539', '1100', '0', '61', '25'
FROM DUAL)
SELECT *
FROM sample_data;Now i have 2 queries , the one below query is to just get the last bin_data_id per each traffic_sample_id
SELECT ROW_NUMBER () OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id)
AS rn_1,
COUNT (bin_data_id) OVER (PARTITION BY traffic_sample_id) AS cnt_1,TRAFFIC_SAMPLE_ID,bin_data_id,(END_INTV_TIME_1+100) AS END_INTV_TIME,BIN_1_DATA,BIN_2_DATA,BIN_3_DATA
FROM
SELECT ROW_NUMBER() OVER(ORDER BY TRAFFIC_SAMPLE_ID) AS RN,traffic_sample_id,
end_intv_time,
last_value(end_intv_time) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS END_INTV_TIME_1,
LAST_VALUE (bin_data_id) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_data_id,
LAST_VALUE (bin_1_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_1_data,
LAST_VALUE (bin_2_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_2_data,
LAST_VALUE (bin_3_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_3_data
FROM bin_data
WHERE RN=BIN_DATA_ID
and traffic_sample_id=539And now i'm doing the UNION ALL the above query with a different query as below
select rn_1,cnt_1,traffic_sample_id, bin_data_id, to_number(end_intv_time),bin_1_data,bin_2_data,bin_3_data
from
select ROW_NUMBER () OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id)
AS rn_1,
COUNT (bin_data_id) OVER (PARTITION BY traffic_sample_id) AS cnt_1,
traffic_sample_id, bin_data_id, end_intv_time, direction,bin_1_data,bin_2_data,bin_3_data
from
SELECT ROW_NUMBER () OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id)
AS rn,
COUNT (bin_data_id) OVER (PARTITION BY traffic_sample_id) AS cnt,
traffic_sample_id, bin_data_id, end_intv_time, direction,bin_1_data,bin_2_data,bin_3_data
FROM bin_data
where rn!=1
where traffic_sample_id=539
union all
SELECT ROW_NUMBER () OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id)
AS rn_1,
COUNT (bin_data_id) OVER (PARTITION BY traffic_sample_id) AS cnt_1,TRAFFIC_SAMPLE_ID,bin_data_id,(END_INTV_TIME_1+100) AS END_INTV_TIME,BIN_1_DATA,BIN_2_DATA,BIN_3_DATA
FROM
SELECT ROW_NUMBER() OVER(ORDER BY TRAFFIC_SAMPLE_ID) AS RN,traffic_sample_id,
end_intv_time,
last_value(end_intv_time) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS END_INTV_TIME_1,
LAST_VALUE (bin_data_id) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_data_id,
LAST_VALUE (bin_1_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_1_data,
LAST_VALUE (bin_2_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_2_data,
LAST_VALUE (bin_3_data) OVER (PARTITION BY traffic_sample_id ORDER BY bin_data_id ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING)
AS bin_3_data
FROM bin_data
WHERE RN=BIN_DATA_ID
and traffic_sample_id=539Now all works fine and appends the single record to the set of records and i get the following data set.
RN_1 CNT_1 TRAFFIC_SAMPLE_ID BIN_DATA_ID TO_NUMBER(END_INTV_TIME) BIN_1_DATA BIN_2_DATA BIN_3_DATA
1 48 539 2 1200 0 65 18
2 48 539 3 1300 0 51 17
3 48 539 4 1400 0 65 27
4 48 539 5 1500 0 99 48
5 48 539 6 1600 0 426 138
6 48 539 7 1700 0 151 62
7 48 539 8 1800 0 80 32
8 48 539 9 1900 0 31 11
9 48 539 10 2000 0 37 11
10 48 539 11 2100 0 24 9
11 48 539 12 2200 0 16 5
12 48 539 13 2300 0 27 12
13 48 539 14 2400 0 55 20
14 48 539 15 100 0 18 9
15 48 539 16 200 0 134 52
16 48 539 17 300 0 230 69
17 48 539 18 400 0 15 7
18 48 539 19 500 0 6 5
19 48 539 20 600 0 47 23
20 48 539 21 700 0 100 41
21 48 539 22 800 0 196 43
22 48 539 23 900 0 81 20
23 48 539 24 1000 0 58 28
24 48 539 25 1100 0 58 24
25 48 539 26 1200 0 60 22
26 48 539 27 1300 0 42 18
27 48 539 28 1400 0 53 15
28 48 539 29 1500 0 107 43
29 48 539 30 1600 0 441 146
30 48 539 31 1700 0 128 34
31 48 539 32 1800 0 67 27
32 48 539 33 1900 0 45 22
33 48 539 34 2000 0 24 13
34 48 539 35 2100 0 16 11
35 48 539 36 2200 0 28 5
36 48 539 37 2300 0 23 8
37 48 539 38 2400 0 73 11
38 48 539 39 100 0 16 3
39 48 539 40 200 0 243 82
40 48 539 41 300 0 121 55
41 48 539 42 400 0 17 4
42 48 539 43 500 0 5 5
43 48 539 44 600 0 41 15
44 48 539 45 700 0 101 34
45 48 539 46 800 0 184 43
46 48 539 47 900 0 69 15
47 48 539 48 1000 0 51 18
48 48 539 49 1100 0 61 25
1 1 539 49 1200 0 61 25But please help me , all the above queries are working fine when i check by traffic_sample_id, for example if i remove the WHERE CLAUSE, WHERE TRAFFIC_SAMPLE_ID=539 from both the queries in the UNION ALL to get all the TRAFFIC_SAMPLE_ID's the single records are not getting appended to the resultant data set. Please need help.
ThanksPlease consider the following sample data
WITH sample_data AS
(SELECT '1' AS bin_data_id, '539' AS traffic_sample_id,
'1100' AS end_intv_time, '0' AS bin_1_data, '34' AS bin_2_data,
'19' AS bin_3_data
FROM DUAL
UNION ALL
SELECT '2', '539', '1200', '0', '65', '18'
FROM DUAL
UNION ALL
SELECT '3', '539', '1300', '0', '51', '17'
FROM DUAL
UNION ALL
SELECT '4', '539', '1400', '0', '65', '27'
FROM DUAL
UNION ALL
SELECT '5', '539', '1500', '0', '99', '48'
FROM DUAL
UNION ALL
SELECT '6', '539', '1600', '0', '426', '138'
FROM DUAL
UNION ALL
SELECT '7', '539', '1700', '0', '151', '62'
FROM DUAL
UNION ALL
SELECT '8', '539', '1800', '0', '80', '32'
FROM DUAL
UNION ALL
SELECT '9', '539', '1900', '0', '31', '11'
FROM DUAL
UNION ALL
SELECT '10', '539', '2000', '0', '37', '11'
FROM DUAL
UNION ALL
SELECT '11', '539', '2100', '0', '24', '9'
FROM DUAL
UNION ALL
SELECT '12', '539', '2200', '0', '16', '5'
FROM DUAL
UNION ALL
SELECT '13', '539', '2300', '0', '27', '12'
FROM DUAL
UNION ALL
SELECT '14', '539', '2400', '0', '55', '20'
FROM DUAL
UNION ALL
SELECT '15', '539', '0100', '0', '18', '9'
FROM DUAL
UNION ALL
SELECT '16', '539', '0200', '0', '134', '52'
FROM DUAL
UNION ALL
SELECT '17', '539', '0300', '0', '230', '69'
FROM DUAL
UNION ALL
SELECT '18', '539', '0400', '0', '15', '7'
FROM DUAL
UNION ALL
SELECT '19', '539', '0500', '0', '6', '5'
FROM DUAL
UNION ALL
SELECT '20', '539', '0600', '0', '47', '23'
FROM DUAL
UNION ALL
SELECT '21', '539', '0700', '0', '100', '41'
FROM DUAL
UNION ALL
SELECT '22', '539', '0800', '0', '196', '43'
FROM DUAL
UNION ALL
SELECT '23', '539', '0900', '0', '81', '20'
FROM DUAL
UNION ALL
SELECT '24', '539', '1000', '0', '58', '28'
FROM DUAL
UNION ALL
SELECT '25', '539', '1100', '0', '58', '24'
FROM DUAL
UNION ALL
SELECT '26', '539', '1200', '0', '60', '22'
FROM DUAL
UNION ALL
SELECT '27', '539', '1300', '0', '42', '18'
FROM DUAL
UNION ALL
SELECT '28', '539', '1400', '0', '53', '15'
FROM DUAL
UNION ALL
SELECT '29', '539', '1500', '0', '107', '43'
FROM DUAL
UNION ALL
SELECT '30', '539', '1600', '0', '441', '146'
FROM DUAL
UNION ALL
SELECT '31', '539', '1700', '0', '128', '34'
FROM DUAL
UNION ALL
SELECT '32', '539', '1800', '0', '67', '27'
FROM DUAL
UNION ALL
SELECT '33', '539', '1900', '0', '45', '22'
FROM DUAL
UNION ALL
SELECT '34', '539', '2000', '0', '24', '13'
FROM DUAL
UNION ALL
SELECT '35', '539', '2100', '0', '16', '11'
FROM DUAL
UNION ALL
SELECT '36', '539', '2200', '0', '28', '5'
FROM DUAL
UNION ALL
SELECT '37', '539', '2300', '0', '23', '8'
FROM DUAL
UNION ALL
SELECT '38', '539', '2400', '0', '73', '11'
FROM DUAL
UNION ALL
SELECT '39', '539', '0100', '0', '16', '3'
FROM DUAL
UNION ALL
SELECT '40', '539', '0200', '0', '243', '82'
FROM DUAL
UNION ALL
SELECT '41', '539', '0300', '0', '121', '55'
FROM DUAL
UNION ALL
SELECT '42', '539', '0400', '0', '17', '4'
FROM DUAL
UNION ALL
SELECT '43', '539', '0500', '0', '5', '5'
FROM DUAL
UNION ALL
SELECT '44', '539', '0600', '0', '41', '15'
FROM DUAL
UNION ALL
SELECT '45', '539', '0700', '0', '101', '34'
FROM DUAL
UNION ALL
SELECT '46', '539', '0800', '0', '184', '43'
FROM DUAL
UNION ALL
SELECT '47', '539', '0900', '0', '69', '15'
FROM DUAL
UNION ALL
SELECT '48', '539', '1000', '0', '51', '18'
FROM DUAL
UNION ALL
SELECT '49', '539', '1100', '0', '61', '25'
FROM DUAL
UNION ALL
SELECT '11033', '613','1300','3','421','124'
FROM DUAL
UNION ALL
SELECT '11034', '613', '1400', '4', '419', '128'
FROM DUAL
UNION ALL
SELECT '11035', '613', '1500', '5', '522', '169'
FROM DUAL
UNION ALL
SELECT '11036', '613', '1600', '5', '596', '185'
FROM DUAL
UNION ALL
SELECT '11037', '613', '1700', '9', '667', '150'
FROM DUAL
UNION ALL
SELECT '11038', '613', '1800', '4', '522', '105'
FROM DUAL
UNION ALL
SELECT '11039', '613', '1900', '2', '428', '80'
FROM DUAL
UNION ALL
SELECT '11040', '613', '2000', '5', '304', '73'
FROM DUAL
UNION ALL
SELECT '11041', '613', '2100', '1', '284', '61'
FROM DUAL
UNION ALL
SELECT '11042', '613', '2200', '3', '245', '45'
FROM DUAL
UNION ALL
SELECT '11043', '613', '2300', '6', '193', '39'
FROM DUAL
UNION ALL
SELECT '11044', '613', '2400', '0', '109', '23'
FROM DUAL
UNION ALL
SELECT '11045', '613', '0100', '0', '81', '25'
FROM DUAL
UNION ALL
SELECT '11046', '613', '0200', '0', '56', '24'
FROM DUAL
UNION ALL
SELECT '11047', '613', '0300', '0', '62', '11'
FROM DUAL
UNION ALL
SELECT '11048', '613', '0400', '0', '59', '27'
FROM DUAL
UNION ALL
SELECT '11049', '613', '0500', '1', '180', '87'
FROM DUAL
UNION ALL
SELECT '11050', '613', '0600', '4', '410', '126'
FROM DUAL
UNION ALL
SELECT '11051', '613', '0700', '6', '454', '138'
FROM DUAL
UNION ALL
SELECT '11052', '613', '0800', '4', '393', '145'
FROM DUAL
UNION ALL
SELECT '11053', '613', '0800', '4', '357', '131'
FROM DUAL
UNION ALL
SELECT '11054', '613', '0900', '5', '347', '126'
FROM DUAL
UNION ALL
SELECT '11055', '613', '1000', '3', '368', '155'
FROM DUAL
UNION ALL
SELECT '11056', '613', '1100', '2', '384', '153'
FROM DUAL
UNION ALL
SELECT '11057', '613', '1200', '7', '423', '166'
FROM DUAL
UNION ALL
SELECT '11058', '613', '1300', '9', '489', '213'
FROM DUAL
UNION ALL
SELECT '11059', '613', '1400', '5', '576', '190'
FROM DUAL
UNION ALL
SELECT '11060', '613', '1500', '11', '712', '189'
FROM DUAL
UNION ALL
SELECT '11061', '613', '1600', '9', '634', '211'
FROM DUAL
UNION ALL
SELECT '11062', '613', '1700', '3', '501', '114'
FROM DUAL
UNION ALL
SELECT '11063', '613', '1800', '2', '411', '117'
FROM DUAL
UNION ALL
SELECT '11064', '613', '1900', '5', '291', '99'
FROM DUAL
UNION ALL
SELECT '11065', '613', '2000', '1', '276', '71'
FROM DUAL
UNION ALL
SELECT '11066', '613', '2100', '2', '214', '56'
FROM DUAL
UNION ALL
SELECT '11067', '613', '2200', '3', '166', '46'
FROM DUAL
UNION ALL
SELECT '11068', '613', '2300', '0', '99', '26'
FROM DUAL
UNION ALL
SELECT '11069', '613', '2400', '0', '65', '19'
FROM DUAL
UNION ALL
SELECT '11070', '613', '0100', '1', '57', '14'
FROM DUAL
UNION ALL
SELECT '11071', '613', '0200', '0', '55', '15'
FROM DUAL
UNION ALL
SELECT '11072', '613', '0300', '0', '49', '22'
FROM DUAL
UNION ALL
SELECT '11073', '613', '0400', '3', '151', '113'
FROM DUAL
UNION ALL
SELECT '11074', '613', '0500', '2', '324', '145'
FROM DUAL
UNION ALL
SELECT '11075', '613', '0600', '5', '342', '161'
FROM DUAL
UNION ALL
SELECT '11076', '613', '0700', '3', '294', '186'
FROM DUAL
UNION ALL
SELECT '11077', '613', '0800', '6', '303', '171'
FROM DUAL
UNION ALL
SELECT '11078', '613', '0900', '4', '278', '158'
FROM DUAL
UNION ALL
SELECT '11079', '613', '1000', '2', '309', '156'
FROM DUAL
UNION ALL
SELECT '11080', '613', '1100', '0', '51', '18'
FROM DUAL
UNION ALL
SELECT '11081', '613', '1200', '0', '61', '25'
FROM DUAL)
SELECT *
FROM sample_data;Here when i say the LAST(BIN_DATA_ID) i meant the last BIN_DATA_ID PER EACH TRAFFIC SAMPLE ID. What i was trying to do is in the bottom query i'm getting the LAST BIN_DATA_ID for each TRAFFIC SAMPLE ID and appending it to the top query.
Thanks -
When I print a 4x6 color picture using an iMac with the latest operating system using a Canon MX892 printer, faint black lines appear every 3/16 of an inch. When I print the same picture using iPhoto there is no problem. Any suggestions?
What is the resolution of the picture that you are trying to print?
Go to Image>resize>image size, read the resolution in px/in, then report back, please.
Also, are you in a position to try printing with another printer in an attempt to narrow this down? -
Hi
The problem Im having is that I had a query on sales order tables that used to take a couple of minutes to run. The user wanted contract orders to be added to the query and these were stored in different tables to the sales orders. I carried out union all joins in views and then applied the query to the views. Unfortunately it now takes 30 minutes to run.
I apologise for the large post, I am just trying to provide enough information for someone to help me out.
Any help will be greatly appreciated.
Thanks
Stephen
The original query was:
SELECT
C_STD_COST.MAT, C_STD_COST.LAB, C_STD_COST.OHD, ITEM.PC, BILL_HDR.RATE,
BILL_SO.SO_SHIP_QTY, BILL_SO.SO_SHIP_EXT_AMT, AR_DOC.CUSTOMER,
BILL_SO.AR_DOC,
CUS_LOC.NAME, AR_DOC.CREATED_DATE, MEMO.TOT_ORD_QTY, MEMO.UNIT_PRICE,
MEMO.BOOK_RATE, AR_DOC.AR_DOC_TYPE, MEMO.MEMO_TYPE, BILL_SO.ITEM
FROM
AR_DOC, BILL_HDR, CUS_LOC, BILL_SO, ITEM, MEMO, C_STD_COST
WHERE
AR_DOC.AR_CCN=BILL_HDR.AR_CCN AND
AR_DOC.AR_DOC_TYPE=BILL_HDR.AR_DOC_TYPE AND
AR_DOC.AR_DOC=BILL_HDR.AR_DOC AND
AR_DOC.CUSTOMER=CUS_LOC.CUSTOMER AND
AR_DOC.CUS_AR_LOC=CUS_LOC.CUS_LOC AND
BILL_HDR.AR_CCN=BILL_SO.AR_CCN AND
BILL_HDR.AR_DOC_TYPE=BILL_SO.AR_DOC_TYPE AND
BILL_HDR.AR_DOC=BILL_SO.AR_DOC AND
BILL_SO.ITEM=ITEM.ITEM (+) AND
BILL_SO.REVISION=ITEM.REVISION (+) AND
BILL_SO.AR_DOC=MEMO.AR_DOC (+) AND
BILL_SO.AR_DOC_LINE=MEMO.MEMO_LINE (+) AND
BILL_SO.AR_CCN=MEMO.SALES_CCN (+) AND
BILL_SO.AR_DOC_TYPE=MEMO.MEMO_TYPE (+) AND
ITEM.ITEM=C_STD_COST.ITEM (+) AND
ITEM.REVISION=C_STD_COST.REVISION (+) AND
AR_DOC.CREATED_DATE>=TO_DATE ('30-05-2006 00:00:00', 'DD-MM-YYYY
HH24:MI:SS') AND
AR_DOC.CREATED_DATE<TO_DATE ('14-06-2006 00:00:00', 'DD-MM-YYYY
HH24:MI:SS')
ORDER BY
AR_DOC.CUSTOMER, ITEM.PCThe explain plan showed:
SELECT STATEMENT
SORT ORDER BY
MERGE JOIN OUTER
SORT JOIN
NESTED LOOPS OUTER
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS
NESTED LOOPS OUTER
TABLE ACCESS FULL BILL_SO 4
TABLE ACCESS BY INDEX ROWID ITEM 5
INDEX UNIQUE SCAN PK_ITEM UNIQUE
TABLE ACCESS BY INDEX ROWID BILL_HDR 2
INDEX UNIQUE SCAN PK_BILL_HDR UNIQUE
TABLE ACCESS BY INDEX ROWID AR_DOC 1
INDEX UNIQUE SCAN PK_AR_DOC UNIQUE
TABLE ACCESS BY INDEX ROWID CUS_LOC 3
INDEX UNIQUE SCAN PK_CUS_LOC UNIQUE
TABLE ACCESS BY INDEX ROWID MEMO 6
INDEX RANGE SCAN PK_MEMO UNIQUE
SORT JOIN
TABLE ACCESS FULL COST_ITM 8The views I created were:
CREATE VIEW C_BILL_DET AS
SELECT
AR_CCN, AR_DOC_TYPE, AR_DOC, AR_DOC_LINE, ITEM,
REVISION, SO_SHIP_QTY, SO_SHIP_EXT_AMT, COST1
FROM
BILL_SO
UNION ALL
SELECT
AR_CCN, AR_DOC_TYPE, AR_DOC, AR_DOC_LINE, ITEM,
REVISION, SHIP_QTY, SHIP_EXT_AMT, COST1
FROM
CR_BLSH;
CREATE VIEW C_BILL_HDR AS
SELECT
AR_CCN, AR_DOC_TYPE, AR_DOC, RATE
FROM
BILL_HDR
UNION ALL
SELECT
AR_CCN, AR_DOC_TYPE, AR_DOC, RATE
FROM
CR_BLHD;The new query is:
SELECT
C_STD_COST.MAT, C_STD_COST.LAB, C_STD_COST.OHD, ITEM.PC, C_BILL_HDR.RATE,
C_BILL_DET.SO_SHIP_QTY, C_BILL_DET.SO_SHIP_EXT_AMT, AR_DOC.CUSTOMER,
C_BILL_DET.AR_DOC,
CUS_LOC.NAME, AR_DOC.CREATED_DATE, MEMO.TOT_ORD_QTY, MEMO.UNIT_PRICE,
MEMO.BOOK_RATE, AR_DOC.AR_DOC_TYPE, MEMO.MEMO_TYPE, C_BILL_DET.ITEM
FROM
AR_DOC, C_BILL_HDR, CUS_LOC, C_BILL_DET, ITEM, MEMO, C_STD_COST
WHERE
AR_DOC.AR_CCN=C_BILL_HDR.AR_CCN AND
AR_DOC.AR_DOC_TYPE=C_BILL_HDR.AR_DOC_TYPE AND
AR_DOC.AR_DOC=C_BILL_HDR.AR_DOC AND
AR_DOC.CUSTOMER=CUS_LOC.CUSTOMER AND
AR_DOC.CUS_AR_LOC=CUS_LOC.CUS_LOC AND
C_BILL_HDR.AR_CCN=C_BILL_DET.AR_CCN AND
C_BILL_HDR.AR_DOC_TYPE=C_BILL_DET.AR_DOC_TYPE AND
C_BILL_HDR.AR_DOC=C_BILL_DET.AR_DOC AND
C_BILL_DET.ITEM=ITEM.ITEM (+) AND
C_BILL_DET.REVISION=ITEM.REVISION (+) AND
C_BILL_DET.AR_DOC=MEMO.AR_DOC (+) AND
C_BILL_DET.AR_DOC_LINE=MEMO.MEMO_LINE (+) AND
C_BILL_DET.AR_CCN=MEMO.SALES_CCN (+) AND
C_BILL_DET.AR_DOC_TYPE=MEMO.MEMO_TYPE (+) AND
ITEM.ITEM=C_STD_COST.ITEM (+) AND
ITEM.REVISION=C_STD_COST.REVISION (+) AND
AR_DOC.CREATED_DATE>=TO_DATE ('30-05-2006 00:00:00', 'DD-MM-YYYY
HH24:MI:SS') AND
AR_DOC.CREATED_DATE<TO_DATE ('14-06-2006 00:00:00', 'DD-MM-YYYY
HH24:MI:SS')
ORDER BY
AR_DOC.CUSTOMER, ITEM.PCThe explain plan is:
SELECT STATEMENT
SORT ORDER BY
MERGE JOIN OUTER
SORT JOIN
NESTED LOOPS
NESTED LOOPS
MERGE JOIN
SORT JOIN
NESTED LOOPS OUTER
NESTED LOOPS OUTER
VIEW C_BILL_DET 4
UNION-ALL
TABLE ACCESS FULL BILL_SO 9
TABLE ACCESS FULL CR_BLSH 10
TABLE ACCESS BY INDEX ROWID ITEM 5
INDEX UNIQUE SCAN PK_ITEM UNIQUE
TABLE ACCESS BY INDEX ROWID MEMO 6
INDEX RANGE SCAN PK_MEMO UNIQUE
SORT JOIN
VIEW C_BILL_HDR 2
UNION-ALL
TABLE ACCESS FULL BILL_HDR 11
TABLE ACCESS FULL CR_BLHD 12
TABLE ACCESS BY INDEX ROWID AR_DOC 1
INDEX UNIQUE SCAN PK_AR_DOC UNIQUE
TABLE ACCESS BY INDEX ROWID CUS_LOC 3
INDEX UNIQUE SCAN PK_CUS_LOC UNIQUE
SORT JOIN
TABLE ACCESS FULL COST_ITM 8I don't understand.
I try your with statement and get: "end_date" invalid identifier as an error
I start my query out:
WITH start_date as
(select to_date ('08/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM') from dual),
end_date as (select to_date ('08/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM) from dual)
select sales.id, start_date as callstart, end_date as callend
where sales.created_timestamp >= start_date
and sales.created_timestamp < end_date
UNION ALL
<<<<<<<here is where you take the last select statement and replace sales with manufacturing>>>>>>>>>>>>>
UNION ALL
<<<<<<<here is where you take the last select statement and replace sales with engineering>>>>>>>>>>>>>
and it still fails. -
Can't I use my Scanner with the Elements 10 editor without the organizer??
I have been using Photoshop Elements for a looong time to help me create the product images I need for my online business. It's been a love-love relationship... until I took advantage of a special offer and bought Elements 10. Now it seems the only way I can scan images is thru the Organizer.... and the organizer is something I don't need.
Is there a way to scan my images thru the Editor only... and completely bypass the organizer (as I'm able to do with my older version of Elements)? Like a twain plugin I can install or something?
I may scan 10 images and decide to use only 3 of them... and those are the only ones I save.
With the way PSE10 is set up using the Organizer to scan, it's saving all 10 of them. Not to mention the extra steps of scanning thru the Organizer... (which means that pop-up window for my scanner every time), back over to the editor to pull the images in for editing, back to my files to delete the ones the organizer saved that I don't want... etc etc etc.
It's like 5-6 extra steps altogether and a huge time-sink for me (you know the old saying... time is money).
If there's no way to bypass the Organizer for scanning.... can I get a refund on my purchase? My older version of Elements works beautifully for me... I was just hoping for more sophisticated image editing capabilities.
VERY frustrated right now.Thank you very much for your explanation which I fully understand. Since a "fix", as you say, is not a solution might it not be a good idea to alert purchasers of the latest editions of Elements that they have an option to try this alteration to the installation in order to be able to import images from a scanner? (My own experience with versions prior to 9 always worked perfectly!) I do not know but does Photoshop CS5 allow the user to import images from a scanner or does the user have to use a similar solution to what applies to Photoshop Elements? I find Elements to be a very good app and am sure it is a good selling product for Adobe for amateur/semi-pro users that the alternative that I suggest may be a useful tool for existing or new users who want or need the capability to import from a scanner rather than having to go through other more difficulty and time consuming ways of doing the same task. Kindest regards and with my best intentions.
Fergus Cooper
Date: Tue, 20 Dec 2011 12:50:51 -0700
From: [email protected]
To: [email protected]
Subject: Can't I use my Scanner with the Elements 10 editor without the organizer??
Re: Can't I use my Scanner with the Elements 10 editor without the organizer??
created by Barbara B. in Photoshop Elements - View the full discussion
It's not a "fix", exactly. The TWAIN plug-in causes a lot of crashing in PSE so in the past couple of versions adobe makes you install it if you want it.
Replies to this message go to everyone subscribed to this thread, not directly to the person who posted the message. To post a reply, either reply to this email or visit the message page: http://forums.adobe.com/message/4096095#4096095
To unsubscribe from this thread, please visit the message page at http://forums.adobe.com/message/4096095#4096095. In the Actions box on the right, click the Stop Email Notifications link.
Start a new discussion in Photoshop Elements by email or at Adobe Forums
For more information about maintaining your forum email notifications please go to http://forums.adobe.com/message/2936746#2936746. -
every time I swap between my SIM cards with the iPhone all the messages that we're sent whenever the SIM card was not in my phone never show! is there anyway I can stop this and still get the massages?
Hello SeamusFitz,
Thank you for using Apple Support Communities!
In order to get your messages to show up on your other phone, you would need to have a backup of the phone with the messages, and then restore the new phone from that backup.
According to article iTunes: About iOS backups found here http://support.apple.com/kb/HT4946 iTunes will backup your Messages.
iTunes will back up the following information
Messages (iMessage and carrier SMS or MMS pictures and videos).
This will help you backup and restore your device:
iOS: How to back up and restore your content
http://support.apple.com/kb/HT1766
All the very best,
Sterling -
every time I swap between my SIM cards with the iPhone all the messages that we're sent whenever the SIM card was not in my phone never show! is there anyway I can stop this and still get the massages?
[email protected]
cheersHello SeamusFitz,
Thank you for using Apple Support Communities!
In order to get your messages to show up on your other phone, you would need to have a backup of the phone with the messages, and then restore the new phone from that backup.
According to article iTunes: About iOS backups found here http://support.apple.com/kb/HT4946 iTunes will backup your Messages.
iTunes will back up the following information
Messages (iMessage and carrier SMS or MMS pictures and videos).
This will help you backup and restore your device:
iOS: How to back up and restore your content
http://support.apple.com/kb/HT1766
All the very best,
Sterling -
Is it Possible in Purchase Order that putting the BOM, all the components ?
Is it Possible in Purchase Order that putting the BOM, all the components of that particular ges populated in the Rowt ? This is necessary to select single - single items is PO..
We are also using MRP and Forecast. We want to use this method in case of placing URGENT Purchase Order without considering WH stock + PO ordered + ....................
What kind of Query we would write , that putting the BOM in the UDF, the componenets get populated in Purchase Order...
Please give complete query.................The query I have provided earlier needs to be set in the ItemCode field at the row level and not on your User field at the header.
The query below (same as earlier with the addition of the user field name - please verify) will show the Child Items of the BOM item who code you have entered at the Header level in your UDF.
SELECT T0.Code FROM [dbo\].[ITT1\] T0 WHERE T0.Father = $\[OPOR.U_BOMNAME]
This will not automatically fire but the user has to first enter the Vendor Code and then enter the U_BOMName and then in the Item code field press Shift+F2 which will fire the above query FMS displaying the child Items for this BOM.
Suda -
Hi,
I'm having a problem with the stabilization all of a sudden. I did an analyze. The amount of shake isn't terrible but it's there. There are no squiggly lines in the clip I'm trying to stabilize. As you can see in the screenshot that it allows me to click the "Smooth clip motion" but the slider is not there for zoom. Any ideas why this is happening all of a sudden? It happens on all clips in this event. The entire event was analyzed after importing.What program are you using for this editing?
We can ask a Host should move your query over to that forum. -
I transfered all my games from my iphone4s to my ipad, but the game progress is lost.... I signed on to game centre it shows all my scores and progress but when i try to play with the games, all my progress and scores disappears... can anyone help???
Hi bubbles213,
The best way to move information from one iOS device to another is to back up the device using iCloud or iTunes (or both), and then restoring the new device from it. This article will walk you through the steps:
Transfer content from an iPhone, iPad, or iPod touch to a new device
http://support.apple.com/kb/HT2109
Cheers,
- Judy -
How to use glob search with the wildcard in command find?
How to use glob search with the wildcard in command find?
I want to find any file its names begin with "readme" string using command find. Why the following command cannot work?
$find /usr/share/doc -name readme*
However, the following commands can work?
$find /usr/share/doc -name readme\* or
$find /usr/share/doc -name readme'*'
I want to know: After using the “\” or ' ', why the wildcard do not become a character "*"?(still a metacharacter).
Another question:
I want to find any file its names begin with "readme*" string using the command find.What command should I use?I want to know: After using the “\” or ' ', why the
wildcard do not become a character "*"?(still a
metacharacter). The backslash is known as an escape character. It means 'use the character value of the next character, not the special meaning' It is used in a lot of places such as command line, global regular expression patterns, and editors such as vi.
In a typical shell, the splat (*) expands to all file names before passing the file names to the current command. So a \* sequence tells the shell to pass a *, not a list of file names, to the command.
Demo - OpenSuSE Linux 10.3
- I have a bunch of files. Let's list those that end in grid. Create one called *grid, and list again
pops@fuzzyVM:~/pops> ls
a b c startgrid stopgrid
pops@fuzzyVM:~> ls *grid
startgrid stopgrid
pops@fuzzyVM:~> ls \*grid
ls: cannot access *grid: No such file or directory
pops@fuzzyVM:~> touch '*grid'
pops@fuzzyVM:~/pops> ls
a b c *grid startgrid stopgrid
pops@fuzzyVM:~/pops> ls *grid
*grid startgrid stopgrid
pops@fuzzyVM:~/pops> ls \*grid
*grid
pops@fuzzyVM:~/pops>In the above, how would I remove the file *grid, and only that file?
Another question:
I want to find any file its names begin with
"readme*" string using the command find.What command
should I use?What were the results of the two versions you tried? And why? -
I have a Macbook with OS X 10.5.8. I am unable to use my iPhone with the iOS 6 upgrade on iTunes. Apparently I cannot downgrade to iOS 5 on my iPhone. Please tell me I don't have to pay anything to be able to use my products......
Which version of iTunes?
iTunes 10.6.3 - http://support.apple.com/kb/DL1575
Unless this is a new iPhone 5 I believe the older ones will work with iOS6 and iTunes 10.6.3. If it won't, you will need to upgrade operating system version. -
When will I receive my I phone 6 case which i ordered along with the I phone 6 ?As per the website it says October. How long is the wait time for the I phone 6 case?
While we have no idea within this Community Forum how long you would have to wait for your iPhone 6 Case, I can tell you that there would not be a "general" answer of value. Like any product that is available in different materials and colors, the inventory varies based on what you have specifically ordered. For example, I visited an Apple Store on the day after the iPhone 6 became available and was interested in the "Midnight Blue" Leather" Apple iPhone 6 Case. The store had plenty of all the other colors, but that specific case and color had sold out that morning.
-
Will InDesign4 work with the newest MAC operating system -- OS10.9 I think.
Will InDesign4 work with the newest MAC operating system -- OS10.9 I think. My OS crashed and they have to wipe the computer to put on a new system. I don't want the latest system if it won't run CS4. I bought Creative Suite Cloud version and had nothing but problems with it and the system I was running. In fact all the problems with my computer started just after I put CS Cloud version on it.
Thanks for answering. I'll try to be more specific in my question.
Steve Werner <[email protected]> wrote:
Steve Werner created the discussion
"Will InDesign4 work with the newest MAC operating system -- OS10.9 I think."
To view the discussion, visit: https://forums.adobe.com/message/6587879#6587879
> -
Help with a union all statement
Hello
I am pulling a query much like this:
(select ID, Created_timestamp from snapshot1
where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
UNION ALL
(select ID, created_timestamp from snapshot2
where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
UNION ALL
(select ID, created_timestamp from data_history
where created_timestamp >= to_date ('8/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM')
and created_timestamp < to_date('8/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM'))
Is there an easier way to handle created_timestamp?
I would like to put it at the beginning so I only have to change it in one place.I don't understand.
I try your with statement and get: "end_date" invalid identifier as an error
I start my query out:
WITH start_date as
(select to_date ('08/15/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM') from dual),
end_date as (select to_date ('08/18/2007 12:00:00 AM','MM/DD/YYYY HH:MI:SS AM) from dual)
select sales.id, start_date as callstart, end_date as callend
where sales.created_timestamp >= start_date
and sales.created_timestamp < end_date
UNION ALL
<<<<<<<here is where you take the last select statement and replace sales with manufacturing>>>>>>>>>>>>>
UNION ALL
<<<<<<<here is where you take the last select statement and replace sales with engineering>>>>>>>>>>>>>
and it still fails.
Maybe you are looking for
-
Configure PostFix to reject emails when nslookup ≠ ip
Hey Everyone, I'm trying to configure postfix to reject messages that don't have the correct domain associeated with the ip address. From what I can tell so far i need to create a header_check file, and tell postfix to use it in main.cf. My only prob
-
IBook G4 and a Gemini USB Camera
I am currently on holiday in India and purchased a gemini USB 2.0 web camera for online chatting. And I cannot get my iBook G4 Mac (running the latest OSX) to recognize it...at all. I was wondering if there is anyway I can trick it...or download a pr
-
QuickTime (recording screen with sound?)
I have no problem making screen recordings off the web using QuickTime but for some reason QT doesn't record the sound unless I output the sound through my external speakers for the iMac mic to pick up. I've tried all of the settings (re. image)... b
-
How to handle "ok" and "cancel" button of dialog popup?
Hello everyone, I'm using a dialog with type="okCancel". My question is how to handle ok and cancel button of this popup window. Here is my code below: <af:popup id="kriterPopup"> <af:dialog title="Kriter Seçiniz" type="okCancel" inlineStyle="width:5
-
8520 has stopped receiving emails
I have spent hours on the phone to vodafone to no avail and hours on google - someone please help!!!. My blackberry curve 8520 stopped receiving emails 5 days ago. I have rebooted, deleted email address and set up again. sent service books, enabled S