Problem with column alias: Unknown column 'avg_rating' in 'where clause'
Hello,
I have a basic sql statement as follows:
SELECT
e.establishment_id,
e.establishment_name,
avg(r.rating) avg_rating
FROM
establishment e,
rating r,
comment com,
establishment_country ec,
country_ref cou
where
etc...
and avg_rating >= 1
and 0=0
group by e.establishment_id
order by e.establishment_idI have used a column alias for "avg(r.rating)" and named it "avg_rating".
It works in my Mysql Query browser without problem but when I run it from Java I get this:
java.sql.SQLException: Unknown column 'avg_rating' in 'where clause'
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:2928)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1571)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:1666)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2988)
at com.mysql.jdbc.Connection.execSQL(Connection.java:2917)
at com.mysql.jdbc.Statement.executeQuery(Statement.java:824)
at org.jboss.resource.adapter.jdbc.WrappedStatement.executeQuery(WrappedStatement.java:145)
at arcoiris.SearchSessionBean.performSearch(SearchSessionBean.java:73)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at org.jboss.invocation.Invocation.performCall(Invocation.java:345)
at org.jboss.ejb.StatelessSessionContainer$ContainerInterceptor.invoke(StatelessSessionContainer.java:214)
at org.jboss.resource.connectionmanager.CachedConnectionInterceptor.invoke(CachedConnectionInterceptor.java:149)
at org.jboss.ejb.plugins.StatelessSessionInstanceInterceptor.invoke(StatelessSessionInstanceInterceptor.java:154)
at org.jboss.webservice.server.ServiceEndpointInterceptor.invoke(ServiceEndpointInterceptor.java:54)
at org.jboss.ejb.plugins.CallValidationInterceptor.invoke(CallValidationInterceptor.java:48)
at org.jboss.ejb.plugins.AbstractTxInterceptor.invokeNext(AbstractTxInterceptor.java:106)
at org.jboss.ejb.plugins.TxInterceptorCMT.runWithTransactions(TxInterceptorCMT.java:335)
at org.jboss.ejb.plugins.TxInterceptorCMT.invoke(TxInterceptorCMT.java:166)
at org.jboss.ejb.plugins.SecurityInterceptor.invoke(SecurityInterceptor.java:153)
at org.jboss.ejb.plugins.LogInterceptor.invoke(LogInterceptor.java:192)
at org.jboss.ejb.plugins.ProxyFactoryFinderInterceptor.invoke(ProxyFactoryFinderInterceptor.java:122)
at org.jboss.ejb.SessionContainer.internalInvoke(SessionContainer.java:624)
at org.jboss.ejb.Container.invoke(Container.java:873)
at org.jboss.ejb.plugins.local.BaseLocalProxyFactory.invoke(BaseLocalProxyFactory.java:415)
at org.jboss.ejb.plugins.local.StatelessSessionProxy.invoke(StatelessSessionProxy.java:88)
at $Proxy172.performSearch(Unknown Source)
at arcoiris.SearchManagedBean.performSearch(SearchManagedBean.java:171)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:585)
at com.sun.faces.el.MethodBindingImpl.invoke(MethodBindingImpl.java:126)
at com.sun.faces.application.ActionListenerImpl.processAction(ActionListenerImpl.java:72)
at javax.faces.component.UICommand.broadcast(UICommand.java:312)
at javax.faces.component.UIViewRoot.broadcastEvents(UIViewRoot.java:267)
at javax.faces.component.UIViewRoot.processApplication(UIViewRoot.java:381)
at com.sun.faces.lifecycle.InvokeApplicationPhase.execute(InvokeApplicationPhase.java:75)
at com.sun.faces.lifecycle.LifecycleImpl.phase(LifecycleImpl.java:200)
at com.sun.faces.lifecycle.LifecycleImpl.execute(LifecycleImpl.java:90)
at javax.faces.webapp.FacesServlet.service(FacesServlet.java:197)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:252)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.jboss.web.tomcat.filters.ReplyHeaderFilter.doFilter(ReplyHeaderFilter.java:81)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:202)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:173)
at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:213)
at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:178)
at org.jboss.web.tomcat.security.CustomPrincipalValve.invoke(CustomPrincipalValve.java:39)
at org.jboss.web.tomcat.security.SecurityAssociationValve.invoke(SecurityAssociationValve.java:159)
at org.jboss.web.tomcat.security.JaccContextValve.invoke(JaccContextValve.java:59)
at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:126)
at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:105)
at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:107)
at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:148)
at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:856)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.processConnection(Http11Protocol.java:744)
at org.apache.tomcat.util.net.PoolTcpEndpoint.processSocket(PoolTcpEndpoint.java:527)
at org.apache.tomcat.util.net.MasterSlaveWorkerThread.run(MasterSlaveWorkerThread.java:112)
at java.lang.Thread.run(Thread.java:595)Can anyone help please?
Thanks in advance,
Julien Martin.
I am having the similiar problem, the query in java creator IDE works fine after i upgraded the J-connector and changed DataSource type for MySQL to mysql-connector-java-5.0.4-bin.jar. but still i cannot bind any control in the form to the aliased column. this is really frustrating. can anyone from Sun Developer explain?
THX
Similar Messages
-
HELP!!!! problem with motherboard HP Probook 4520s , need replacement, where can i buy it??
bumer_v
You can buy by HP PartSurfer or her
Say thanks by clicking the "Kudos! Star" which is on the left.
Make it easier for other people to find solutions, by marking my answer with "Accept as Solution" if it solves your issue. -
Problem with JDBC and VARCHAR-Columns
Hi,
i have a problem handling VARCHAR-Columns via JDBC.
I.e. by using the JDBC-components of <SunONE Community Edition Update 1> any attempt to store any other then numeric values (like "0", "01", "999" etc.) in a column of type VARCHAR results in an error.
After entering the string "test" in a JTextArea or JTextField (which is linked by its document to the VARCHAR-column) i will receive:
"java.lang.NumberFormatException: For input string: "st"/For input string: "st". I also tried the javax.sql. rowSet methods like updateString() with the same result.
Are there any knwon issues corresponding to this behaviour?
<b>Configuration details:</b>
<i>JDBC-Driver:</i>
package com.sap.dbtech.jdbc, MaxDB JDBC Driver, MySQL MaxDB, 7.5.1 Build 000-000-002-750 on Java 1.4.2
<i>Database-version:</i>
7.5.00.16 on WindowsXP Pro SP1
<i>JRE:</i>
1.4.1_02
The <i>trace-file</i> only show this statements:
[email protected] (UPDATE NOTARZTEINSATZPROTOKOLL_1 SET NEUROLOGISCHER_ERSTBEFUND = ? WHERE NAP_ID = ? AND EP_ID = ? AND BEMERKUNG IS NULL AND SOZ_ID IS NULL AND PSYZ_ID IS NULL AND ERSTBEFUND_ZEITPUNKT IS NULL AND GCSAO_ID_EB IS NULL AND GCSBVR_ID_EB IS NULL AND GCSBMR_ID_ARMLINKS_EB IS NULL AND GCSBMR_ID_ARMRECHTS_EB IS NULL AND GCSBMR_ID_BEINLINKS_EB IS NULL AND GCSBMR_ID_BEINRECHTS_EB IS NULL AND BWSL_ID_EB IS NULL AND EXTB_ID_ARMLINKS_EB IS NULL AND EXTB_ID_ARMRECHTS_EB IS NULL AND EXTB_ID_BEINLINKS_EB IS NULL AND EXTB_ID_BEINRECHTS_EB IS NULL AND PUPW_ID_LINKS_EB IS NULL AND PUPW_ID_RECHTS_EB IS NULL AND EJN_ID_FEHLTLICHTR_LI_EB IS NULL AND EJN_ID_FEHLTLICHTR_RE_EB IS NULL AND EJN_ID_MENINGISMUS_EB IS NULL AND NEUROLOGISCHER_ERSTBEFUND IS NULL AND TEMPERATUR_EB IS NULL AND RR_SYSTOLISCH_EB IS NULL AND RR_DIASTOLISCH_EB IS NULL AND HERZFREQUENZ_EB IS NULL AND EJN_ID_HF_REGELM_EB IS NULL AND BLUTZUCKER_EB IS NULL AND ATEMFREQUENZ_EB IS NULL AND SPO2_EB IS NULL AND CO2_EB IS NULL AND SCHM_ID_EB IS NULL AND ERH_ID_COR_EB IS NULL AND EELS_ID_COR_EB IS NULL AND EJN_ID_EKG_EMENTKOPPEL_EB IS NULL AND EERBST_ID_COR_EB IS NULL AND EHA_ID_COR_EB IS NULL AND ESVES_ID_COR_EB IS NULL AND EVES_ID_COR_EB IS NULL AND EKG_BEMERKUNG_EB IS NULL AND ATRH_ID_EB IS NULL AND EJN_ID_ZYANOSE_EB IS NULL AND EJN_ID_SPASTIK_EB IS NULL AND EJN_ID_RASSELGER_EB IS NULL AND EJN_ID_STRIDOR_EB IS NULL AND EJN_ID_VERLEGATEMW_EB IS NULL AND BEAM_ID_UEBERNAHME IS NULL AND ATMUNG_FREITEXT_EB IS NULL AND VERLM_ID IS NULL AND SCHWV_ID_SCHAEDELHIRN IS NULL AND SCHWV_ID_GESICHT IS NULL AND SCHWV_ID_HWS IS NULL AND SCHWV_ID_THORAX IS NULL AND SCHWV_ID_ABDOMEN IS NULL AND SCHWV_ID_BWSLWS IS NULL AND SCHWV_ID_BECKEN IS NULL AND SCHWV_ID_OEXTREMITAET IS NULL AND SCHWV_ID_UEXTREMITAET IS NULL AND SCHWV_ID_WEICHTEILE IS NULL AND VBRT_ID IS NULL AND TRT_ID IS NULL AND UHG_ID IS NULL AND SICHTK_ID IS NULL AND UNFALLZEITPUNKT IS NULL AND SAPS_2 IS NULL AND TISS_28 IS NULL AND NACA_ID IS NULL AND ZBV IS NULL )
=> com.sap.dbtech.jdbc.CallableStatementSapDB@11daf60
<at this position the trace-file ends?!; "NEUROLOGISCHER_ERSTBEFUND ist defined as
"NEUROLOGISCHER_ERSTBEFUND" Varchar (1000) ASCII; i also encountered this problem while handling shorter VARCHAR-columns with JComboBox-components...>
Any information would be very helpfully!!!
Greetings,
Arnd
Message was edited by: Arnd Benninghoff
Message was edited by: Arnd BenninghoffHi Arnd,
if I understand right you are trying to insert/update value into a Varchar(1000) column. And if you set a non numeric value you get an exception "java.lang.NumberFormatException", Right?
Of course this should work with MaxDB. The exception you get doesn't come from MaxDB's JDBC driver. The driver will only throw exceptions that are derived from java.sql.Exception.
So, I guess the error comes from a layer above the JDBC layer, possibly from the JDBC-components of <SunONE Community Edition Update 1>. This would also explain why you don't see any exception in the JDBC trace.
Did you have defined any constraints for the input field (JTextArea or JTextField)?
Hope that helps.
regards,
Marco -
Problem with Mail, and Placceholder Columns in Report 2.5
I have two problem with Developer/2000 Report 2.5:
1. What should I configure in order my Report 2.5 can
mail the report output to Microsoft Mail or MS Exchange ?
2. Placeholder Columns have an Edit PL/SQL code as Formula
columns. But when I fill the trigger at Placeholder columns
there always some error. I never know the functions of
trigger at placeholder columns. is it a bug at Report 2.5 ?,
if not please tell me how can I use the placeholder
columns trigger ?
Thank you.
Herry H.S.
nullI found out the problem... not a problem at all... thank you...
-
Anyone have a problem with the number of columns in a webform in 11.1.2?
We are converting apps from 9.3 and have discovered a problem when an unspecified error occurs when trying to pull out a web form with more than 125 columns. The form works in 9.3 and loads without error in 11.1.2 . However when its run in the new version it fails with an unspecified arror. The columns are a list of base accounts. If this is broken down between the base accounts of the immediate children of the specified account then each group works properly, but if it's the base of the specified account or the base of the children of the specified account each on a separate column definition then the error occurs. Has anyone come accross this before, or is there a new (undocumented) parameter relating to columns like MaxCells?
Just to clarify: if the columns are 125 then the form works properly, if it's 126 columns then the error is generated, and it happens immediately the form is run.
Edited by: MikeWesley on 21-Jul-2011 03:53Try copying and pasting the script of the report from the old verison into a new report in 11.1.2 instead of importing the report
-
AdvancedDataGrid problem with programmatically adding a column
Hi everybody,
I have a Problem with adding columns programmatically to a AdvancedDataGrid. The code:
var cols:Array = thisDataGrid.columns;
cols.push(dgc);
thisDataGrid.columns = cols;
does create a column, adds it to the cols array, bot the last code line has no effect. The cols wont be found in the thisDataGrid.columns property...
What could be the problem? I'm working with a test license, and on the advanceddatagrid the watermark shows up. Could this be a problem?
Thanks for help!
MarkusAs the columns property of an adg is bindable, you could try to bind it to an array and afterwards, add columns to that array:
AS:
[Bindable]
private var adgCols:Array = new Array();
private function addCol():void
var myCol:AdvancedDataGridColumn = new AdvancedDataGridColumn();
myCol.headerText = "test";
myCol.dataField = "v1";
adgCols.push(myCol);
MXML:
<mx:AdvancedDataGrid id="adg" designViewDataType="flat" columns="{adgCols}"/>
This helps?
Dany -
Problems with inserted datagridview checkbox column
I have a few problems with a checkbox column added to a datagridview. The datagridview is bound by a binding source whose datasource is a datatable. I also add in the code a checkbox column:
private
void InitializeDataGridView()
dgvInvoices.ColumnHeadersDefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
DataGridViewCheckBoxColumn chkColumn =
new DataGridViewCheckBoxColumn();
chkColumn.FlatStyle =
FlatStyle.Standard;
dgvInvoices.Columns.Insert(0, chkColumn);
dgvInvoices.DataSource = bs;
cmbInvoicingCriteria.Text =
"(All)";
DataGridViewBinding.CreateColumn(dgvInvoices,
"Date", "Date",
DataGridViewContentAlignment.MiddleLeft);
DataGridViewBinding.CreateColumn(dgvInvoices,
"Invoice", "Invoice",
DataGridViewContentAlignment.MiddleLeft);
DataGridViewBinding.CreateColumn(dgvInvoices,
"Customer", "Customer");
DataGridViewBinding.CreateColumn(dgvInvoices,
"Name", "Name");
DataGridViewBinding.CreateColumn(dgvInvoices,
"Count", "Count");
DataGridViewBinding.CreateColumn(dgvInvoices,
"Total", "Total");
DataGridViewBinding.CreateColumn(dgvInvoices,
"Driver", "Driver");
DataGridViewBinding.CreateColumn(dgvInvoices,
"Status", "Status");
DataGridViewBinding.CreateColumn(dgvInvoices,
"ARHID", "ARHID");
DataGridViewBinding.CreateColumn(dgvInvoices,
"AR", "AR");
dgvInvoices.Columns["ARHID"].Visible =
false;
dgvInvoices.Columns["AR"].Visible =
false;
this.dgvInvoices.Columns[0].DefaultCellStyle.Font =
new Font("Arial", 18,
FontStyle.Bold);
this.dgvInvoices.Columns["Date"].DefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
this.dgvInvoices.Columns[2].DefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
this.dgvInvoices.Columns["Customer"].DefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
this.dgvInvoices.Columns["Name"].DefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
this.dgvInvoices.Columns["Count"].DefaultCellStyle.Font =
new Font("Arial", 10,
FontStyle.Bold);
foreach (DataGridViewColumn dc
in dgvInvoices.Columns)
dc.ReadOnly =
true;
if (dc.HeaderText.ToLower() ==
"count" || dc.HeaderText.ToLower() ==
"name" || dc.Index == 0)
this.dgvInvoices.Columns[dc.Index].AutoSizeMode =
DataGridViewAutoSizeColumnMode.AllCellsExceptHeader;
else
this.dgvInvoices.Columns[dc.Index].AutoSizeMode =
DataGridViewAutoSizeColumnMode.Fill;
dgvInvoices.DefaultCellStyle.Alignment =
DataGridViewContentAlignment.MiddleCenter;
dgvInvoices.Columns[0].ReadOnly =
false;
dgvInvoices.Columns[0].Width = 25;
dgvInvoices.Columns[0].SortMode =
DataGridViewColumnSortMode.Automatic;
The problems I have here are
1. The first checkbox doesn't check off (it used to work when the width was 25 but then I added the code ontop to make the autosize mode of this columns to allcellscellsexcept header it stopped working. I need that though because if I don't make the autosizemode
= all cells except header then when I make the form narrow the checkbox column disappears.) I was wondering why this is happening, and how to fix it.
2. Also this column is not sortable. I added to my code dgvInvoices.Columns[0].SortMode = DataGridViewColumnSortMode.Automatic;
but it doesn't seem to work.
3. Whenever I sort another column the checked off checkboxes lose their focus. I understand that can be a problem with a bound datagridview and one unbound column, but how can I fix it?
Debra has a questionI loaded the data for all the rows from a datatable on the form. The checkbox column is that connected to that bound data. it's just there and I need to be able to tell if each row was checked or not, and I need to be able to sort the checkbox column. I
also need to be able to sort all the other columns without losing the check. The only thing commenting out the foreach would help would be that the first checkbox can be checked, but I want it to be autosizemode = allcellsexceptheader and I want to understand
why it's not working like this. Would you have any ideas? Below is how I bound the datagridview for all columns except the checkbox column.
private
void LoadDataGridView()
DataGridViewBinding.BindWithData(false, dsInvoicingFilter.Tables[0], dgvInvoices, lblEntryCount, bs);
if (dsInvoicingFilter.Tables[0].Rows.Count == 0)
btnDelete.Enabled =
false;
btnOpenInvoice.Enabled =
false;
btnPrint.Enabled =
false;
btnSaveAsInvoice.Enabled =
false;
btnVoid.Enabled =
false;
btnShip.Enabled =
false;
else
btnDelete.Enabled =
true;
btnOpenInvoice.Enabled =
true;
btnPrint.Enabled =
true;
btnSaveAsInvoice.Enabled =
true;
btnVoid.Enabled =
true;
btnShip.Enabled =
true;
bs.Position = 0;
dgvInvoices.Columns[0].Width = 25;
txtSearch.Text =
public static
void BindWithData(bool autoGenerateColumns,
DataTable datatable,
DataGridView datagridview, Label lblDGVEntryCount,
BindingSource bs)
datagridview.AutoGenerateColumns = autoGenerateColumns;
bs.DataSource = datatable;
datagridview.DataSource = bs;
DataGridViewEntryCount(datagridview, lblDGVEntryCount);
//ExpandColumns(datagridview);//to do it slows it down. Why can't the dgv remember to do it from when initialized it?
Debra has a question -
Any problem with the BREAK ON COLUMN on REPORT statement
Hi All,
We are using the sql query output to print a summary report in our application.
We are taking a ref cursor variable and capturing all the data into this. There is a group by
Clause in the select statement that will populate the ref cursor variable. And there is a BREAK on one of the column.
While printing the ref cursor variable data after each group data first line there is a gap of 4 lines and then it is printing the next line.
The format is like this.
COLA COLB COLC
abc mno XYZ
kgh yop
ksjd djf
def mno XYZ
kgh yop
ksjd djf
Is there any problem with this format. Please advice.
Thanks in advance.
Regards,
GirijaThis should handle your problem if you are facing the same problem like i'm showing ->
satyaki>
satyaki>select * from v$version;
BANNER
Oracle Database 10g Enterprise Edition Release 10.2.0.3.0 - Prod
PL/SQL Release 10.2.0.3.0 - Production
CORE 10.2.0.3.0 Production
TNS for 32-bit Windows: Version 10.2.0.3.0 - Production
NLSRTL Version 10.2.0.3.0 - Production
Elapsed: 00:00:01.58
satyaki>
satyaki>
satyaki>break on job
satyaki>
satyaki>
satyaki>select *
2 from emp
3 order by job;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7788 SCOTT 7566 19-APR-87 3000 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES 7698 03-DEC-81 950 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7566 JONES 7839 02-APR-81 2975 20
7782 CLARK 7839 09-JUN-81 4450 10
7839 KING PRESIDENT 17-NOV-81 7000 10
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7844 TURNER 7698 08-SEP-81 1500 0 30
7654 MARTIN 7698 28-SEP-81 1250 1400 30
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7777 SOURAV SLS 14-SEP-08 45000 3400 10
9999 SATYAKI 7698 02-NOV-08 55000 3455 10
13 rows selected.
Elapsed: 00:00:00.42
satyaki>
satyaki>
satyaki>clear break
breaks cleared
satyaki>
satyaki>
satyaki>select *
2 from emp
3 order by job;
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7902 FORD ANALYST 7566 03-DEC-81 3000 20
7788 SCOTT ANALYST 7566 19-APR-87 3000 20
7876 ADAMS CLERK 7788 23-MAY-87 1100 20
7900 JAMES CLERK 7698 03-DEC-81 950 30
7698 BLAKE MANAGER 7839 01-MAY-81 2850 30
7566 JONES MANAGER 7839 02-APR-81 2975 20
7782 CLARK MANAGER 7839 09-JUN-81 4450 10
7839 KING PRESIDENT 17-NOV-81 7000 10
7521 WARD SALESMAN 7698 22-FEB-81 1250 500 30
7844 TURNER SALESMAN 7698 08-SEP-81 1500 0 30
7654 MARTIN SALESMAN 7698 28-SEP-81 1250 1400 30
EMPNO ENAME JOB MGR HIREDATE SAL COMM DEPTNO
7777 SOURAV SLS 14-SEP-08 45000 3400 10
9999 SATYAKI SLS 7698 02-NOV-08 55000 3455 10
13 rows selected.
Elapsed: 00:00:00.21
satyaki>
satyaki>
satyaki>Regards.
Satyaki De. -
Problem with PnP devices, Unknown device, error code:28
Hello, my USB Mass Storage Device Not Recognized( Flash drive- HP v156w, 16 GB)
Full story : I opened flash disk, started to loading and opening files very slow, suddenly all writing, names of the files become unreadable. I took off the flash disk and try again. I got the message- disk have to be formated to be used
again. After a lot of try I got this message:
Unknown device doesn't have a driver ; and Problem with PnP devices when i run trouble shoot in devices and printers on my Sony VAIO laptop( Windows 8, 64 bit), and error code:28 for unknown device doesn't have a driver.
Do other usb devices work ok in the same usb port? - yes
Has someone else/or you used it on another pc?- yes
Does it work ok on a different pc? - the same problem
Did you pull it out with using 'Safely Remove Hardware'? - yes, a lot of time after its become invisible, unknoun
Was it previously working ok with your W8 laptop? - never tried befor
Disk Management can't see the drive.
device manager:
usb device with yellow sine and instead name strange sines
divice tipe - other devices
manufacturer - unknown
location- on USB Mass Storage Device
status: The drivers for this device are not installed. (Code 28)
To find a driver for this device, click Update Driver.
I have done that -
"open device manager make sure show hidden devices is ticked and right click on all the USB hidden devices and unistall them. once done reboot and put in the flash drive again and see if windows finds it."
situation the same(((( Disk Management can't see the drive.
please if any one know the fix please help
Its very important info for me on the flash disk.I'd ask them over here.
http://answers.microsoft.com/en-us/windows/forum/windows_8?tab=Threads
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights. -
Time's error with a metric for DashBoard in the WHERE Clause - @Prompt
Hello,
I have a problem with a measure in Universe. In the WHERE clause I have the typical @Prompt to interact with DashBoard:
"Fact.Time_Key between @Prompt('BEGIN_DATE','D',,mono,free) And @Prompt('END_DATE','D',,mono,free)" *
*Fact.Time_Key is a Date Field
I check many options to solve the problem, which is: "The conversion of char data type to smalldatetime data type result in an out-of-range smalldatetime value." For example I saw many forums, I check the regional settings with IT and I also change the prm file that my universe's connection use but it still doesn't work.
So I believe that the date format of my field (Fact.Time_Key) is different to @Prompt date format
Any Suggestion?
Regards
RomáHi Roman,
I am not sure but I thought there was also a 'BEGIN_DATETIME' option
Regards
Alan -
Problem with attachtment XLS (last column of the xls)
Hi,
iam working on interface in which i will be sending an email along with attachtment where my email along with attachtment are working perfectly ,the problem is with the XLS where the last column of the XLS is taking 255 char which is the length of the field .
How i have to restrict it ?
solution on this would be helpfull .
Thanks ,
shankar.
I have attached the sample code too.
FUNCTION zemail_send_attachment.
""Local Interface:
*" IMPORTING
*" VALUE(EMAILID)
*" VALUE(SUBJECT)
*" VALUE(ATYPE)
*" TABLES
*" ATTACH_FILE STRUCTURE SOLISTI1
*" BODY OPTIONAL
This table requires information about how the data in the
tables OBJECT_HEADER, CONTENTS_BIN and CONTENTS_TXT are
to be distributed to the documents and its attachments.
DATA objpack LIKE sopcklsti1 OCCURS 2 WITH HEADER LINE.
This table must contain the summarized data dependent on each object type.
SAPscript objects store information here about forms and styles,
for example. Excel list viewer objects store the number of rows and columns
amongst other things and PC objects store their original file name.
DATA objhead LIKE solisti1 OCCURS 1 WITH HEADER LINE.
This table must contain the summarized content of the objects identified as binary objects.
DATA objbin TYPE STANDARD TABLE OF solisti1 INITIAL SIZE 0
WITH HEADER LINE.
This table must contain the summarized content of the objects identified as ASCII objects.
DATA objtxt LIKE solisti1 OCCURS 10 WITH HEADER LINE.
This table must contain the document recipients.
DATA reclist LIKE somlreci1 OCCURS 5 WITH HEADER LINE .
This structure must contain the attributes of the document to be sent.
DATA: doc_ching LIKE sodocchgi1.
DATA: tab_lines LIKE sy-tabix.
Create the internal table for body , subject
DATA: it_body LIKE solisti1 OCCURS 10 WITH HEADER LINE.
CONSTANTS: con_cret TYPE c VALUE cl_abap_char_utilities=>horizontal_tab,
con_tab TYPE c VALUE cl_abap_char_utilities=>cr_lf.
Move Body to Internal Table (body into it_body)
LOOP AT body .
MOVE body TO it_body .
APPEND it_body .
ENDLOOP.
doc_ching-obj_descr = subject. "Subject of the Email
Move the Subject and Body to OBJTXT
objtxt[] = it_body[].
DESCRIBE TABLE objtxt LINES tab_lines.
READ TABLE objtxt INDEX tab_lines.
doc_ching-doc_size = ( tab_lines - 1 ) * 255 + STRLEN( objtxt ).
CLEAR objpack-transf_bin.
objpack-head_start = 1.
objpack-head_num = 0.
objpack-body_start = 1.
objpack-body_num = tab_lines.
objpack-doc_type = 'RAW'.
APPEND objpack.
Convert IT to Excel format
IF atype = 'XLS' .
LOOP AT attach_file .
REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret ."INTO objbin.
IF sy-tabix = 1.
MOVE attach_file TO objbin.
ELSE.
CONCATENATE con_tab attach_file INTO objbin.
ENDIF.
APPEND objbin.
ENDLOOP.
ELSEIF atype = 'TXT' .
Convert IT to Text format
LOOP AT attach_file .
REPLACE ALL OCCURRENCES OF '#' IN attach_file WITH con_cret. " INTO objbin.
CONCATENATE attach_file con_tab INTO objbin .
APPEND objbin .
ENDLOOP.
ENDIF.
DESCRIBE TABLE objbin LINES tab_lines.
objhead = subject. APPEND objhead.
Creating the entry for the compressed attachment
objpack-transf_bin = 'X'.
objpack-head_start = 1.
objpack-head_num = 1.
objpack-body_start = 1.
objpack-body_num = tab_lines.
IF atype = 'XLS'.
objpack-doc_type = atype.
ELSEIF atype = 'TXT'.
objpack-doc_type = 'RAW'.
ENDIF.
objpack-obj_name = 'ATTACHMENT'.
objpack-obj_descr = 'TEST'. "Attachment File Name
objpack-doc_size = tab_lines * 255.
APPEND objpack..
reclist-receiver = emailid.
reclist-rec_type = 'U'.
APPEND reclist.
CALL FUNCTION 'SO_NEW_DOCUMENT_ATT_SEND_API1'
EXPORTING
document_data = doc_ching
put_in_outbox = 'X'
commit_work = 'X'
IMPORTING
SENT_TO_ALL =
NEW_OBJECT_ID =
TABLES
packing_list = objpack
object_header = objhead
contents_bin = objbin
contents_txt = objtxt
receivers = reclist
EXCEPTIONS
too_many_receivers = 1
document_not_sent = 2
operation_no_authorization = 4
OTHERS = 99 .
ENDFUNCTION.I had this problem after migrating to JDeveloper 10.1.3. Problem was with inconsistent DB column types. In our case, the DB column was CHAR containing only numbers, but VO defined it as NUMBER. This caused no problem in 9.0.3 we used before.
<ViewAttribute
Name="ParentFlagNew"
IsPersistent="false"
Precision="1"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="PARENT_FLAG_NEW"
Expression="PARENT_FLAG_NEW"
SQLType="NUMERIC" >
<Properties>
<Property Name ="DISPLAY_LIST" Value ="1=Yes,0=No" />
<Property Name ="DISPLAY_LIST_sk" Value ="1=Áno,0=Nie" />
<Property Name ="Renderer" Value ="sk.transacty.cm_iface.bc4j_common.ListFieldRenderer" />
</Properties>
<DesignTime>
<Attr Name="_DisplaySize" Value="1" />
</DesignTime>
</ViewAttribute> -
Problem with getLong for a column of type NUMBER
When ever I am calling getLong on a column defined as NUMBER in the database, I get this error message. The number I am retreving is something like '320000000010'..
What could be the problem? Has somebody encountered a
similar problem?
The database is 8.1.7.4 and the JDBC driver is a thin driver.
java.lang.ArrayIndexOutOfBoundsException
at oracle.sql.NUMBER._fromLnxFmt(NUMBER.java:3181)
at oracle.sql.LnxLibThin.lnxsni(LnxLibThin.java:6571)
at oracle.sql.NUMBER.toLong(NUMBER.java:373)
at oracle.sql.NUMBER.longValue(NUMBER.java:2002)
at oracle.jdbc.driver.ScrollableResultSet.getLong(ScrollableResultSet.java:807)
at oracle.jdbc.driver.UpdatableResultSet.getLong(UpdatableResultSet.java:458)
Thanks
RangaI had this problem after migrating to JDeveloper 10.1.3. Problem was with inconsistent DB column types. In our case, the DB column was CHAR containing only numbers, but VO defined it as NUMBER. This caused no problem in 9.0.3 we used before.
<ViewAttribute
Name="ParentFlagNew"
IsPersistent="false"
Precision="1"
Type="oracle.jbo.domain.Number"
ColumnType="NUMBER"
AliasName="PARENT_FLAG_NEW"
Expression="PARENT_FLAG_NEW"
SQLType="NUMERIC" >
<Properties>
<Property Name ="DISPLAY_LIST" Value ="1=Yes,0=No" />
<Property Name ="DISPLAY_LIST_sk" Value ="1=Áno,0=Nie" />
<Property Name ="Renderer" Value ="sk.transacty.cm_iface.bc4j_common.ListFieldRenderer" />
</Properties>
<DesignTime>
<Attr Name="_DisplaySize" Value="1" />
</DesignTime>
</ViewAttribute> -
Table editor problem with default value for column
Hi there,
I'm trying to use SQL Developer 1.2.1 on Ubuntu 7.10 (though I don't think the OS is relevant) and I'm running into a snag when trying to update table structures. If you go to edit the table to say modify a column name, and that column has a default value set, SQL Developer is encapsulating the value with brackets and quotes. When trying to save the changes, it complains about the default value being 4 chars too many for the column width. An example of this would be a currency code column of varchar2 (3) set with EUR as the default. SQL Developer changes the value to ('EUR') hence the error.
Is there anyway to prevent this from happening?
Cheers,
ChrisCould you please be more specific? In 1.2.1.32.40 I
added the column COL1 VARCHAR2(3) with default value
'EUR'. The data display field refreshed to show the
default value, so I edited it in a couple of entries
and comitted the change without problem. Then I
renamed the column from the "Edit table" popup menu.
Finally, I renamed the column from the "Rename
column" popup menu, no problem either.Ah, you are correct. That does work. What I was trying is select tablename in the object browser, then right click on it and select "Edit" from the contextual menu. You are then presented with edit table dialog box. If you then select a column in that box you will see a column properties box. In that section you can change the name, default value, datatype et cetera. Note that your default column value which should just be EUR (or 'EUR' to denote that it's a string) is now ('EUR'). Once you try changing the name to of the column to something else and then click OK, you should then get an error complaining of "Invalid varchar2 default value" with a more specific message of "Default values size 7 is greater than the allowed 3"
You have provided a work around, and thanks for that, but it would be nice to edit everything in the Edit table dialog box if you're modifying more than one column name. I'm tasked with cleaning up a bit of a messy database, and there are a good deal of columns to be renamed.
Cheers,
Chris -
Problem with header for each column
Hi,
I want change column header-text dynamically in the table control of module pool programming.Please help me.Hi Abhijit,
no need to put '&' in the variable .You just give the name of the variable as lw_text and also dont forget to expand the Def.Length attribute to equal to the length of that variable in the decalration.It is working for me.
put the follwoing code in PAI module.
Data:lw_text(15).
If cond1 = true.
lw_text = 'Description 1'.
elseif cond2 = true.
lw_text = 'Description 2'.
Endif.
Using the above code u can modify dynamically. -
Problem with JBCL GridControl - Repositioning columns
Hi
When I move a pick-list column to a new position on a JBCL
GridControl, the grid does not map the ItemEditor
(ChoiceItemEditor) of that column to the new corresponding
position. That means, the pick-list still remains at the old
column position.
Ming
nullCan any one help us ?
Thanks,
Ramesh S.
null
Maybe you are looking for
-
Hello Okay so I have had my Iphone for almost an entire year and there's a problem. I have gotten a scratch a scratch about a month ago on the back camera. It's at the very bottom. I've gotten used to it so it doesn't bother me. Well ever since like
-
I just updated iBooks author and it won't recognize or open any of my .iba files.
I just updated iBooks author and it won't recognize or open any of my .iba files.
-
APEX Dicom Sample zip file is corrupt.
The File dicom-1-133417.zip of DICOM samples in APEX packed applications is CORRUPT! This is the page (DICOM sample) http://www.oracle.com/technetwork/developer-tools/apex/application-express/packaged-apps-090453.html#DICOM Please , somebody from ora
-
J2EE fails to connect to the ABAP backend system
We have J2EE 640 Sp16 Abap+Java. As we configured this node in high-availability, we applied note Oss 757692 to the J2EE. Anyway the J2EE does not come up. Into the std_server0.out we see the following: Service dbpool started. (1503 ms). May 25, 20
-
New to FW - how to resize a simple vector graphic?
I'm brand new to Fireworks and just downloaded the trial version of CS5 a couple hours ago. I hunted around and watched some of the tutorials but haven't found an answer to my question so I'll take the easy way and ask here! I've got an existing png