SELECT from the table during a TRUNCATION operation...
Nice dayEnvironment: Oracle 10 g 2 EE on AIX and Crystal Reports/Crystal Enterprise (XI 3.1)
We have a table that is refreshed every 10 minutes throughout the day and night. Users run reports against the table pretty well any time they want. The table is updated through OWB by using the TRUNCATE/INSERT that first truncates the table and then reloads the entire table.
Opportunities random when the user runs the report at the same time as the update of the table, the user gets an error message from Crystal as follows:
Error in the file ~ tmp23206abf4faed20.rpt: impossible to extract the data from the database. Details: [database vendor Code: 8103]
In other cases, which is the one that I expect, the user sees a report empty and all simply of runs again the report. The report only takes a few seconds.
This error could be due to the Crystal report trying to get the data in the table at the EXACT time that the table is truncated?
Other thoughts are welcome!
Thank you very much!
-gary
Hi Gary,.
This behavior is described in MOS 170185.1
Concerning
Peter
Tags: Database
Similar Questions
-
Select from the table where the last character of the string is numeric
Hello
I have a table of STREETS with a field called ADDRESS. I want to select all the records in streets where the last character in the address is a number.
Select ADDRESS of STREETS where regexp_like (substr (address,?,?,), '[0-9]');
--? means that I don't know what to put here!
I don't know if substr is the best approach to do this, because I want only the last character and the records are of different lengths.
Thank you!Hello
If you want to use regular expressions:
WHERE REGEXP_LIKE ( address , '[0-9]$' )
You can get the same results, no doubt more effectively, without regular expressions:
WHERE INSTR ( '0123456789' , SUBSTR (address, -1) ) > 0
-
Select from the table on the highest priority
I have a table TAB1, who has, among other things, the 2 fields. FIELD1 is a non-unique ID and FIELD2 is a two character code. For example:
123, AA
123, AZ
124, BB
124, BY
I also have a second table TAB2 that contains 3 fields. Field1 + Field2 are two character codes and FIELD3 is an integer used as a priority. Tab2 is used as a translation table. For example:
AA, OO, 1
AZ, O2, 2
BB, OQ, 3
BY, P9, 4
What I would do is for each ID of TAB1, select the code of the TAB2 translation with the highest priority.
Any help appreciated.
Thank youuser12141187 wrote:
What I would do is for each ID of TAB1, select the code of the TAB2 translation with the highest priority.Assuming that 1 is the highest priority and 4 is the lowest:
select field1, field2 From ( Select t1.field1,t2.field2 ,rank() over(partition by t1.field1 order by t2.priority) rn from Tab1 T1,Tab2 T2 where t1.field2 = t2.field1 ) where rn = 1
Vivek L
-
Open sys_refcursor to select from the table variable?
Hello
I have a challenge for you! :-)
I have a procedure that has a lot of logic to determine which data should be loaded into a table variable. Because of various constraints of the application, I can't create a global temporary table. Instead, I would like to create a table variable and fill with stuff that I go through the procedure.
The final outcome of the procedure is that I must be able to pass the results as a sys_refcursor. It is a requirement that is beyond my control as well.
Is there a way to do this kind of work of the procedure?
Create Or Replace procedure Xtst
(
Mu_Cur in the Sys_Refcursor
)
Is
Type Xdmlrectype is Record (Col1 Varchar2 (66));
Type Xdmltype is Table of Xdmlrectype;
RTN Xdmltype;
Begin
Internal_Id Select Bulk collect into Rtn of Zc_State;
Open mu_cur to select table col1 (rtn);
end;
/
---
11/42 PLS-00642: types of local collections not allowed in SQL queries
11/36 PL/SQL: ORA-22905: cannot access the rows of a table not nested element
11/19 PL/SQL: statement ignored
Display errors;Not something I would personally like to implement.
But for educational purposes only of course...
create table this_will_be_gross ( column1 number, column2 varchar2(30) ); insert into this_will_be_gross values (1, 'begin the ugliness'); insert into this_will_be_gross values (2, 'end the ugliness'); variable x refcursor; ME_XE? declare Rtn sys.ODCIVARCHAR2LIST; BEGIN SELECT column1 || '-' || column2 Bulk Collect INTO Rtn FROM this_will_be_gross; OPEN :x FOR SELECT regexp_substr (column_value, '[^-]+', 1, 1) as column1, regexp_substr (column_value, '[^-]+', 1, 2) as column2 FROM TABLE(CAST(rtn AS sys.ODCIVARCHAR2LIST)); end; 17 / PL/SQL procedure successfully completed. Elapsed: 00:00:00.09 ME_XE? ME_XE?print :x COLUMN1 COLUMN2 ------------------------------ ------------------------------ 1 begin the ugliness 2 end the ugliness 2 rows selected. Elapsed: 00:00:00.11
In the above example I have "know" that a hyphen was a safe character to use to break my data items (as could not find anywhere in the data itself).
I strongly encourage you don't not to implement something like this. I know it's tempting when you work in harsh environments where it may take a serious battle to get structures such as temporary tables or the SQL Types created, but it is really the right way to do it.
-
To create an interactive report in the apex by selecting from multiple tables
Hi, I am creating an interactive report by selecting from multiple tables.
SELECT w.FIRST_NAME as name, w.SURNAME as name, i.ROAD Road, i.DATE_OF_INC as DATE_OF_INC, S.STATEMENT as a STATEMENT OF Declaration
JOIN THE
WITNESS w
ON w.witness_id = s.FK1_WITNESS_ID
JOIN THE
Incident I have
WE
i.incident_no = w.FK1_INCIDENT_NO
JOIN THE
user_station ps
ON ps.station_id = i.nearest_station_id
JOIN THE
the user in.
WE
in. STATION_ID = ps.station_id
WHERE po.officer_id = 1
by I continue to encounter this error "the report query requires a unique key to identify each row. The supplied key cannot be used for this query. Please change the report attributes to define a unique key column. "ORA-01445: cannot select ROWID from where sample, a join without key preserved table view '
So I googled around and found that in the attibutres tables report, I need to change the "LINK" COLUMN so first, I changed "Link to custom target", but the report is so I changed it to "Exclude link Clolumn" again, the report didn't report and I STILL got a blank page with only the tabs.
I wonder you can not create a report by selecting from multiple tables?
If you can please I need your help.
Thank you
You can, but in this case, it might be easier to build your report tables that are joined Oracle views and then build your report out of the newly built sight...
Or wrap a selection around your selection with joins, and then make the where clause on the external selection...
Thank you
Tony Miller
Software LuvMuffin
Ruckersville, WILL -
ORA-22992: cannot use LOB Locators selected from the remote tables...
Oracle 10.2.1.0.4
Solaris 10
We try to access a table in another database via a db_link.
The table we are trying to access has a LOB.
We get the following error: ora-22992: cannot use LOB Locators selected from the remote tables.
Is there a way to get around this? We need the data in the BLOB field.
Thank you.See on metalink:
ORA-22992 has a workaround solution in 10 gr 2
DOC - ID: 436707.1Werner
-
Select from another table, when the query returns no result
Hello
I have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.
SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid
Any help will be greatly appreciated.
Thank you.user10407139 wrote:
HelloI have a question where I'm supposed to retrieve the address of an account id-based billing. However, the table of billing may not have an address. There is a table of addresses that always has an address for an account. If the billing address exists, it should be used, so I can't use the address table. Is it possible in a select statement to query to the billing address and if it does not exist, use the address table.
SELECT * FROM accounts a, b billings WHERE a.accountid = b.accountid
Any help will be greatly appreciated.
I think you need to explain more clearly if
-you only have a couple of "billing" columns which is empty and in this case, you want to use the columns from the table 'accounts '.
- or you have a join with another table that doesn't return data, for example a foreign key "address_id" "billing" is zero and therefore the join to other tables 'address' will return all the data
In the first case, you have already been provided with some examples here, how to use NVL or similar functions to achieve, even if the first post first evaluates the information of 'accounts' and if it is white using information from "billing". According to your description you need the other way around. The second post a subquery recursive useless in my opinion.
In the latter case, you should probably use an "outer" join so that the data in your table "bills" are returned, even if the join to another table is not at all the lines.
SELECT NVL(AD1.ADDRESS_ATTR1, AD2.ADDRESS_ATTR1) as ADDRESS_ATTR1, NVL(AD1.ADDRESS_ATTR2, AD2.ADDRESS_ATTR2) as ADDRESS_ATTR2, NVL(AD1.ADDRESS_STREET, AD2.ADDRESS_STREET) as ADDRESS_STREET, ... FROM accounts a INNER JOIN billings b ON a.accountid = b.accountid LEFT OUTER JOIN address ad1 ON b.address_id = ad1.address_id INNER JOIN address ad2 ON a.address_id = ad2.address_id;
In this way you pick up the address stored in the "invoices" table, if it existed, otherwise you pick up the address assigned to the "accounts" table I used an inner for the second address join join because you said that the account always has an assigned address.
Kind regards
RandolfOracle related blog stuff:
http://Oracle-Randolf.blogspot.com/SQLTools ++ for Oracle (Open source Oracle GUI for Windows):
http://www.sqltools-plusplus.org:7676 /.
http://sourceforge.NET/projects/SQLT-pp/ -
I use a PC and I used LR3. I'm a newcomer to LR, so patient with me! My problem is related to the import function.
I have a photo library on an external hard drive. I've slowly been import previews of the photos selected from the library in my catalog, adding them during the import process - well. But now, I hit a problem. Another folder in my library contains several subfolders, each containing a number of photos (a mixture of RAW steals (naves) and jpg). I was importing found in my catalog each Subfile in turn, using the Add function, usually of the jpgs only from each Subfile. It works fine, until I reached a particular Subfile. For some reason when I try to import from it and select the secondary file as a Source, only the RAW (NEF) images appear in the preview pane (sorry, forgot the correct term for it!). I know that jpg files are in this auxiliary file on the external hard drive, because when I view its content in Windows, they are all there. But try as I can (choose the file under source, select the folder parent as a source, try to copy or move them, instead of adding them), nothing seems to work. Since they do not appear in the preview pane, I can't import them. It does appear that this a Subfile where the problem exists, but I don't see anything that is different from the others (names of files under all use the same structure - yyyy-mm-dd_custom name, and pictures in all subfolders are adopting the same denomination structure too - yyyy-mm-dd_sequential number_custom name.) NAVE/JPG. So what I am doing wrong? Any ideas please.
It is possible that the images in this particular subfolder were taken in your camera in RAW + JPEG. If so, you will need to go to preferences under the general tab and make sure the box "processing JPEG files files next to raw as separate photos" is checked.
However, assuming that this is the case, there is really no reason to import the JPEG file if you already have the RAW file.
-
How to validate at least one line selected on the table?
Hello world
I have a requirement here to display a list of customers at a table "select unique" and a button to send the page. When the user clicks this button, I need to validate if there is a selected line in the table. What is the best approach tho do?
I tried to validate it on actionListener in the click of a button, but even if I put adfFaces messages running, it does not appear on the screen and the page is still subject.
Is the BPM 11 g context of the project, so I have to do this validation and 'Cancel' the submit, otherwise the data passes through the flow until the next activity.
Maybe the real question is: how to undo a page submit during an actionListener?
Thank youHello
Small correction to Vinod, tableBinidng.getSeelctedRowKeys () always returns non-null (returns empty set when nothing is selected), then use the tableBinidng.getSeelctedRowKeys () .getSize () to check if a line is selected or not (0-nothing selected).
If you do not want to treat the action up to save if an option is selected, why don't you try disable the button until something is selected in the table?
To disable a button when no rows selected, simply add after the disabled property of a button value update it based on the table (add partialTriggers to the table)
Jean Lou
-
Image display according to the value selected from the bean of choice
Hello
I have a table with columns of bean of choice and have an another bean image
based on the value selected from the bean of choice of a particular line, I want to display an image in the column of bean image
and it is particularly in the line, in which the user changes the value of the bean of choice.
Please help me
Thank youHello
H1.If I choose 'user' of choice its not display any image, but I need disabled display images it
-have you set the URI of the Image of the time of the image?
-deleteicon_enabled.gif N deleteicon_disabled.gifConcerning
Meher IrkPublished by: Meher Irk on October 24, 2010 12:18 AM
-
Add and remove users from the table
Hi, guys. I do a system that allowed admin in the user control.
The ID is = admin
The neck is = 6649481
Can someone help me to check add it and remove the part.
Actually, it may work, but I would like to make he repeats no is allowed, but it works on the index of '0' and then index 1, it will not stop the user to add id repeated.
Delete if I had to remove the loop will be fine and work well, but it can only remove the top. It's like first first concept but I would like to do as a function of the ID given to remove from the table.
-
How to export data from the table with the colouring of cells according to value.
Hi all
I use jdeveloper 11.1.1.6
I want to export data from the table with a lot of formatting. as for color cells based on value and so much. How to do this?
You can find us apache POI-http://poi.apache.org/
See this http://www.techartifact.com/blogs/2013/08/generate-excel-file-in-oracle-adf-using-apache-poi.html
-
Get columns from the table shown in the iterator
Hello...
I have the table in a collection of standard panel. So, I can show/hide certain columns in the table using the columns in the view menu.
Then I'm trying to do is export to excel (using apache poi) by looping through the table iterator. What I can't do is search if the column is not displayed. I don't want all the columns that are exported without worrying. How can I achieve this?
My bean is similar to the following for loop through the iterator:
BindingContext bindingContext = BindingContext.getCurrent ();
BindingContainer bindingContainer = bindingContext.getCurrentBindingsEntry ();
DCIteratorBinding dcIteratorBinding = (DCIteratorBinding) bindingContainer.get ("EmployeesIterator");
lines [] oracle.jbo.Row = dcIteratorBinding.getAllRowsInRange ();
for (oracle.jbo.Row line: lines) {}
{for (String colName: {row.getAttributeNames ())}
output to excel cell here using row.getAttribute (colName) m:System.NET.SocketAddress.ToString)
}
}
Thank you.
Hello
It's like ask the engine in your car to what colors the seats have. The iterator doesn't know anything about the visible state of a column. If the displayed columns must be determined from the table instance (richeTableau)
The following article solves exactly the requirement that you have: Oracle ADF: Build Your Own it comes with a sample that you can download here: http://www.oracle.com/technetwork/issue-archive/2013/13-jul/o43adf-1940728.zip
Have a look at CustomPanelCollectionBean.java:
The method and code that you want to look for is:
private String getRowHtml (row rw) {}
StringBuffer rowHtmlBuf = new StringBuffer();
Read visible columns in the table of the table instance. This way the
PanelCollection can be used to show/hide columns and exclude
printing to HTML
Table richeTableau = this.getRichTable ();
the list of columns determine the print attributes
The list of columns in
= table.getChildren (); int attrCount = columns.size ();
rowHtmlBuf.append (this.addRowStart ());
for (int i = 0; i)< attrcount;="" i++)="">
for all visible columns, add columns to print
If (((RichColumn) columns.get (i)) .isVisible ()) {}
If (rw.getAttribute (i) instanceof ViewRowSetImpl) {}
ignore the collections of detail used for master/detail example
constraints in British Colombia ADF
} ElseIf (rw.getAttribute (i) instanceof oracle.jbo.domain.Timestamp) {}
shorten date to exclude the infromation times
SimpleDateFormat sdf = new SimpleDateFormat("dd-MM-yyyy");
String dateFormatString = sdf.format (((Timestamp) rw.getAttribute (i)) .getData ());
rowHtmlBuf.append (this.addDataCell (dateFormatString));
} else {}
Prnt attribute values and if sure that null values don't raise a NPE. Add a white character to NULL
attribute values
rowHtmlBuf.append (this.addDataCell (rw.getAttribute (i)! = null? rw.getAttribute (i) m:System.NET.SocketAddress.ToString ():))
" "));
}
}
}
rowHtmlBuf.append (this.addRowEnd ());
Return rowHtmlBuf.toString ();
}
You need to access the Rich Table instance (for example using the JSF component binding) to then compare the attribute in the iterator with the visibility of the column
Frank
-
Is it possible to see/get the data from the table to a dump file
I have files dmp generated using expdp on oracle 11 g...
expdp_schemas_18MAY2013_1.dmp
expdp_schemas_18MAY2013_2.dmp
expdp_schemas_18MAY2013_3.dmp
Can I use a settings file given below to get the data from the table in the file sql or impdp the only option to load the data of table in database.
VI test1.par
USERID = "/ as sysdba".
DIRECTORY = DATA
dumpfile=expdp_schemas_18MAY2013%S.dmp
SCHEMAS = USER1, USER2
LOGFILE = user_dump_data.log
SQLFILE = user_dump_data. SQL
and impdp parfile = test1.par.
No,
DataPump cannot retrieve a dumpfile data in a flat file.
Dean
-
line selected in the table in jdev11
I have listener custom selection for table to do things according to the selected line, but when the table has a single row of this line is automatically selected my interlocutor of choice is not triggered, so my question is how to accomplish that, initially, no row is selected in the table?Depends on the use case, but you can do this by deleting the attribute selectedRowKeys of the table.
Pedja
Maybe you are looking for
-
Download a previous version of logic pro
I changed my computer and now I want to download my logic pro (version 9.1) can I do? (how do I do that?)
-
Memory dedicated and shared on the W700?
Title says it all... Graphic how dedicated and shared w700 with i5 and hd 4000 there? Thanks in advance
-
My hard disk crashed - I have questions about the network now.
My hard drive crashed on the computer that was the computer on which the files shared. We had a T: climb together on this computer where we recorded the files and programs that we wanted to share. My questions are this... We have replaced the hard
-
Hello!I have a LG V700 tablet with 5.0.2 version, the V70020c software. I can't install it because is not compatible, but the required version is 4.3 or maximum.Please help me!Thank you!
-
Dear all,Oracle Database 11g R2 11.2.0.1 SE1Consider the stringMadhu, no. 34 Church street, main road, TMKI need to trim the string based on the conditions below.Condition 1: Split string 35 characters eachCondition 2: Search until the previous by co