I think I just got it. Easier than I thought:
SELECT A.LAST_NAME,D.PHONE_NUMBER
FROM PERSON A LEFT OUTER JOIN (
SELECT PERSON_ID,PHONE_NUMBER FROM PERSON_TELEPHONE B INNER JOIN TELEPHONE C
ON B.TELEPHONE_ID = C.TELEPHONE_ID WHERE C.PRIMARY_INDICATOR = '1'
) D ON A.PERSON_ID = D.PERSON_ID
LEFT...
That is wonderful and the results are exactly what I was hoping to get. Thank you very much.
If you would, I have an additional problem that is directly related. I also need to return the "primary" email address that is associated to the PERSON record, or return a null value if a "primary"...
I am trying to create a left inner join on a linking table to pull back each record in a PERSON table along with its one-and-only correlating "primary" phone number (indicated by a primary_indicator field on the TELEPHONE table). If the PERSON record does not have a "pimary" phone I want to...
I am unable to display a Javascript alert that has about 3,000 characters in the text using Internet Explorer. I am, however, able to display the alert using FireFox. Does anyone know if there is a limit to the message size that can go into an alert using IE? I am unable to find information...
I found that I am losing user data when the screen is rendered with the error message so I need to figure that out now. If I find a fix I'll add it to this post.
I am developing with Struts 2 and I created a custom ExceptionMappingInterceptor class that is used to override the publishException method. In CustomExceptionMappingInterceptor I set an error message to an ActionError depending on which exception is caught. Then I return the user to the same...
I figured out how to do this.
1. Create a custom Exception Mapping Interceptor class that extends ExceptionMappingInterceptor. Make this class will override the publishExeption method so that it creates an ActionError if a certain exception is thrown.
2. Add a global-exception-mapping in your...
I am developing with Struts 2 and using global-exception-mappings in the struts config file to handle all HibernateOptimisticLockingFailureException exceptions that occur. I am also setting result="input" in order to render back to the same screen instead of a global error screen...
Thanks for the information. I am able to use Hibernate on my local PC with a database on my PC. I am unable to read data from or to the database on the GoDaddy server, however.
I am creating a web application that I want to host on a GoDaddy shared server. The web application uses Hibernate to save data to a MySQL database on the GoDaddy host. I have not been able to successfully connect to the database yet. Does anyone have experience using Hibernate with GoDaddy...
Is there some sample JSP code that can show me how to test a database connection to a MySQL database on a GoDaddy server. I know the GoDaddy hostname, database name, username, and password. GoDaddy Support only provides PHP sample code. Thanks.
Is there a sample JSP that I can use to test a database connection to the MySQL database that I have set up on the GoDaddy shared server? I already know the GoDaddy hostname, database name, username, and password. Thanks again for the help.
I have a Java web application running on my PC using a Tomcat server. I also have a MySQL database that the application reads and writes to. I am wondering how I can allow people to access my site if it is running on my PC. I think it has something to do with my router IP address but not sure...
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.