Blob in the union
hi.
i m trying te use the union with the query which has blob column.The query works fine with out union but with union it gave me error inconsistant data type.
> but there must be a alternative solution. ???????
The success (or lack thereof) of any solution depends entirely on the Problem Statement.
What you have shown us is your solution (to an unknown problem) that attempts a MINUS operation on a BLOB. A flawed solution as you've discovered.
What you have not given us is the Problem that you are trying to solve.
If you would like us to provide "alternatives", then you need to state The Problem.
Similar Messages
-
Iphone 4 battery draining fast and yellowish blobs on the screen
So I got my iphone 4 today. 32GB. Came home charged it full powered down for battery memory and left off for a few minutes like instructed.
I have not done much with the phone and I am already at 85% within an hour of using it for texting. maybe 30 texts so far. Wifi off, no tethering connection made, Brightness turned to max push every 15 minutes 3G on. For a battery that is 40%n bigger it is really draining fast.
Now I am noticing yellowish blobs on the right side vertically and a few on the top horizontally. I read in a post that it was because of not cured residue and should go away in a few days. DOES this make sense to you folks. Where does it say that on apples site.
I am about to call a tech about this and have them send me something in writing.
This is just frustrating as I was hoping for a great experience this year. From the let down from the white iphone to my battery being drained to now yellow blobs..man can anything else go wrong.
What say you??????? any of you have battery issues yetIf my past experience with iPhones and iPods is any indication, you'll find that over the next couple days as you use your iPhone the battery indicator will become more accurate. My habit (as I've done with my new iPhone 4) is to use it until the indicator shows red and then charge it fully and then do that twice more. At that point the indicator should be 'calibrated' with the battery and be more accurate. Yesterday I used my phone for about 5 hours before the battery indicator gave me 20% warning. Today I've used it as I normally would in a day and, as I always did with my G3S, I'm currently home from work with a 40% charge showing. Guess I'll have to play a little Angry Birds tonight
I've seen nothing official from Apple about the yellow splotches but I read either at Engadget or Gizmodo this morning that a worker experienced with this process claims it is the bonding adhesive which hasn't finished curing. It has been widely reported second hand. Don't know if contacting AppleCare this early in the game will get you anywhere. Since iPhones are in short supply at this time and you have a year's warranty, I'd wait a couple days and see if the report is correct. If the yellow defect goes away it was true. -
Inserting a blob in the table through java or Oracle ApplicationFramework
I am new to Oracle framework. I have a requirement to insert one file(i.e blob) into the database from custom location.(ie.D:\sample.txt). through java or OAF. But i am unable to insert the file. Is there any specific function to insert blob fields in the database...........
Did you take a look at
<JDEV_CLIENT_INSTALL_DIR>\jdevdoc\devguide\feat\feat_fileload.htm -
Automated email using blobs in the database
hi,
I am wanting to have the facility for my db to send emails with attachments(with the file stored in the db)
in an automated fashion.
the things I have working at the moment.
1. I have got a DBMS_JOB working to handle the automated part.
2. I have got a java class that sends emails. (no attachments)
3. I have loaded the java class into the database using LOADJAVA
4. A DBMS_JOB sends emails.
Now what I want to know, is
1. With attaching a file into a Java class, (remembering the program is going to be working from the database)
I assume that a BLOB is the best option? as opposed to long Raw???
2. possible specifics for the java class in attaching the BLOB to the message??
3. in Oracle Forms, how do I get a file into the database as a BLOB. using DBMS_LOB???? what sort of Item
do I declare them??
Any Ideas/help would be greatly appreciated
GregGreg,
Which database release do you plan to use? Here are the answers to your questions,
1. We recommend our customers to use CLOB/BLOBs instead of LONG/LONG RAW since Oracle8. CLOB/BLOBs are much more flexible than LONG/LONG RAW.
2. You can use JDBC to read BLOB/CLOBs from the database and format them to the desired mail protocol, say MIME. You can learn more about JDBC access of LOBs at http://otn.oracle.com/docs/products/oracle9i/doc_library/release2/appdev.920/a96591/adl03prg.htm#283613
3. You can find an example of using DBMS_LOB.LOADFROMFILE at http://tahiti.oracle.com/pls/db92/db92.tabbed?section=25021
Is there a way for me to contact you for further discussion offline?
Regards,
Geoff
hi,
I am wanting to have the facility for my db to send emails with attachments(with the file stored in the db)
in an automated fashion.
the things I have working at the moment.
1. I have got a DBMS_JOB working to handle the automated part.
2. I have got a java class that sends emails. (no attachments)
3. I have loaded the java class into the database using LOADJAVA
4. A DBMS_JOB sends emails.
Now what I want to know, is
1. With attaching a file into a Java class, (remembering the program is going to be working from the database)
I assume that a BLOB is the best option? as opposed to long Raw???
2. possible specifics for the java class in attaching the BLOB to the message??
3. in Oracle Forms, how do I get a file into the database as a BLOB. using DBMS_LOB???? what sort of Item
do I declare them??
Any Ideas/help would be greatly appreciated
Greg -
Azure Rest API PUT Block Blob Returns "The specified resource does not exist" CORS
I am trying to upload a file to Azure Blob storage. For some reason when I try to put a new block blob on in the storage it tells me the resource does not exist. I am sure it is something silly I am missing.
According to the documentation:
The Put Blob operation creates a new block blob or page blob, or updates the content of an existing block blob. Updating an existing block blob overwrites any existing metadata on the blob. Partial updates are not supported with Put Blob; the content of the
existing blob is overwritten with the content of the new blob. To perform a partial update of the content of a block blob, use the Put Block List (REST API) operation.
CORS is setup and that seems okay.
When I do a preflight and get this:
Request URL:https://<account>.blob.core.windows.net/test/image.png
Request Method:OPTIONS
Status Code:200 OK
Request Headers
OPTIONS /test/image.png HTTP/1.1
Host: <account>.blob.core.windows.net
Connection: keep-alive
Cache-Control: no-cache
Pragma: no-cache
Access-Control-Request-Method: PUT
Origin: http://www.<site>.com
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Access-Control-Request-Headers: accept, content-type
Accept: */*
Referer: http://www.<site>.com/azure/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Response Headers
HTTP/1.1 200 OK
Transfer-Encoding: chunked
Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: 0d372e95-1524-460a-ab9c-7973d42a7070
Access-Control-Allow-Origin: http://www.<site>.com
Access-Control-Allow-Methods: PUT
Access-Control-Allow-Headers: accept, content-type
Access-Control-Max-Age: 36000
Access-Control-Allow-Credentials: true
Date: Thu, 27 Feb 2014 22:43:52 GMT
But when I make the PUT request these are the results.
Request URL:https://<account>.blob.core.windows.net/test/image.png
Request Method:PUT
Status Code:404 The specified resource does not exist.
Request Headers
PUT /test/image.png HTTP/1.1
Host: <account>.blob.core.windows.net
Connection: keep-alive
Content-Length: 22787
Cache-Control: no-cache
Pragma: no-cache
x-ms-blob-content-dis; filename = "image.png"
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/33.0.1750.117 Safari/537.36
Content-Type: image/png
x-ms-blob-type: BlockBlob
Accept: application/json, text/plain, */*
x-ms-version: 2013-08-15
Origin: http://www.<site>.com
x-ms-date: Thu, 27 Feb 2014 23:19:19 GMT
Referer: http://www.<site>.com/azure/
Accept-Encoding: gzip,deflate,sdch
Accept-Language: en-US,en;q=0.8
Response Headers
HTTP/1.1 404 The specified resource does not exist.
Content-Length: 223
Content-Type: application/xml
Server: Blob Service Version 1.0 Microsoft-HTTPAPI/2.0
x-ms-request-id: d5a60c8b-356a-44ff-93af-0ea720b5591f
x-ms-version: 2013-08-15
Access-Control-Expose-Headers: x-ms-request-id,Server
Access-Control-Allow-Origin: http://www.<site>.com
Access-Control-Allow-Credentials: true
Date: Thu, 27 Feb 2014 23:22:42 GMTYour request must be authenticated to be able to upload a blob. Please see our
Windows Azure Storage: Introducing CORS blog post for more information on using Shared Access Signatures with CORS. -
Oci post varray of blobs to the database - any ideas?
This seems wierd to me and i can't help thinking I'm missing something obvious.
I can create a varray of blob on the db - called say "varrblob"; I can create an array of blob(string) in PHP; I can get multiple blobs from the db in one go via a cursor
....BUT I can't find a way to save multiple blobs to the db in one group ie. like a varray of blob.
- I have tried creating a write using an oci collection with "Oracle named type" - "varrblob" in my case but it errors with type 113 (blob) not possible when executing mycollection->append.
- I have trolled the web and found nothing better than a single blob write (which i can already do no problem)
Are there any gurus out there with any ideas?
thanks!It is a limitation
-
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 -
Does the union improves the performance?
Hi all,
I would like to know does the union in sql or pl/sql optimizes the performance of the query? here we are retreiveing the data from a remote databse to see about 3700 hundred records it took on oracle 9i 40 seconds to get, where as when we added the union its retriving the data in 2 seconds does the union has anything to do with backend in pl/sql to optimize this query.
CURSOR ecur IS
SELECT 0 id,' No PO' name,'' dir,'' SYMBOL,'' PHONE,'' EMAIL FROM dual
UNION
SELECT id,name,DIR,SYMBOL,PHONE,EMAIL
FROM [email protected]
WHERE dir IN ('A','C','W','V','S','SA','H')
AND name LIKE initcap(match)||'%'
ORDER BY name;
before added the union select statement it took 40 seconds after i added the union its taking 2 seconds.. so i want to know the difference between these two statements why so much difference in performance.
please do help me out...
Thanks a lot.....Do an explain plan of the two queries. Chances are the optimizer decided to use a different plan for the main query when you unioned it with dual.
-
Why does my iPhoto red eye reduction tool only give me blue or black blobs in the eyeballs that look completely unacceptable? Automatic mode makes blue blobs that cover iris and even eyelid! Manual mode gives black dots, not at all hte shape of a oerson's iris as seen in a picture.
And again the answer is simply
THere is no fix - that is the way it works - you can post as many times as you want but it will not change the fact that that is the way that iPhoto works
No fix
No work around
It is what it is - nothing more - nothing less
LN -
With using the Union oper. query
Hi Team
I have table like A and B
A table Structure
C1-------C2-------C3
R1-------R2--------R3
R4-------R5---------R6
B table Structure
C1-----C2
R11----R8
my output is like below
C1-------C2-------C3
R1-------R2--------R3
R4-------R5---------R6
R11----R8----------null
i can use the Union all condition i don't want to use the
union all condition who? plz help
select c1,c2,c3
union
select c1,c2;870003 wrote:
Hi Team
I have table like A and B
A table Structure
C1-------C2-------C3
R1-------R2--------R3
R4-------R5---------R6
B table Structure
C1-----C2
R11----R8
my output is like below
C1-------C2-------C3
R1-------R2--------R3
R4-------R5---------R6
R11----R8----------null
i can use the Union all condition i don't want to use the
union all condition who? plz helpWhy don't you want to use union all, because that is exactly what you are trying to achieve? -
Better to write this query -- the UNION kills the query
Is there a better way to write this qery to avoid the union?
CREATE TABLE EMP
EMP_ID NUMBER,
LAST_NAME VARCHAR2(20),
FIRST_NAME VARCHAR2(20),
MID_NAME VARCHAR2(20)
CREATE TABLE EMP_NM
EMP_ID NUMBER,
LAST_NAME VARCHAR2(20),
FIRST_NAME VARCHAR2(20),
MID_NAME VARCHAR2(20)
INSERT INTO EMP
VALUES(
1, 'ANDERSON', 'SCOTT', NULL)
INSERT INTO EMP
VALUES
(2, 'KEVINSKY', 'KEVIN', NULL
INSERT INTO EMP_NM
VALUES(
1, 'ANDERSON', 'SCOTT', NULL)
INSERT INTO EMP_NM
VALUES(
1, 'LEE', 'SCOTT', 'K')
INSERT INTO EMP_NM
VALUES
(2, 'KEVINSKY', 'KEVIN', NULL )
INSERT INTO EMP_NM
VALUES
(2, 'ANDERSON', 'KEVIN', NULL )
SELECT
E.EMP_ID ,
E.LAST_NAME ,
E.FIRST_NAME ,
E.MID_NAME FROM
EMP E
WHERE
E.LAST_NAME =:LAST_NAME
UNION
SELECT
E.EMP_ID ,
E.LAST_NAME ,
E.FIRST_NAME ,
E.MID_NAME
FROM
SELECT EN.EMP_ID
FROM
EMP_NM EN
WHERE
EN.LAST_NAME =:LAST_NAME ) EN1 ,
EMP E
WHERE
E.EMP_ID = EN1.EMP_IDEXPLAIN PLAN without sort
SELECT STATEMENT Optimizer Mode=CHOOSE 171 K 6717
FILTER
TABLE ACCESS FULL EMP 171 K 5 M 6717
TABLE ACCESS BY INDEX ROWID EMP_NM 1 14 1
INDEX RANGE SCAN IDXEMP_ID 1 3
EXPLIAN PLAN WITH SORT
Operation Object Name Rows Bytes Cost Object Node In/Out PStart PStop
SELECT STATEMENT Optimizer Mode=CHOOSE 171 K 7658
SORT ORDER BY 171 K 5 M 7658
FILTER
TABLE ACCESS FULL EMP 171 K 5 M 6717
TABLE ACCESS BY INDEX ROWID EMP_NM 1 14 1
INDEX RANGE SCAN IDXEMP_ID 1 3 -
Writing BLOBS to the filesystem
Here's my problem.
I know how to read any filetype into the database using a OLE
container mapped to a BLOB column in the Oracle 8i database.
How do I then, write the BLOB to the filesystem.
nullHello AlaaShaw,
Best practice for this type of application is to have two loops--one that handles deterministic operations and one that performs non-deterministic operations (such as writing to file or communicating to the host PC). You can transfer data between these loops using RT FIFO variables without affecting the determinism of your main loop, or with single-process shared variables. Here is a help document explaining data communication:
http://zone.ni.com/reference/en-XX/help/371361L-01/lvconcepts/data_comm/
An example for how to implement this architecture can be seen here:
http://www.ni.com/tutorial/11198/en/
http://www.ni.com/tutorial/52028/en/
In the future, please post to the LabVIEW RT discussion forum. This will increase the visibly of your issue and increase the response time.
http://forums.ni.com/t5/forums/searchpage/tab/message?submitted=true&type=message&q=rt&page_size=50&...
Regards,
Thomas C.
Applications Engineer
National Instruments -
Report navigation not working properly for the union report
i have a report which is union and i need to navigate to another report(detailed).the filters are not carried out to the detailed report .Please suggest me on how to get the filters ar e correctly applied on detailed report.I have prompted the fileds in the detailed report.
Hi,
Please refer to the below thread.
Re: OBIEE-UNION Request navigate is not working (Parameter value is not passed)
Hope it helps!
Thansk -
Html db to display pdf files saved as blob in the data base
Hi all,
I have a DB page to call next page to display pdf files.
A procedure is being called when the link is clicked on the first page.
However, the procedure output a juck code insteand the pdf files. Please help.
Thanks,
n_length number;
n_image BLOB;
begin
select note_image, dbms_lob.getlength(note_image)
into n_image, n_length
from n100_notes where note_id = nid;
owa_util.mime_header('application/pdf');
htp.p('Content-length: ' || n_length);
wpg_docload.download_file(note_image );we use:
owa_util.mime_header('application/pdf',false);
htp.p('Content-Length: ' || dbms_lob.getlength(l_blob));
owa_util.http_header_close;
wpg_docload.download_file(l_blob);
see plpdf.com
LL -
Error inserting a Blob in the database
Hi Everyone.
I have a TABLE (Oracle) which has a Blob field, when I catalogue it the data type inside the BPM is Binary.
Everything goes fine, but when I try to INSERT a row in that table I get the following exception:
Caused by: java.lang.ClassCastException: fuego.sql.BlobImpl
at oracle.jdbc.driver.OraclePreparedStatement.setBlob(OraclePreparedStatement.java:6466)
at oracle.jdbc.driver.OraclePreparedStatementWrapper.setBlob(OraclePreparedStatementWrapper.java:126)
at fuego.jdbc.FaultTolerantPreparedStatement.setBlob(FaultTolerantPreparedStatement.java:136)
at fuego.sql.SQLUtils.setParameter(SQLUtils.java:424)
at fuego.sql.SQLObject.setFldParams(SQLObject.java:465)
at fuego.sql.SQLObject.setFldParams(SQLObject.java:455)
at fuego.sql.TableSQLObject.update(TableSQLObject.java:909)
at fuego.sql.TableSQLObject.implicitStore(TableSQLObject.java:378)
at fuego.sql.TableSQLObject.store(TableSQLObject.java:340)
at sun.reflect.GeneratedMethodAccessor480.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.lang.JavaClass.invokeMethod(JavaClass.java:1410)
at fuego.sql.SQLObject.invoke(SQLObject.java:364)
at fuego.lang.Invokeable.invokeImpl(Invokeable.java:234)
at fuego.lang.Invokeable.invokeDynamic(Invokeable.java:188)
at OFERTAS_COMERCIALES.ABMOfertasNuevo.Default_1_0.Instance.CIL_testBLOG(Instance.xcdl:21)
at OFERTAS_COMERCIALES.ABMOfertasNuevo.Default_1_0.Instance.CIL_testBLOG(Instance.xcdl)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(Unknown Source)
at java.lang.reflect.Method.invoke(Unknown Source)
at fuego.component.ExecutionThreadContext.invokeMethod(ExecutionThreadContext.java:512)
... 35 more
The statement is
TABLE.id = 1;
TABLE.contenido = at.contents
store(TABLE)
also tried:
params as Any[] = []
params[] = 1
params[] = Binary(data : at.contents).data
retVal as Int
query as String = "INSERT INTO TABLE(id, contenido) VALUES (?,?)"
extResource as String = "db"
retVal = executeUpdate(DynamicSQL, sentence : query,
implname : extResource,
inParameters : params)
and the result was the same.
The select statments works fine.
Any idea???
I'm working with Studio Version: 10.3.2 Build: #100524
Thanks in advance.
CarlosHi,
Plz check the following thread, you may have the similar issue.
Insert and Retrieve BLOB column with Oracle BPM
Bibhu
Maybe you are looking for
-
I am out all of my contacts, trying to figure out a way to send them to my new apple id so I don't have to retype everything back into the phone. Any advice is appreciated!
-
Error in creating Adaptive Webservice model from local wsdl file
hi , I am working on Netweaver7.1 CE. I am creating adaptive webservice model from local wsdl file which i have saved at location D:/subordinate WSDL WSDL By Raju/Manager.wsdl on my pc. I am able to bind context , build and deploy. But when i am
-
whenever i try to sync my new ipod 80g my computer reboots help!!
-
I want to hide a column in report 6i
hi I want to hide a column in report 6i, I used this code function F_col_qty3FormatTrigger return boolean is begin if :color3 is null then return (false); else return (TRUE); end if; end; plz note that COL_QTY3 and COLOR3 both are from diff
-
Add a new field on SRS (SAP Retail Store)
Hi Experts, We have a requirement to add a new field on the SRS(SAP Retail Store) screen for Purchase Order. We identified the template - zwspo_entry/90/saplwspo_docdlg_2000. We included a new field in the Internet Services => ZWSPO_DOCDLG under TOPI