Datastore & Database Help Needed
I have a question. I am an experience programmer, but in the past only used Visual Basic to program database applications. My first Java Database application is causing me trouble. I would be most grateful if you could give me some help.
DATABASE DECLARATIONS:
DataStore dataStore = new DataStore
Database database = new Database();
I am using the following JDBC connection to run SQL queries on the database.
query.setQuery(new com.borland.dx.sql.dataset.QueryDescriptor(database,sqlStmt , null, true, Load.ALL));
It works fine. But I am also using the data store connection to access whole tables and data. The reason being that is that I find it easier that using ResultSet's.
aTable.setStore(dataStore);
aTable.setStoreName(tableName);
aTable.open();
The problem is that I am getting errors as one connection at times is blocking another.
One connection type does not offer all that I want. I wish to us the JDBC connection mainly only for Read (and maybe creating tables with SQL). The data store connection I wish to use to get data and manipulate it and write. Is there anyway to run an SQL statement on a Datastore without JDBC?
How is it best to manage this? ANY HELP WILL BE VERY MUCH APPRECIATED.
Many thanks
Angus
I think that the advice given here matches the same that you got at http://forum.java.sun.com/thread.jsp?forum=4&thread=188487 .
Although their is probably a lot of people that use JBuilder here, your best bet is to go to the source (JBuilder forum).
Jamie
Similar Messages
-
Connect dataProvider to DataBase - help needed
Hi , I have a simple problem case ,
I have a categories table , and I want to get the data from it and display it at my page (dynamicly) ,
my question is , what is the best way to perform this, with DataProviders and beans. ?Check if my blog helps
http://blogs.sun.com/winston/entry/dynamic_button_table
http://blogs.sun.com/winston/entry/creating_dynamic_table
- Winston -
Help needed to loadjava apache poi jars into oracle database.
Help needed to loadjava apache poi jars into oracle database. Many classes left unresolved. (Poi 3.7, database 11.1.0.7). Please share your experience!
Hi,
The first 3 steps are just perfect.
But with
loadjava.bat -user=user/pw@connstr -force -resolve geronimo-stax-api_1.0_spec-1.0.jar
the results are rather unexpected. Here is a part of the log file:
arguments: '-user' 'ccc/***@bisera7-db.dev.srv' '-fileout' 'c:\temp\load4.log' '-force' '-resolve' '-jarsasdbobjects' '-v' 'geronimo-stax-api_1.0_spec-1.0.jar'
The following operations failed
resource META-INF/MANIFEST.MF: creation (createFailed)
class javax/xml/stream/EventFilter: resolution
class javax/xml/stream/events/Attribute: resolution
class javax/xml/stream/events/Characters: resolution
class javax/xml/stream/events/Comment: resolution
class javax/xml/stream/events/DTD: resolution
class javax/xml/stream/events/EndDocument: resolution
class javax/xml/stream/events/EndElement: resolution
class javax/xml/stream/events/EntityDeclaration: resolution
class javax/xml/stream/events/EntityReference: resolution
class javax/xml/stream/events/Namespace: resolution
class javax/xml/stream/events/NotationDeclaration: resolution
class javax/xml/stream/events/ProcessingInstruction: resolution
class javax/xml/stream/events/StartDocument: resolution
class javax/xml/stream/events/StartElement: resolution
class javax/xml/stream/events/XMLEvent: resolution
class javax/xml/stream/StreamFilter: resolution
class javax/xml/stream/util/EventReaderDelegate: resolution
class javax/xml/stream/util/StreamReaderDelegate: resolution
class javax/xml/stream/util/XMLEventAllocator: resolution
class javax/xml/stream/util/XMLEventConsumer: resolution
class javax/xml/stream/XMLEventFactory: resolution
class javax/xml/stream/XMLEventReader: resolution
class javax/xml/stream/XMLEventWriter: resolution
class javax/xml/stream/XMLInputFactory: resolution
class javax/xml/stream/XMLOutputFactory: resolution
class javax/xml/stream/XMLStreamReader: resolution
resource META-INF/LICENSE.txt: creation (createFailed)
resource META-INF/NOTICE.txt: creation (createFailed)
It seems to me that the root of the problem is the error:
ORA-29521: referenced name javax/xml/namespace/QName could not be found
This class exists in the SYS schema though and is valid. If SYS should be included as a resolver? How to solve this problem? -
Urgent help needed; Database shutdown issues.
Urgent help needed; Database shutdown issues.
Hi all,
I am trying to shutdown my SAP database and am facing the issues below, can someone please suggest how I can go about resolving this issue and restart the database?
SQL> shutdown immediate
ORA-24324: service handle not initialized
ORA-24323: value not allowed
ORA-01089: immediate shutdown in progress - no operations are permitted
SQL> shutdown abort
ORA-01031: insufficient privileges
Thanks and regards,
IqbalHi,
check SAP Note 700548 - FAQ: Oracle authorizations
also check Note 834917 - Oracle Database 10g: New database role SAPCONN
regards,
kaushal -
Help needed in setting up Japanese Database
Hi there,
Help needed in setting up Japanese Database.
I created database with UTF8 character set on Sun Solaris O/S.
Oracle version 8.1.7.
I am accessing the DB through SQL*Plus (Windows client).
I downloaded the Japanese font on client side and also set the NLS_LANG environment variable to Japanese_Japan.UTF8. Still, I am not able to view Japanese characters. O/S on client side is Windows 2000 professional (English). Is O/S (client) need to be Japanese O/S? When I try to retrieve sysdate, its displaying in Japanese but not all characters in Japanese. Can anyone help me out how to set up the client and is there any parameters to be setup at server side? I also tried to insert japanese characters into table through client, but it displaying as "?????" characters. Any help in this regard is appreciated.
Thanks in advance,
-Shankarlol
your program is working just fine.
do you know what accept does? if not read below.
serversocket.accept() is where java stops and waits for a (client)socket to connect to it.
only after a socket has connected wil the program continue.
try putting the accept() in its own little thread and let it wait there while your program continues in another thread -
SQL Server Database Connectivity with Visual Studio 2012 - Help Needed
Hello,
I am having Visual Studio 2012 and SQL Developer 4.0 installed on my system with Windows 8 - 64bit
I want to shift a VS project with an SQL database connectivity to another new Laptop (above mentioned) ...
I have the project opened in VS without bieng connected to the database..
I have a backup file of the database (which needs to be restored to a new created database on SQL Developer)
The problem:
I am unable to create a server connection in SQL Developer which will allow me to create a new database followed by the recovery from backup file.
I am getting the following error message when I try to create a connection:
Status: Faliure - IO error: The network adapter could not establish a connection
Please help me in setting up a server connection and adding a new sql databaseThe error message seemed unfamiliar to me and since I had never heard of SQL Developer before, I went to Google. Google might be pulling my legs, but it appears that SQL Developer is related to Oracle. This forum is devoted to SQL Server, so you are in the
wrong place.
Try finding a forum for SQL Developer.
Erland Sommarskog, SQL Server MVP, [email protected] -
Where is the forum for TFS, I have found an issue related to its database I need help
Hello,
Where is the forum for TFS, I have found an issue related to its database I need help
One of the encrypted Stored Procedure is throwing an error and I have no
idea how to fix the problem.
EXEC dbo.InstallWorkItemWordsContains
FOR XML could not serialize the data for node 'nt_user_name' because it contains a character (0x0000) which is not allowed in XML. To retrieve this data using FOR XML, convert it to binary, varbinary or image
data type and use the BINARY BASE64 directive.
Msg 3616, Level 16, State 2, Line 1
An error was raised during trigger execution. The batch has been aborted and the user transaction, if any, has been rolled back.Hello,
Here are the
Visual Studio Team Foundation Server forums.
Karl
When you see answers and helpful posts, please click Vote As Helpful, Propose As Answer, and/or Mark As Answer.
My Blog: Unlock PowerShell
My Book:
Windows PowerShell 2.0 Bible
My E-mail: -join ('6F6C646B61726C406F75746C6F6F6B2E636F6D'-split'(?<=\G.{2})'|%{if($_){[char][int]"0x$_"}}) -
Help needed on installation of Oracle 9i on Sun Solaris 8
Hey,
Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
SimonI have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
Edited by: 916438 on Mar 31, 2012 5:55 PM -
Help needed on installation of Oracle 9i EE on Sun Solaris 8
Hey,
Help needed on installation of Oracle 9i EE on Sun Solaris 8. The problem I met was: we followed the installation guide from the documentation. And we selected the choice "install software only". After it was done successfully, we run Database Configuration Assistant utility to create a database instance. But finally it always tried to create the instance at the root directory ( / ) which doesn't have enough space and then failed. The case was that we have set the enviroment parameters: $ORACLE_BASE = /export/mydata, $ORACLE_HOME = /export/apps/oracle9i. That means it should be installed at /export/mydata, but it didn't. Any help or advice are welcome. Thanks.
SimonI have downloaded Oracle 11G R2 version from Windows and extracted it in Windows and copied it into DVD after extraction in two folders. Now I am mounting that DVD in Solaris 10 installed in my VMware . I made a new directory named as 'installation ' under /export/home/oracle and copied the folders from DVD to 'installation' folder. Now I am entering installation folder and try to do ./runInstaller as 'oracle ' user and getting the error mentioned before.
Edited by: 916438 on Mar 31, 2012 5:55 PM -
Help needed for using BASIC authentication through JDBCRealm
Help needed.
Hello,
I am doing a degree project, so far it works fine in my local machine, I need to try it on my virtual hosting (as it is a live server).
My project requires JDBCRealm, that is BASIC authentication loading access data from mysql database. Normally this setup can be done in Server.xml file, because my Tomcat hosting is a virtual one, I only have permission to access the web.xml file.
My question is: is it possible to get it done in an alternative way? In web.xml? Some properties file maybe?
Thank you very much.You can set this up for your context using META-INF/context.xml instead of working with server.xml.
Make a directory called META-INF under your webapp ( it'll be at the same level as WEB-INF ). Under this, add a context.xml with all your context specific configuration including the realm. A sample is below
<?xml version="1.0" encoding="UTF-8"?>
<Context path="/myApp" reloadable="true">
<Realm
className="org.apache.catalina.realm.JDBCRealm"
driverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
connectionURL="jdbc:microsoft:sqlserver://127.0.0.1:1433;DatabaseName=myDB;SelectMethod=Cursor;"
connectionName="username" connectionPassword="password"
digest="MD5" userTable="users" userNameCol="userid" userCredCol="userpassword"
userRoleTable="user_roles" roleNameCol="rolename"
/>
</Context>Hope this helps.
People on the forum help others voluntarily, it's not their job.
Help them help you.
Learn how to ask questions first: http://faq.javaranch.com/java/HowToAskQuestionsOnJavaRanch
---------------------------------------------------------------- -
Help needed to run JSTL 1.1 in Tomcat 6.0.16
Hi All,Help needed to run JSTL 1.1 in Tomcat 6.0.16. I am trying to run the example given in http://tomcat.apache.org/tomcat-6.0-doc/jndi-datasource-examples-howto.html The example tries to connect to MySQL database from JSP using JSTL and JNDI Datasource.I am running the example using Eclipse 3.4.2 using Sysdeo plugin to start and stop Tomcat server from Eclipse IDE.
My web.xml file has <web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://java.sun.com/xml/ns/javaee" xmlns:web="http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd" id="WebApp_ID" version="2.5">
</web-app>
and test.jsp has proper taglib directives
<%@ taglib prefix="sql" uri="http://java.sun.com/jsp/jstl/sql" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
I have placed the jstl.jar and standard.jarof the jakarta-taglibs-standard-1.1.2.zip under E:\Deepa\workspace\DBTest\WebContent\WEB-INF\lib directory also placedcontext.xml file under E:\Deepa\workspace\DBTest\WebContent\META-INF and the content of context.xml is as below
<Context path="/DBTest" docBase="DBTest"
debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource"
maxActive="100" maxIdle="30" maxWait="10000"
username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>
</Context>
Now while running the example, Eclipse creates one DBTest.xml file under C:\Program Files\Apache Software Foundation\Tomcat 6.0\conf\Catalina\localhost
which has the following line:
<Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest" workDir="E:\Deepa\workspace\DBTest\work" />
I am getting the following error when running http://localhost/DBTest/WebContent/test.jsp
in Browser:
<HTTP Status 500 -
type Exception report
message
description The server encountered an internal error () that prevented it from fulfilling this request.
exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
org.apache.jasper.compiler.DefaultErrorHandler.jspError(DefaultErrorHandler.java:51)
org.apache.jasper.compiler.ErrorDispatcher.dispatch(ErrorDispatcher.java:409)
org.apache.jasper.compiler.ErrorDispatcher.jspError(ErrorDispatcher.java:116)
org.apache.jasper.compiler.TagLibraryInfoImpl.generateTLDLocation(TagLibraryInfoImpl.java:315)
org.apache.jasper.compiler.TagLibraryInfoImpl.<init>(TagLibraryInfoImpl.java:148)
org.apache.jasper.compiler.Parser.parseTaglibDirective(Parser.java:431)
org.apache.jasper.compiler.Parser.parseDirective(Parser.java:494)
org.apache.jasper.compiler.Parser.parseElements(Parser.java:1444)
org.apache.jasper.compiler.Parser.parse(Parser.java:138)
org.apache.jasper.compiler.ParserController.doParse(ParserController.java:216)
org.apache.jasper.compiler.ParserController.parse(ParserController.java:103)
org.apache.jasper.compiler.Compiler.generateJava(Compiler.java:154)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:315)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:295)
org.apache.jasper.compiler.Compiler.compile(Compiler.java:282)
org.apache.jasper.JspCompilationContext.compile(JspCompilationContext.java:586)
org.apache.jasper.servlet.JspServletWrapper.service(JspServletWrapper.java:317)
org.apache.jasper.servlet.JspServlet.serviceJspFile(JspServlet.java:342)
org.apache.jasper.servlet.JspServlet.service(JspServlet.java:267)
javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
In the Tomcat Server console, I am getting the following error:
INFO: Server startup in 7295 ms
May 20, 2009 6:36:48 AM org.apache.jasper.compiler.TldLocationsCache processWebDotXml
WARNING: Internal Error: File /WEB-INF/web.xml not found
May 20, 2009 6:36:48 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
org.apache.jasper.JasperException: The absolute uri: http://java.sun.com/jsp/jstl/sql cannot be resolved in either web.xml or the jar files deployed with this application
what is the problem with my code?
When running the same example, by creating a local server in Eclipse(creating new Server connection pointing to same Tomcat 6.0 installation) it runs fine without any error.Hi evnafets,
Wow, very helpful information, great insight into working of Eclipse. Thanks a lot.
I have one more question. I have a context.xml file under {color:#0000ff}E:\Deepa\workspace\DBTest\WebContent\META-INF{color} folder and that has the Resource element to connect to MySQL database:
{code{color:#000000}}{color}<Context path="/DBTest" docBase="DBTest" debug="5" reloadable="true" crossContext="true">
<Resource name="jdbc/TestDB" auth="Container" type="javax.sql.DataSource" maxActive="100" maxIdle="30" maxWait="10000" username="deepa" password="mysql" driverClassName="com.mysql.jdbc.Driver"
{color:#0000ff}url="jdbc:mysql://localhost:3306/javatest?autoReconnect=true"/>{color}
{color:#0000ff}</Context>{color}As usual when running application in local Tomcat server of Eclipse, this data source works fine. But when I run the application on Tomcat, by starting Sysdeo plugin from Eclipse, the DBTest.xml file created in C:\Tomcat 6.0\conf\Catalina\localhost has the context entry as<Context path="/DBTest" reloadable="true" docBase="E:\Deepa\workspace\DBTest\WebContent" workDir="E:\Deepa\workspace\DBTest\work">
</Context>The<Resource> element I have specified in the context.xml of \WebContent\META-INF folder is not taken into account by Tomcat and it gives the following error:May 21, 2009 5:20:04 AM org.apache.catalina.core.StandardWrapperValve invoke
SEVERE: Servlet.service() for servlet jsp threw exception
javax.servlet.jsp.JspException: Unable to get connection, DataSource invalid: "org.apache.tomcat.dbcp.dbcp.SQLNestedException_: Cannot create JDBC driver of class '' for connect URL 'null'"
_at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.getConnection(_QueryTagSupport.java:276_)
at org.apache.taglibs.standard.tag.common.sql.QueryTagSupport.doStartTag(_QueryTagSupport.java:159_)
at org.apache.jsp.test_jsp._jspx_meth_sql_005fquery_005f0(_test_jsp.java:113_)
at org.apache.jsp.test_jsp._jspService(_test_jsp.java:66_)
at org.apache.jasper.runtime.HttpJspBase.service(_HttpJspBase.java:70_)
at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
at org.apache.jasper.servlet.JspServletWrapper.service(_JspServletWrapper.java:374_)
at org.apache.jasper.servlet.JspServlet.serviceJspFile(_JspServlet.java:342_)
at org.apache.jasper.servlet.JspServlet.service(_JspServlet.java:267_)
at javax.servlet.http.HttpServlet.service(_HttpServlet.java:717_)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(_ApplicationFilterChain.java:290_)
at org.apache.catalina.core.ApplicationFilterChain.doFilter(_ApplicationFilterChain.java:206_)
at org.apache.catalina.core.StandardWrapperValve.invoke(_StandardWrapperValve.java:233_)
at org.apache.catalina.core.StandardContextValve.invoke(_StandardContextValve.java:191_)
at org.apache.catalina.core.StandardHostValve.invoke(_StandardHostValve.java:128_)
at org.apache.catalina.valves.ErrorReportValve.invoke(_ErrorReportValve.java:102_)
at org.apache.catalina.core.StandardEngineValve.invoke(_StandardEngineValve.java:109_)
at org.apache.catalina.connector.CoyoteAdapter.service(_CoyoteAdapter.java:286_)
at org.apache.coyote.http11.Http11Processor.process(_Http11Processor.java:845_)
at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(_Http11Protocol.java:583_)
at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(_JIoEndpoint.java:447_)
at java.lang.Thread.run(_Thread.java:619_)
{code}
So to overcome this error I had to place the <Resource> element in DBTest.xml under C:\Tomcat 6.0\conf\Catalina\localhost {color:#000000}and then it works fine. {color}{color:#ff0000}*Why is the context.xml file in META-INF not considered by Tomcat server using Sysdeo Plugin?*
*Thanks,*
*Deepa*{color}
{color}
Edited by: Deepa76 on May 26, 2009 9:32 PM -
Help Needed REP-1800 Formatter error VGS-1701 Not enough memory
Hi. Gents
Help needed
I’m working on a Report, it gets some 2 million records and the report pages are approximately 52,000
It works fine if the pages are lesser then 48,000 or the data is less let say one and half a million, the problem occurs only after 48000 + pages formatted.
Report is generated successfully when trying to go to the last page it throw an error.
REP-1800 Formatter error
VGS-1701 Not enough memory
I have already gone through the metalink DOC Id 95505.1 as well as OTN
But all in vain,
Any comments or help much appreciated.
Details are:
Reports 6i (Clients/Server) on Windows platform
(Windows XP Professional with SP 2)
Database: Oracle9i Enterprise Edition Release 9.2.0.5.0
Computer:
Pentium(R) 4, CPU 3.00GHz, 1 GB of RAM
Still 20 GB free space
Thanks & RegardsI don't see the point in making a report with more than 48,000 pages, I think Al Gore will not be happy when you start printing it...
The problem might be caused by the fact that Reports needs to format all output at once, and then even 1GB of memory will probably be not enough. Formatting all pages at once is needed if you use pagination with displaying total number of pages. If you have this, try to get that out of the report definition and try again. -
Help Needed in Creating Java Class and Java Stored Procedures
Hi,
Can anyone tell how can i create Java Class, Java Source and Java Resource in Oracle Database.
I have seen the Documents. But i couldn't able to understand it correctly.
I will be helpful when i get some Examples for creating a Java Class, Java Source and Stored Procedures with Java with details.
Is that possible to Create a Java class in the oracle Database itself ?.
Where are the files located for the existing Java Class ?..
Help Needed Please.
Thanks,
Murali.vHi Murali,
Heres a thread which discussed uploading java source file instead of runnable code on to the database, which might be helpful :
Configure deployment to a database to upload the java file instead of class
The files for the java class you created in JDev project is located in the myworks folder in jdev, eg, <jdev_home>\jdev\mywork\Application1\Project1\src\project1
Hope this helps,
Sunil.. -
Hi All,
I am new to crystal and my sql.
l have 2 command objects in that i have a common column pos_no.Now i need to apply Fullouterjoin between pos_no,but in crystal we don,t have that option.
So i saw some threads that we need to apply leftouterjoin union rightouterjoin to get FOJ in db level ,i tried ,but i don't have much knowledge in my sql.So can any one please apply FOJ between Pos_no of these two queries.
Please help me i strucked here
1st Query:
select
MIN(till_close.start_transaction_id) AS start_trans_id,
MAX(till_close.end_transaction_id) AS end_trans_id,
pos_config.pos_no,
pos_config.name AS pos_name,
SUM(transaction_tender.amount) AS EodDeposit
FROM
till_close
LEFT OUTER JOIN employee ON (till_close.employee_id = employee.employee_id)
INNER JOIN pos_config ON (till_close.pos_config_id = pos_config.pos_config_id)
INNER JOIN transaction_tender ON (till_close.end_transaction_id = transaction_tender.transaction_id)
INNER JOIN media_type ON (transaction_tender.media_type_id = media_type.media_type_id)
WHERE
DATE_FORMAT(till_close.transaction_date,'%d/%m/%Y') = DATE_FORMAT(STR_TO_DATE(?,'%d/%m/%Y'),'%d/%m/%Y')
AND transaction_tender.media_type_id NOT IN (10000)
GROUP BY
pos_config.pos_no
ORDER BY
pos_config.pos_no
2nd Query:
select
pos_config.pos_no,
pos_config.name AS pos_name,
SUM(CASE WHEN transaction.transaction_type_id=7 AND ((SELECT COUNT(transaction_id) FROM transaction_tender WHERE transaction_id = transaction.transaction_id AND media_type_id IN (SELECT media_type_id FROM media_type WHERE tender_type_id=12) AND amount < 0 )>0) THEN 0
WHEN transaction_tender.balance < 0
THEN transaction_tender.amount
ELSE (transaction_tender.amount - transaction_tender.balance)
END) AS net
FROM
TRANSACTION
INNER JOIN transaction_tender ON (transaction.transaction_id = transaction_tender.transaction_id)
INNER JOIN media_type ON (transaction_tender.media_type_id = media_type.media_type_id)
INNER JOIN pos_config ON (transaction.pos_config_id = pos_config.pos_config_id)
WHERE
transaction.transaction_date = DATE_FORMAT(STR_TO_DATE(?, '%d/%m/%Y'), '%Y-%m-%d')
AND transaction.transaction_type_id IN (1,5,7)
AND transaction.transaction_status_id = 3
AND transaction.is_training_mode = 0
GROUP BY
pos_config.pos_nohi Divya,
i would definitely take the advice from the folks here on a rewrite of your commands into one command.
since you've got 2 commands that are bringing back different results you may wish to consider bringing back the results from the 2nd command via a sub-query.
the general idea of the query is below, but you'll need to consult your online help for your database and or your dba for the correct syntax for your situation.
notes:
1) the subselect is in the bold font and is defined as a result set in the join...again, please consult your database help or the appropriated forum for your database as your syntax may vary
2) the fields in the subquery are then referenced in the select clause using the TT alias assigned to the result set in the join
3) the full outer join i guessed that you wanted on the two pos_no fields
4) if you do try to do this method and are looking on your database forum, do a search on "subquery multiple columns"
cheers,
jamie
select
MIN(till_close.start_transaction_id) AS start_trans_id,
MAX(till_close.end_transaction_id) AS end_trans_id,
pos_config.pos_no AS PC_pos_no,
pos_config.name AS pos_name AS PC_pos_name,
SUM(transaction_tender.amount) AS EodDeposit,
TT.pos_no AS TT_pos_no,
TT.pos_name AS TT_pos_name,
TT.net
FROM
till_close
LEFT OUTER JOIN employee ON (till_close.employee_id = employee.employee_id)
INNER JOIN pos_config ON (till_close.pos_config_id = pos_config.pos_config_id)
INNER JOIN transaction_tender ON (till_close.end_transaction_id = transaction_tender.transaction_id)
INNER JOIN media_type ON (transaction_tender.media_type_id = media_type.media_type_id)
FULL OUTER JOIN
(select
pos_config.pos_no,
pos_config.pos_name,
SUM(CASE WHEN transaction.transaction_type_id=7 AND ((SELECT COUNT(transaction_id) FROM transaction_tender WHERE transaction_id = transaction.transaction_id AND media_type_id IN (SELECT media_type_id FROM media_type WHERE tender_type_id=12) AND amount < 0 )>0) THEN 0
WHEN transaction_tender.balance < 0
THEN transaction_tender.amount
ELSE (transaction_tender.amount - transaction_tender.balance)
END) AS net
FROM
TRANSACTION
INNER JOIN transaction_tender ON (transaction.transaction_id = transaction_tender.transaction_id)
INNER JOIN media_type ON (transaction_tender.media_type_id = media_type.media_type_id)
INNER JOIN pos_config ON (transaction.pos_config_id = pos_config.pos_config_id)
WHERE
transaction.transaction_date = DATE_FORMAT(STR_TO_DATE(?, '%d/%m/%Y'), '%Y-%m-%d')
AND transaction.transaction_type_id IN (1,5,7)
AND transaction.transaction_status_id = 3
AND transaction.is_training_mode = 0
GROUP BY
pos_config.pos_no) AS TT
ON TT.pos_no = pos_config.pos_no
WHERE
DATE_FORMAT(till_close.transaction_date,'%d/%m/%Y') = DATE_FORMAT(STR_TO_DATE(?,'%d/%m/%Y'),'%d/%m/%Y')
AND transaction_tender.media_type_id NOT IN (10000)
GROUP BY
pos_config.pos_no
ORDER BY
pos_config.pos_no -
User Creation in EP 7 - Help Needed.
Hi Guys,
We have installed an EP 7, I would like create users in EP 7 Database. My Data Source configuration file dataSourceConfiguration_abap.xml. I have installed a WAS 6.40 JAVA + ABAP
This means I have to create the user in ABAP, I would like to know how I can create a User in EP 7 Only and not in ABAP System, I have seen other posts where they mention that you have to create the User in ABAP First, is there a way where I can create users in EP 7 so that they remain in the EP System only.
Please do let me know.
Thanks,
John.
Message was edited by: John BrayHi John,
See my last answer in this thread: Changing DataSource Configuration using ConfigTool - Help Needed.
The xml I have referred to probably doesn't exist on EP7 any more?! Anyhow, the change from your to another xml isn't supported in general. Check out the corresponding notes.
Hope it helps
Detlev
Maybe you are looking for
-
Why is iTunes 11.1 asking me to create a new library every time I open it?
Every time I open iTunes 11.1 I have to load my library file manually...it does not just open automatically. It asks if I want to create a new library or load a previous library each time I open the application. I fixed permissions on my hard driv
-
VPRS cond type is not appearing after creating a sales order
Dear Friends, I have copied pricing procedure from Std pric procedure i.e from RVAA01. In Material master in Accounting 1the following things are maintained, Valuation Class--7920 ( Finished products) VC Sales Order Stock--7920 ( Finished products) P
-
ASA 5510 ignoring configured acl entry?
Greetings, I'm configuring up aa ASA-5510, and I have several interfaces, some of which include: interface Ethernet0/0.200 vlan 200 nameif SITECORP security-level 90 ip address 10.1.4.1 255.255.254.0 interface Ethernet0/0.207 vlan 207 nameif SI
-
How to implement paging in webdynpro jave based on search criteria.
Hi All, In a requirement I need to implement paging in webdynpro java development. I successfully did it when there is no search criteria is available i.e webdynpro fetched all data from the BO object and I did it using a "indexNO" (unique serial no
-
Linking FM 9 "At Insertion Point" graphics to an RH 8 project
Using Technical Communication Suite 2, I have built a structured FM 9 book in order to generate a RH 8 help system. This is a software user guide and I cannot avoid using inline graphics in some body elements. The book only has regular .fm documents