Where is located a query????
I'm new in this forum and new in java world; i'm testing a crm java based (in tomcat server): my problem is related to know what files contains query text because i discovered a bug in a query (when i try to execute this query tomcat server make a log file where i can see a query call to a wrong db field (i think programmer mistake to write the column name used by the query). Db is mysql server 5.1.
TY in advance
This is my log text:
HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
javax.servlet.ServletException: Execution failed.
xsharp.servlet.Execute.service(Execute.java:279)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
xsharp.lang.RuntimeError: Failed to execute query "select xrm_account.name,xrm_account.addr_addresstypecode,xrm_account.revenue,xrm_account.addr_city,xrm_account.addr_country,t1.full_name as created_by,xrm_account.created_on,xrm_account.creditlimit,xrm_account.creditonhold,t1.full_name as currency,xrm_account.duns,xrm_account.description,xrm_account.nobulkemail,xrm_account.noemail,xrm_account.nofax,xrm_account.nosendmm,xrm_account.nophone,xrm_account.nopostalmail,xrm_account.emailaddress1,xrm_account.fax,t1.full_name as folder,xrm_account.addr_freightterm,xrm_account.inactive,xrm_account.industry,xrm_account.lastcpuse,xrm_account.telephone1,t1.full_name as masterid,t1.full_name as changed_by,xrm_account.changed_on,xrm_account.addr_name,xrm_account.empno,xrm_account.notes,xrm_account.number_of_locations,t1.full_name as origlead,xrm_account.emailaddress2,xrm_account.telephone2,t1.full_name as owner,xrm_account.ownership,t1.full_name as parentaccountid,xrm_account.payterms,xrm_account.prefmethod,xrm_account.prefday,t1.full_name as prefequip,t1.full_name as preferredserviceid,xrm_account.preftime,t1.full_name as prefuser,t1.full_name as defaultpricelistid,t1.full_name as primarycontactid,xrm_account.rating,xrm_account.customertype,xrm_account.sic,xrm_account.sla,xrm_account.sla_expiration_date,xrm_account.sla_serial,t1.full_name as addr_shipmth,xrm_account.addr_state,xrm_account.addr_line1,xrm_account.addr_line2,xrm_account.addr_line3,t1.full_name as territory,xrm_account.tickersymbol,xrm_account.upsell_opportunity,xrm_account.websiteurl,xrm_account.addr_zip from xrm_account left join xrm_user as t1 on (t1.xid=xrm_account.created_by) left join xrm_currency as t2 on (t2.xid=xrm_account.currency) left join xrm_account as t3 on (t3.xid=xrm_account.masterid) left join xrm_user as t4 on (t4.xid=xrm_account.changed_by) left join xrm_lead as t5 on (t5.xid=xrm_account.origlead) left join xrm_user as t6 on (t6.xid=xrm_account.owner) left join xrm_account as t7 on (t7.xid=xrm_account.parentaccountid) left join xrm_equipment as t8 on (t8.xid=xrm_account.prefequip) left join xrm_user as t9 on (t9.xid=xrm_account.prefuser) left join xrm_pricelist as t10 on (t10.xid=xrm_account.defaultpricelistid) left join xrm_contact as t11 on (t11.xid=xrm_account.primarycontactid) left join xrm_shippingprovider as t12 on (t12.xid=xrm_account.shipmth) left join xrm_territory as t13 on (t13.xid=xrm_account.territory) where xrm_account.folder is null".
xsharp.io.sql.client.SqlClient.executeQuery(SqlClient.java:172)
xsharp.io.sql.client.SqlClient.execute(SqlClient.java:73)
xsp.xsp4gcx5ga9xkytv.execute(xsp4gcx5ga9xkytv.java:82)
xsp.xspg7l3jga9xmvoq$pi0.execute(xspg7l3jga9xmvoq.java:404)
xsp.xsp2flq6ga9xmy07.execute(xsp2flq6ga9xmy07.java:49)
xsharp.servlet.Execute.service(Execute.java:157)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
root cause
com.mysql.jdbc.exceptions.jdbc4.MySQLSyntaxErrorException: Unknown column 'xrm_account.shipmth' in 'on clause' -------------------------> (in my mysql db the right name of this column is xrm_account.addr_shipmth but here query use xrm_account.shipmth)
sun.reflect.NativeConstructorAccessorImpl.newInstance0(Native Method)
sun.reflect.NativeConstructorAccessorImpl.newInstance(Unknown Source)
sun.reflect.DelegatingConstructorAccessorImpl.newInstance(Unknown Source)
java.lang.reflect.Constructor.newInstance(Unknown Source)
com.mysql.jdbc.Util.handleNewInstance(Util.java:406)
com.mysql.jdbc.Util.getInstance(Util.java:381)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:1030)
com.mysql.jdbc.SQLError.createSQLException(SQLError.java:956)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3515)
com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:3447)
com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:1951)
com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:2101)
com.mysql.jdbc.ConnectionImpl.execSQL(ConnectionImpl.java:2554)
com.mysql.jdbc.PreparedStatement.executeInternal(PreparedStatement.java:1761)
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1912)
org.apache.commons.dbcp.DelegatingPreparedStatement.executeQuery(DelegatingPreparedStatement.java:93)
xsharp.io.sql.client.SqlClient.executeQuery(SqlClient.java:162)
xsharp.io.sql.client.SqlClient.execute(SqlClient.java:73)
xsp.xsp4gcx5ga9xkytv.execute(xsp4gcx5ga9xkytv.java:82)
xsp.xspg7l3jga9xmvoq$pi0.execute(xspg7l3jga9xmvoq.java:404)
xsp.xsp2flq6ga9xmy07.execute(xsp2flq6ga9xmy07.java:49)
xsharp.servlet.Execute.service(Execute.java:157)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
note The full stack trace of the root cause is available in the Apache Tomcat/6.0.18 logs.
Apache Tomcat/6.0.18
Similar Messages
-
How do you use 3 Where Clauses in a query
Hi, i am trying to figure out how to use 3 Where Clauses in a Query where 2 of the Where Clauses uses a Sub query.
Display the OrderID of all orders that where placed after all orders placed by “Bottom-Dollar Markets”.
Order the result by OrderID in ascending order.
First WHERE clause checks for OrderDate and uses a sub query with ALL keyword.
Second WHERE clause use equals and sub query.
Third WHERE clause uses equal and company name.
This is what i have so far but i am pretty confused on how to do this.
My Code for NorthWind:
Select OrderID
From Orders o
Where o.OrderID IN (Select OrderDate From Orders Where Orders.OrderID > ALL
(Select CompanyName From Customers Where CompanyName = 'Bottom-Dollar Markets'));
The book shows how to use the ALL Keyword but not in a Sub query with Multiple Where Clauses.
Select VenderName, InvoiceNumber, InvoiceTotal
FROM Invoices JOIN Vendors ON Invoices.VendorID = Vendors.VendorID
WHERE InvoiceTotal > ALL (Select InvoiceTotal From Invoices Where VendorID = 34)
ORDER BY VendorName;>Where Orders.OrderDate
> ALL (Select
CompanyName
The comparison operator (>) requires compatible data types.
DATETIME is not compatible with VARCHAR string for comparison.
Here is your homework:
SELECT orderid
FROM orders o
WHERE o.orderdate > ALL (SELECT orderdate
FROM orders
WHERE shipvia = (SELECT Max(shipvia)
FROM orders o
INNER JOIN customers c
ON c.customerid =
o.customerid
WHERE
c.companyname = 'Bottom-Dollar Markets'));
11064
11065
11066
11067
11068
11069
11070
11071
11072
11073
11074
11075
11076
11077
Kalman Toth Database & OLAP Architect
SQL Server 2014 Database Design
New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014 -
Where to locate and how to use the filter thershould to binarized image
Good morning friends. I am using
Labview with VDM and let me know where to locate and how to use the
filter thershould. Also that parameters used to binarized image captured
via webcam and display it in black and white.
Thank you very
much.Is the image that you are getting a RGB one? Use color plane extraction and then use a binary threshold to convert it into a binary image. You can also directly use a color threshold and convert a rgb (color) image to a binary image.
-
Location of query log files in OBIEE 11g (version 11.1.1.5)
Hi,
I wish to know the Location of query log files in OBIEE 11g (version 11.1.1.5)??Hi,
Log Files in OBIEE 11g
Login to the URL http://server.domain:7001/em and navigate to:
Farm_bifoundation_domain-> Business Intelligence-> coreapplications-> Dagnostics-> Log Messages
You will find the available files:
Presentation Services Log
Server Log
Scheduler Log
JavaHost Log
Cluster Controller Log
Action Services Log
Security Services Log
Administrator Services Log
However, you can also review them directly on the hard disk.
The log files for OBIEE components are under <OBIEE_HOME>/instances/instance1/diagnostics/logs.
Specific log files and their location is defined in the following table:
Log Location
Installation log <OBIEE_HOME>/logs
nqquery log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1
nqserver log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1
servername_NQSAdminTool log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1
servername_NQSUDMLExec log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1
servername_obieerpdmigrateutil log (Migration log) <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIServerComponent/coreapplication_obis1
sawlog0 log (presentation) <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIPresentationServicesComponent/coreapplication_obips1
jh log (Java Host) <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIJavaHostComponent\coreapplication_obijh
webcatupgrade log (Web Catalog Upgrade) <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIPresentationServicesComponent/coreapplication_obips1
nqscheduler log (Agents) <OBIEE_HOME>/instances/instance1/diagnostics/logsOracleBISchedulerComponent/coreapplication_obisch1
nqcluster log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIClusterControllerComponent\coreapplication_obiccs1
ODBC log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OracleBIODBCComponent/coreapplication_obips1
opmn log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OPMN/opmn
debug log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OPMN/opmn
logquery log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OPMN/opmn
service log <OBIEE_HOME>/instances/instance1/diagnostics/logs/OPMN/opmn
opmn out <OBIEE_HOME>/instances/instance1/diagnostics/logs/OPMN/opmn
Upgrade Assistant log <OBIEE_HOME>Oracle_BI1/upgrade/logs
Regards
MuRam -
Regarding dynamically assigning the where clause to select query
hi,
Please send the code regarding how to dynamically assign the where clause to select query.
thanks in advanceSELECT <fileds>
INTO TABLE itab
FROM dbase
WHERE condition. -
How to change where clause in VO query in bean
Hi experts
I have to modify vo object query where clause on run time .. is it possible??
if yes please suggest me,as mentioned by Timo, it is very much possible
see this following link -
Changing the WHERE clause or VO Query at runtime in Oracle ADF | Techartifact
Dynamically changing query in view object in Oracle ADF | Techartifact -
DECODE in the WHERE part of the query ?
Hello guys ,I am on 10gR2, and as always , the following mystery for me will be funny for you : ), so please share your knowledge.
I have one select on v$session , and i would to use something like DECODE function in the WHERE part of the query,
but , for the values i enter through the variables.
Currently i have something like :
WHERE status =upper('&session_status') AND username IS NOT NULL order by last_call_et desc;and that works fine, i enter either 'active' or 'inactive' and i get results.
But i would like to enter for example '1' for active and '2' for inactive, so i could write as little as i can as i am lazy. : )
Do you have some idea ?hi there
select * from v$session where status = decode('&session_status',1,'ACTIVE','INACTIVE') AND username IS NOT NULL order by last_call_et descregards
hitesh -
How to add WHERE Criteria to a Query (SQ01-SQ02)
Hi,
I'm trying to add a WHERE criteria in a query defined by Infoset.
The criteria I want to specify is between two fields of the same table. Something really easy, but ii do not know how to get it.
I think it can be defined in SQ02, but how?
The query should look like the following:
SELECT *
FROM TABLE_A
WHERE TABLE_A-FIELD_1 GT TABLE_A-FIELD_2
Can anybody tell me the secret?
Thanks a lot,
Gabrielehi,
You can try inner joins on the same table..
select a~WI_ID a~belnr a~gjahr a~INV_ITEM a~INV_DATE a~GR_DATE
from Z_CPO_GRP as a
INNER JOIN ZISP_CPO_GRP as b
on a~belnr EQ b~belnr
And a~gjahr EQ b~gjahr
And a~WI_ID EQ b~WI_ID
And a~INV_ITEM EQ b~INV_ITEM
INTO corresponding fields of table t_itab
where a~INV_DATE EQ b~GR_DATE.
IF sy-subrc EQ 0.
ENDIF. -
Where is located or where to find the list of printer drivers included in Windows 7
Hello,
Like the http://support.microsoft.com/kb/293360 for XP
I wish to have the list of 'built-in' print drivers on Windows 7
Didn't find any from technet, KB, Forum, ...
Maybe wrong search critera or else.
May someone know where is located the list I wish
In advance thank youHello,
First thank you for your answer.
But, and I think you haven't folow the URL provided previously, I don't want to add or install a printer.
I wish to have a list of built-in drivers for printer's in windows seven (like the URL provided before)
Can you, please, have a look at this link : http://support.microsoft.com/kb/293360
==> I wish the same but for windows seven
Thanks -
Where is Location Services in the Settings Menu?
Where is Location Services in the Settings Menu? I ask because I was told to switch off some of the location services in the various apps to help me save battery life, but not too sure where Location Services is?
AlliisonR: Location settings have been moved to the new Privacy section underneath Brightness & Wallpaper in Settings icon. Tricky but it's still there.
Hope this helps!
J -
Hi i am new to SCN. I want a help regards SAP-PM . Where to post any query regards SAP PM
Please check this link SAP Portfolio and Project Management (SAP RPM, cProjects) and cFolders
Please check scn index to find relevant forum link.
SCN Site Index -
i got an error message saying that update couldn't update because disk was full and it said to empty recycle bin, anyone know where to locate this mysterious elusive recycle bin?
arghineedhelp wrote:
i got an error message saying that update couldn't update because disk was full and it said to empty recycle bin, anyone know where to locate this mysterious elusive recycle bin?
On your computer. -
Where to locate EKPO-PACKNO in ME23N
Hi SAP Gurus,
I am doing a BAPI mapping in BAPI_PO_CREATE, however I found that there is a Package Number with value "0000001", my question:-
1. Where to locate the Package number in PO
2. Is the package number generated by system or manually entered.
3. Is Package number always be generated when everytime the PO is created
4. Is the package number also available in Server order?
5. Is the package number found in item level or header lever
Thank you1) If your requirement is to find service item based on the purchase order. Then you can use BAPI_PO_GETDETAILS. This would give you all the service order items for the associated PO.
In terms of table access, using EKPO-PACKNO to get the associated SUBPACKNO from ESLL. Once you have the Subpackno, use that subpackno in ESLL-PACKNO to get all the service line items
The package No groups together all services belonging to an item in a purchasing docs and via this No the program accessses the data in individual service lines of a set of service spec.
Hence its at item level u can find packing No provided necessary settings is maintained for service details to be captured in PO. -
Using a list in the where part of my query
I don't want to bother getting results for everyone in my DB.
I only want to retreive information from a list of up to 5
people - the list will constantly change.
I started with code below:
<cfparam name="useYear" default="Year(now())">
<!--- LIST --->
<cfset riderList="1,5,10,18,53">
<cfloop index="i" from="1" to="#ListLen(riderList)#">
<cfquery name="getRiderSum" datasource="mileage">
SELECT riderId,
SUM(IIf(month(rideDate)=1, rideDistance, 0)) AS janSum,
SUM(IIf(month(rideDate)=2, rideDistance, 0)) AS febSum,
SUM(IIf(month(rideDate)=3, rideDistance, 0)) AS marSum,
SUM(IIf(month(rideDate)=4, rideDistance, 0)) AS aprSum,
SUM(IIf(month(rideDate)=5, rideDistance, 0)) AS maySum,
SUM(IIf(month(rideDate)=6, rideDistance, 0)) AS junSum,
SUM(IIf(month(rideDate)=7, rideDistance, 0)) AS julSum,
SUM(IIf(month(rideDate)=8, rideDistance, 0)) AS augSum,
SUM(IIf(month(rideDate)=9, rideDistance, 0)) AS sepSum,
SUM(IIf(month(rideDate)=10, rideDistance, 0)) AS octSum,
SUM(IIf(month(rideDate)=11, rideDistance, 0)) AS novSum,
SUM(IIf(month(rideDate)=12, rideDistance, 0)) AS decSum
FROM mileageLog
WHERE riderId=#i#
AND Year(rideDate)=#useYear#
GROUP BY riderId
</cfquery>
</cfloop>
but how do I keep the information ordered by the riderId?
do I utilize the "i" as part of my query name?...
name="getRiderSum
do I utilize it as part of each monthly variable? ... AS
janSum etc.You don't need a cfloop. Try an IN(...) clause instead.
Obviously you have to validate that the #riderlist# is not empty
first or the query will error.
SELECT riderId,
SUM(IIf(month(rideDate)=1, rideDistance, 0)) AS janSum,
SUM(IIf(month(rideDate)=2, rideDistance, 0)) AS febSum,
SUM(IIf(month(rideDate)=3, rideDistance, 0)) AS marSum,
SUM(IIf(month(rideDate)=4, rideDistance, 0)) AS aprSum,
SUM(IIf(month(rideDate)=5, rideDistance, 0)) AS maySum,
SUM(IIf(month(rideDate)=6, rideDistance, 0)) AS junSum,
SUM(IIf(month(rideDate)=7, rideDistance, 0)) AS julSum,
SUM(IIf(month(rideDate)=8, rideDistance, 0)) AS augSum,
SUM(IIf(month(rideDate)=9, rideDistance, 0)) AS sepSum,
SUM(IIf(month(rideDate)=10, rideDistance, 0)) AS octSum,
SUM(IIf(month(rideDate)=11, rideDistance, 0)) AS novSum,
SUM(IIf(month(rideDate)=12, rideDistance, 0)) AS decSum
FROM mileageLog
WHERE riderId IN (<cfqueryparam value="#riderList#"
cfsqltype="the column type here" list="true"> )
AND Year(rideDate)=#useYear#
GROUP BY riderId
ORDER BY riderId -
VPD - How to make the where clause a correlated query
Hi,
My VPD function has the following where clause:
where_clause:= ' project_id in (select object_id from pa_project_classes p'||
' where p.class_category='||''''||l_cat||''''||
' and p.CLASS_CODE='||''''||l_class||''''||
' and p.OBJECT_TYPE=''PA_PROJECTS'''||
The problem is that the subquery is not using the unique key defined on the table pa_project_classes. What I need is something as follows:
where_clause:= ' project_id in (select object_id from pa_project_classes p'||
' where p.class_category='||''''||l_cat||''''||
' and p.CLASS_CODE='||''''||l_class||''''||
' and p.OBJECT_TYPE=''PA_PROJECTS'''||
' and p.object_id=mainquery.project_id ||
The problem is that since the table pa_project_classes also has a column project_id, I have to prefix the column name by the alias of the main query like 'mainquery.project_id'. However this seems impossible as main query is not unknown .
I would be grateful if you could suggest any workaround or solution.
ThanksJust have a look over these two statements if it solves your problem
one time where clause
Set_Block_Property('BLOCK_NAME',ONETIME_WHERE,your form item);
dynamic where clause
set_block_property('BLOCK_NAME'default_where, your form itme)
you can where clause at run time from any procedure or some triggers
Maybe you are looking for
-
Cannot update 5G iPod setting after 1.2 update...
Has anyone else run into this problem. I updated to iTunes 7 today along with the 1.2 update for my 5G iPod. I am running Mac OS X. After the update, my video playlists were removed from the iPod. Checking the iPod setting showed that the video playl
-
Template Installer SLD Local only
I have installed EP and have not configured SLD. I went to the NWA url and noticed a meesage stating Local SLD can only be configured (or something like that). Can I run the template installer for NWA Configure SLD to point to the central SLD? If not
-
My iMac (OS X 10.8.2) is unable to update Adobe Flash. I use both Chrome and Safari, which Chrome updates automatically and Safari does not. However this is not the problem. i have repeatedly tried to update Flash Player for Safari, all times failed.
-
Salutations I've got a directory structure like this : com/foo In Foo, I've got GetAnswer.java and Calculate.java GetAnswer.java is:package com.foo; public class GetAnswer { public int addTen(int i) { return i + 10; }That compiles fine Now I wa
-
Reg : activation of BC Sets
Hi , I have a BC set which I am trying to activate in client's place. but it throws an error saying "Transport request belongs to a different client " Can anyone help me out ??