SQL Exception: Result Set Closed. Help Needed Pls...

Hi
I am trying to insert the name field into �TestNoName� table which is randomly retrieved from �UniqueName� table. I am getting SQL exception: result set closed. Please look at the given code and let me know what�s wrong with my code:
Also please guide me about entering unique (serial numbers) dynamically into
database using Java. I have to enter customer details into database at some time and some customers details after some time but the customers should be given serial numbers.
Thank you in advance!
Ravi
Here is the Code:
String query1 = "Select Name from Unique_Names";
String query2 = "SELECT Number, Name FROM TestNoName";
Statement stmt;
try {
Class.forName("sun.jdbc.odbc.JdbcOdbcDriver");
} catch(java.lang.ClassNotFoundException e) {
System.err.print("ClassNotFoundException: ");
System.err.println(e.getMessage());
try {
con = DriverManager.getConnection(url,"","");
System.out.println("Successfully Connected to Database");
stmt = con.createStatement(ResultSet.TYPE_SCROLL_SENSITIVE, ResultSet.CONCUR_UPDATABLE);
ResultSet rs = stmt.executeQuery(query1);
ResultSet rs2 = stmt.executeQuery(query2);
int count=0;
while (rs.next()) {
count++;
rs.beforeFirst();
for(int i = 0; i < 10; i++) {
int randomrow = random.nextInt(count)+ 1;
System.out.println(randomrow);
String Name2 = rs.getString("Name");
rs2.moveToInsertRow();
rs2.updateInt("Number",i);
rs2.updateString("Name",Name2);
rs2.insertRow();
System.out.println("Exececuted SQL Statement- Inserted One Record");
stmt.close();
con.close();
} catch(SQLException ex) {
System.err.println("SQLException: " + ex.getMessage());
}

I am trying to insert the name field into
�TestNoName� table which is randomly retrieved from
�UniqueName� table. I am getting SQL exception:
result set closed. Please look at the given code and
let me know what�s wrong with my code: Post the actual exception, not some paraphrase of it. Oh, and let us know which line it actually refers to in the code.

Similar Messages

  • Java.sql.SQLException: Result set already closed

    Hi,
    Our application is getting migrated to weblogic 10.3.5 and java 1.6.
    We use Ibatis(2.3.0.677.jar) in our application, when i am running my application, I get below exception in weblogic 10.3.5 with TransactionManager as JNDI.
    NOTE: This applicaiton runs very well in weblogic 9.2. And I have even tried locally using the JUnit with transactionManager as SIMPLE which works well too.
    BFSCITWA170546|CSI_APP_ID_NA|ERROR |0|2011-09-06 18:02:16,464|[ACTIVE] ExecuteThread: '5' for queue: 'weblogic.kernel.Default (self-tuning)'|AbstractMessageConsumerMdb.java|:- [System] Failed processing message - rolling back
    com.citi.eztop.ezengine.refactoring.common.exception.MessageProcessingException: DAOException received
         at com.citi.eztop.ezengine.refactoring.workpublishing.mdb.WorkPublisherQueueConsumerMDB.handleTextMessage(WorkPublisherQueueConsumerMDB.java:87)
         at com.citi.eztop.ezengine.refactoring.common.mdb.AbstractMessageConsumerMdb.onMessage(AbstractMessageConsumerMdb.java:163)
         at weblogic.ejb.container.internal.MDListener.execute(MDListener.java:574)
         at weblogic.ejb.container.internal.MDListener.transactionalOnMessage(MDListener.java:477)
         at weblogic.ejb.container.internal.NewJMSMessagePoller.processOneMessage(NewJMSMessagePoller.java:282)
         at weblogic.ejb.container.internal.NewJMSMessagePoller.run(NewJMSMessagePoller.java:120)
         at weblogic.work.SelfTuningWorkManagerImpl$WorkAdapterImpl.run(SelfTuningWorkManagerImpl.java:528)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:178)
    Caused by: com.citi.eztop.ezengine.refactoring.common.exception.DAOException: Failed to queryForObject [WorkItem.getWorkItemById]
         at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.BaseSqlMapDao.queryForObject(BaseSqlMapDao.java:60)
         at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.WorkItemSqlMapDao.getWorkItemById(WorkItemSqlMapDao.java:15)
         at com.citi.eztop.ezengine.refactoring.workpublishing.businesslayer.WorkPublisher.process(WorkPublisher.java:73)
         at com.citi.eztop.ezengine.refactoring.workpublishing.mdb.WorkPublisherQueueConsumerMDB.handleTextMessage(WorkPublisherQueueConsumerMDB.java:83)
         ... 8 more
    Caused by: com.ibatis.common.jdbc.exception.NestedSQLException:
    --- The error occurred in com/citi/eztop/ezengine/refactoring/common/persistence/sqlmapdao/sql/WorkItem.xml.
    --- The error occurred while applying a result map.
    --- Check the WorkItem.workItemResultMap.
    --- The error happened while setting a property on the result object.
    --- Cause: java.sql.SQLException: Result set already closed
         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:185)
         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryForObject(GeneralStatement.java:104)
         at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:566)
         at com.ibatis.sqlmap.engine.impl.SqlMapExecutorDelegate.queryForObject(SqlMapExecutorDelegate.java:541)
         at com.ibatis.sqlmap.engine.impl.SqlMapSessionImpl.queryForObject(SqlMapSessionImpl.java:106)
         at com.ibatis.sqlmap.engine.impl.SqlMapClientImpl.queryForObject(SqlMapClientImpl.java:83)
         at com.citi.eztop.ezengine.refactoring.common.persistence.sqlmapdao.BaseSqlMapDao.queryForObject(BaseSqlMapDao.java:56)
         ... 11 more
    Caused by: java.sql.SQLException: Result set already closed
         at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:144)
         at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:97)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
         at sun.reflect.GeneratedMethodAccessor77.invoke(Unknown Source)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at java.lang.reflect.Method.invoke(Method.java:597)
         at com.ibatis.common.jdbc.logging.ResultSetLogProxy.invoke(ResultSetLogProxy.java:47)
         at $Proxy78.next(Unknown Source)
         at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleResults(SqlExecutor.java:380)
         at com.ibatis.sqlmap.engine.execution.SqlExecutor.handleMultipleResults(SqlExecutor.java:301)
         at com.ibatis.sqlmap.engine.execution.SqlExecutor.executeQuery(SqlExecutor.java:190)
         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.sqlExecuteQuery(GeneralStatement.java:205)
         at com.ibatis.sqlmap.engine.mapping.statement.GeneralStatement.executeQueryWithCallback(GeneralStatement.java:173)
         ... 17 more
    Please help me to resolve this issue, as I am stuck with this.

    Hi Joe,
    Thanks alot for your reply, but the same code is working in weblogic 9.2 and it is in production as well.
    I have even replicated the settings of 9.2 to 10.3, but still was not able to fnd out the issue.
    Anyways will file an SR and provide it for you.
    Thanks,
    Addhankkiv

  • "java.sql.SQLException: Result set already closed"    on weblogic 9.1

    Hello together,
    i'm using hibernate 3.2.5ga on weblogic 9.1 through a data source with JTA defined to access oracle 10 with the Oracle's Thin XA Driver. Sporadically i get this:
    Caused by: java.sql.SQLException: Result set already closed
         at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:102)
         at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:58)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.getInt(Unknown Source)
         at org.hibernate.type.IntegerType.get(IntegerType.java:28)
         at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:163)
         at org.hibernate.type.NullableType.nullSafeGet(NullableType.java:154)
         at org.hibernate.type.AbstractType.hydrate(AbstractType.java:81)
         at org.hibernate.persister.entity.AbstractEntityPersister.hydrate(AbstractEntityPersister.java:2096)
         at org.hibernate.loader.Loader.loadFromResultSet(Loader.java:1380)
         at org.hibernate.loader.Loader.instanceNotYetLoaded(Loader.java:1308)
         at org.hibernate.loader.Loader.getRow(Loader.java:1206)
         at org.hibernate.loader.Loader.getRowFromResultSet(Loader.java:580)
         at org.hibernate.loader.Loader.doQuery(Loader.java:701)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.doList(Loader.java:2220)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         at org.hibernate.loader.Loader.list(Loader.java:2099)
         at org.hibernate.loader.hql.QueryLoader.list(QueryLoader.java:378)
         at org.hibernate.hql.ast.QueryTranslatorImpl.list(QueryTranslatorImpl.java:338)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
    This exception is thrown when i try to execute a named query for retrieving some data.
    Does anybody know what is wrong?
    Edited by eazy_rida at 12/17/2007 8:32 AM

    Hi Joe
    Here is the full stack trace:
    org.springframework.orm.hibernate3.HibernateSystemException: Exception occurred inside setter of uk.co.cpp.ptarmigan.domain.npp.NppCoveredParty.assets; nested exception is org.hibernate.PropertyAccessException: Exception occurred inside setter of uk.co.cpp.ptarmigan.domain.npp.NppCoveredParty.assets
         at org.springframework.orm.hibernate3.SessionFactoryUtils.convertHibernateAccessException(SessionFactoryUtils.java:661)
         at org.springframework.orm.hibernate3.HibernateAccessor.convertHibernateAccessException(HibernateAccessor.java:412)
         at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:379)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:872)
         at org.springframework.orm.hibernate3.HibernateTemplate.find(HibernateTemplate.java:868)
         at uk.co.cpp.ptarmigan.business.dao.hibernate.HibernateNppPolicyDAOImpl.findPolicyByPolicyNumber(HibernateNppPolicyDAOImpl.java:109)
         at uk.co.cpp.testptarmigan.PartyServiceTest.testFetchPhoneAngelUser(PartyServiceTest.java:79)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at org.springframework.test.ConditionalTestCase.runBare(ConditionalTestCase.java:76)
         at com.intellij.rt.execution.junit.JUnitStarter.main(JUnitStarter.java:40)
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at com.intellij.rt.execution.application.AppMain.main(AppMain.java:90)
    Caused by: org.hibernate.PropertyAccessException: Exception occurred inside setter of uk.co.cpp.ptarmigan.domain.npp.NppCoveredParty.assets
         at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:65)
         at org.hibernate.tuple.entity.AbstractEntityTuplizer.setPropertyValues(AbstractEntityTuplizer.java:337)
         at org.hibernate.tuple.entity.PojoEntityTuplizer.setPropertyValues(PojoEntityTuplizer.java:200)
         at org.hibernate.persister.entity.AbstractEntityPersister.setPropertyValues(AbstractEntityPersister.java:3571)
         at org.hibernate.engine.TwoPhaseLoad.initializeEntity(TwoPhaseLoad.java:133)
         at org.hibernate.loader.Loader.initializeEntitiesAndCollections(Loader.java:854)
         at org.hibernate.loader.Loader.doQuery(Loader.java:729)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
         at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
         at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
         at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
         at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
         at org.hibernate.collection.AbstractPersistentCollection.forceInitialization(AbstractPersistentCollection.java:454)
         at org.hibernate.engine.StatefulPersistenceContext.initializeNonLazyCollections(StatefulPersistenceContext.java:844)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:241)
         at org.hibernate.loader.Loader.doList(Loader.java:2213)
         at org.hibernate.loader.Loader.listIgnoreQueryCache(Loader.java:2104)
         at org.hibernate.loader.Loader.list(Loader.java:2099)
         at org.hibernate.hql.classic.QueryTranslatorImpl.list(QueryTranslatorImpl.java:912)
         at org.hibernate.engine.query.HQLQueryPlan.performList(HQLQueryPlan.java:172)
         at org.hibernate.impl.SessionImpl.list(SessionImpl.java:1121)
         at org.hibernate.impl.QueryImpl.list(QueryImpl.java:79)
         at org.springframework.orm.hibernate3.HibernateTemplate$30.doInHibernate(HibernateTemplate.java:881)
         at org.springframework.orm.hibernate3.HibernateTemplate.execute(HibernateTemplate.java:374)
         ... 28 more
    Caused by: java.lang.reflect.InvocationTargetException
         at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
         at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
         at org.hibernate.property.BasicPropertyAccessor$BasicSetter.set(BasicPropertyAccessor.java:42)
         ... 52 more
    Caused by: org.hibernate.exception.GenericJDBCException: could not initialize a collection: [uk.co.cpp.ptarmigan.domain.npp.NppCoveredParty.assets#component[partyId,policyId]{partyId=77951, policyId=78632}]
         at org.hibernate.exception.SQLStateConverter.handledNonSpecificException(SQLStateConverter.java:103)
         at org.hibernate.exception.SQLStateConverter.convert(SQLStateConverter.java:91)
         at org.hibernate.exception.JDBCExceptionHelper.convert(JDBCExceptionHelper.java:43)
         at org.hibernate.loader.Loader.loadCollection(Loader.java:2001)
         at org.hibernate.loader.collection.CollectionLoader.initialize(CollectionLoader.java:36)
         at org.hibernate.persister.collection.AbstractCollectionPersister.initialize(AbstractCollectionPersister.java:565)
         at org.hibernate.event.def.DefaultInitializeCollectionEventListener.onInitializeCollection(DefaultInitializeCollectionEventListener.java:63)
         at org.hibernate.impl.SessionImpl.initializeCollection(SessionImpl.java:1716)
         at org.hibernate.collection.AbstractPersistentCollection.initialize(AbstractPersistentCollection.java:344)
         at org.hibernate.collection.AbstractPersistentCollection.read(AbstractPersistentCollection.java:86)
         at org.hibernate.collection.PersistentBag.toArray(PersistentBag.java:257)
         at java.util.Collections.sort(Collections.java:158)
         at uk.co.cpp.ptarmigan.domain.npp.NppCoveredParty.setAssets(NppCoveredParty.java:54)
         ... 57 more
    Caused by: java.sql.SQLException: Result set already closed
         at weblogic.rjvm.BasicOutboundRequest.sendReceive(BasicOutboundRequest.java:108)
         at weblogic.rmi.internal.BasicRemoteRef.invoke(BasicRemoteRef.java:137)
         at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_922_WLStub.next(Unknown Source)
         at weblogic.jdbc.rmi.internal.ResultSetStub_weblogic_jdbc_rmi_internal_ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_922_WLStub.next(Unknown Source)
         at weblogic.jdbc.rmi.internal.ResultSetStraightReader.next(ResultSetStraightReader.java:27)
         at weblogic.jdbc.rmi.SerialResultSet.next(SerialResultSet.java:84)
         at org.hibernate.loader.Loader.doQuery(Loader.java:697)
         at org.hibernate.loader.Loader.doQueryAndInitializeNonLazyCollections(Loader.java:236)
         at org.hibernate.loader.Loader.loadCollection(Loader.java:1994)
         ... 66 more
    Caused by: java.sql.SQLException: Result set already closed
         at weblogic.jdbc.wrapper.ResultSet.checkResultSet(ResultSet.java:102)
         at weblogic.jdbc.wrapper.ResultSet.preInvocationHandler(ResultSet.java:58)
         at weblogic.jdbc.wrapper.ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
         at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl.next(Unknown Source)
         at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_WLSkel.internalInvoke1(Unknown Source)
         at weblogic.jdbc.rmi.internal.ResultSetImpl_weblogic_jdbc_wrapper_ResultSet_oracle_jdbc_driver_OracleResultSetImpl_WLSkel.invoke(Unknown Source)
         at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:550)
         at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:440)
         at weblogic.security.acl.internal.AuthenticatedSubject.doAs(AuthenticatedSubject.java:363)
         at weblogic.security.service.SecurityManager.runAs(SecurityManager.java:147)
         at weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:436)
         at weblogic.rmi.internal.BasicServerRef.access$300(BasicServerRef.java:58)
         at weblogic.rmi.internal.BasicServerRef$BasicExecuteRequest.run(BasicServerRef.java:975)
         at weblogic.work.ExecuteThread.execute(ExecuteThread.java:209)
         at weblogic.work.ExecuteThread.run(ExecuteThread.java:181)
    We are using using a connection within a client application (in our case we are executing this from a jUnit Integration test) so could this be caused by the handling of these remote connections?

  • SQL query with parameter returns empty result set, please help !!!

    Hi there,
    When I use the following query :
    <sql:query var="beroepsthemas" >
    select *
    from beroepsthemas
    where beroepsthemaid = ?
    <sql:param value="12"/>
    </sql:query>
    When I want to browse the result set with :
    <c:forEach items="${beroepsthemas.rows}" var="rij">
    it shows no records. But it must return at least one.
    All my jsp pages with sql queries and parameters have the same problem.
    This is all on my test environment. I'm using Ubuntu 5.10, Netbeans5.0, JDK 1.5_06, application runs in Bundeled Tomcat 5.5.9, MySQL 4.1.12, mysql-connector3.1.6
    When the same code is run on the live environment, it works just fine.
    The difference is :
    Mysql 4.1.10a, tomcat5.5.9, mysql-connector3.1.6
    What can there be wrong !!

    When the same code is run on the live environment, it
    works just fine.
    The difference is :
    Mysql 4.1.10a, tomcat5.5.9, mysql-connector3.1.6
    I didn't catch this. I think you may need to update the database driver.

  • AbandonedOrderService throwing Result Set Closed exception

    Hi
    In our application AbandonedOrderService.getLostOrdersBatch is throwing the sqlException: Result Set already Closed
      at atg.commerce.order.abandoned.AbandonedOrderService.getLostOrdersBatch(Ljava/lang/String;Ljava/lang/String;Z)[Latg/repository/RepositoryItem; (AbandonedOrderService.java:1362)
      at atg.commerce.order.abandoned.AbandonedOrderService$LostOrderBatchProcessor.processOrders()V (AbandonedOrderService.java:2133)
      at atg.commerce.order.abandoned.AbandonedOrderService$OrderBatchProcessor.run()V (AbandonedOrderService.java:2174)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(Ljava/lang/Runnable;)V (ThreadPoolExecutor.java:886)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run()V (ThreadPoolExecutor.java:908)
    I guess generating Lost Orders Batch query is new functionality introduced in ATG 10. Please help to resolve the issue... This consuming (holding) lot of heapsize because of which the production server going to hung state.
    any advise is much appreciated.
    Regards,
    Anil Ayi

    Hi,
    The batching methods for determining lost and abandoned orders were introduced as a fix for Bug 13289205, in the the ATG 10.0 product they were introduced in ATG 10.0.3.2.
    As a note you should be running the AbandonedOrderService scheduled service on a non page serving instance. Other page serving instances should have the schedule disabled by setting attribute /atg/commerce/order/abandoned/AbandonedOrderService.schedule to null.
    schedule^=/Constants.null
    Do you see any transaction timeout errors in the log file?
    Have you been monitoring heap usage? if so do you see a steady rise over time or a sudden rise? What are your JVM heap size settings?

  • SSIS and Update-Insert(Upsert) based on a SQL Server Result Set

    So on a weekly basis, I have to sweep a sub-set of our Member data. So my query is built to produce this result set. I then have to take that result set and compare it to a data table which contains all that same information that I have provided to a 3rd
    party vendor. So I need to take into account the following scenarios...
    Obviously, if the Member is new, then I have to Insert its row to what we'll call table 3rdPartyMember and create a row out on a 3rdPartyMemberAuditTrail Table
    Individually, I also have to manage if any of the following data fields have changed: Name, Birth Date, Addressing Information, Member Plan, Member Termination...and by Individually what I mean is that if the Last Name has changed, then update its row in
    3rdPartyMember and Insert a row to 3rdPartyMemberAuditTrail indicating "Last Name Change"...and similarly if Address Line 1 has changed..."Address Line 1 Change"
    So I guess my question is this. Should this be done in one whole Stored Procedure invoked by my SSIS Package or should it be done in pieces?
    Create the Temporary Table to house our weekly Member subset extract and result set
    Determine if the row exists on 3rdPartyMember Table and if it does not, Insert it
    If the row exists, determine if there is a First Name Change...Last Name Change...BirthDate change...Address Line 1 change...etc... If there is a change, Update 3rdPartyMember Table and also Insert a row to 3rdPartyMemberAuditTrail indicating the change
    Based on all this, I'm just not sure the right way to approach this...meaning should we create one big Stored Procedure to handle everything or each individual data point in my SSIS as an UpSert based on its lookup. I am new to the SSIS World and don't really
    know what the generally accepted practice is per se of creating and running an SSIS Package with multiple data point update steps or doing so in one big Stored Procedure.
    Also....if anyone know of some good YouTubes or web sites that would instruct me as to how to go about doing this, I'd GREATLY appreciate it.
    Thanks for your review and am hopeful for a reply.

    In my opinion using SSIS is quite a pain for Upsert-functionality, especially with your requirement of maintaining an audit trail.  With Google you can probably find 20 different variants all of which are quite complex.  I would go for the procedure
    version just to keep my sanity.  It is so easy to test and verify.
    I have been using an excellent Uppsert add on from Pragmatic Works Task Factory, but that would not help with the audit trail, though...
    http://pragmaticworks.com/Products/Features?Feature=UpsertDestination(BatchUpdateOrInsert)
    I recently discovered the CHECKSUM-function in Transact-SQL, it might simplify your code and certainly improve performance, if you have lot's of rows.
    Here is an example:
    create table member
    (id int primary key,
    name char(10) not null,
    address char(20) not null,
    checks int not null);
    create table member3p
    (id int primary key,
    name char(10) not null,
    address char(20) not null,
    checks int not null);
    create index xmember3p on member3p(id,checks);
    --create member3p_audit (...);
    insert into member values(1,'tom','new york',0);
    insert into member values(2,'mary','dallas',0);
    insert into member values(3,'marvin','durham',0);
    update member
    set checks = checksum(name,address);
    insert into member3p values(1,'tom','new york',0);
    insert into member3p values(2,'mary','chicago',0);
    update member3p
    set checks = checksum(name,address);
    insert into member3p
    select *
    from member m
    where not exists
    ( select *
    from member3p m3p
    where m3p.id = m.id );
    -- insert into audit...
    select m.*,
    case
    when m.name <> m3p1.name then 'x'
    else ' '
    end as name_change,
    case
    when m.address <> m3p1.address then 'x'
    else ' '
    end as adr_change
    from member m,
    member3p m3p1
    where m.id = m3p1.id and
    exists
    ( select *
    from member3p m3p2
    where m3p2.id = m.id and
    m3p2.checks <> m.checks );
    -- loop and update member3p and member_audit-- It's OK to update columns that were not changedupdate member3p set name = @new_name, address = @new_address;

  • Access Subform - Can the Subforms Source Object be defined by an SQL SP result set?

    Hi Guys,
    I can't clearly answer this question with a yes or no.
    I have an Access Sub Form that I am populating with a record set from a Store Procedure. Fairly early on I discovered that for this to work correctly the Source Object for the Sub Form Control must be set first, and most examples (including a working version
    of my own) achieve this by defining an Access Query and setting the Source Object to this.
    What I would really like to do is define the Source Object using the results of a SQL Store Procedure using ONLY code within VBA.
    Now before anyone starts providing alternatives "why don't you just..."  I'm noting now that I have a semi complex solution that makes most non-VBA based approaches ineffective. While it does work at present with an Access Query I'm needing
    to make the result set more dynamic meaning in future I will not know how many columns will be returned or the name of them, only the SP will have this information.
    Thanks in advance!

    Well after much trial and error I've got something which does what I want, although I'm not thrilled that I couldn't do this via my existing ADODB connections, in any case example provided below;
        Dim db As DAO.Database
        Dim qdf As New DAO.QueryDef
        Set db = CurrentDb()
       'qryMyTest refers to a dummy Access query (non pass through). 
        With db.QueryDefs("qryMyTest")
            .Connect = CurrentDb.TableDefs("tblSomeTestSQLTable").Connect
            .SQL = "exec sp_MyTestSP"
            Me.subfrmTest1.SourceObject = "Query.qryMyTest"
        End With   
        Set qdf = Nothing
    I've also marked your response Alphonse as an answer as it lead me onto the right path.

  • Help needed pls to set up Homehub 1.0

    Hi, I am new to this forum and am hoping you guys can give me some help to set up a homehub 1.0 which I was given. Tried BT help without success so far.
    I am trying to connect my desktop PC through an ethernet cable but can't get a connection. My current ISP is AOL (who weren't helpful and won't be my ISP much longer). I have downloaded the userguide which didn't help either. I do not have the installation disc. The idea of the router is to enable wireless setup of the Nintendo Wii at the same time as the PC which is at the moment connected via a Voyager modem.
    Can anyone help please? Many thanks,

    it is not the end of the world for the old trusty wireless modem.
    It is possible to install the original 'Speed Touch' software/firmware for the Home Hub 1.
    AOL use to use Speedtouch modems (probably still do) and you can download the firmware from reputable sources.
    if you google Javiser and select homeHubindex link (www.jarviser.co.uk/jarviser/homehubindex.htm) and select Loading Speedtouch firmware this will resolve your issues.  Or click here
    http://www.jarviser.co.uk/jarviser/hubunlocking.html
    CG
    CG Over An Out

  • Arabic Character set conversion-help needed

    We have our main database running in 10g (Solaris o/s) & planning to move these to RAC 11g.
    One of our old oracle DB(8.0.5)/solaris, which is not used till recently need to upgrade to 10g Rel2.
    I know Supported direct upgrade 8.0.6/8.1.7/9i -> 10g
    Current DB: 8.0.5 (Character Set: AR8ISO8859P6)
    Target DB : 10g Rel 2 (Character Set: AR8MSWIN1256)
    I am thinking to go the following way by using exp/imp
    8.0.5(AR8ISO8859P6) -> 8.1.7(AR8ISO8859P6) -> 10G(AR8MSWIN1256)
    OR
    8.0.5(AR8ISO8859P6) -> 8.1.7(AR8MSWIN1256) -> 10G(AR8MSWIN1256)
    please advice
    thanks

    (1) At source db 8.0.5 (solaris)
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-YY
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET AR8ISO8859P6
    NLS_SORT BINARY
    NLS_NCHAR_CHARACTERSE T AR8ISO8859P6
    $set NLS_LANG=AMERICAN_AMERICA.AR8ISO8859P6
    $exp sys/dba file=full251109.dmp full=y
    (2):>> At target db 10g R2 (solaris)
    PARAMETER VALUE
    NLS_LANGUAGE AMERICAN
    NLS_TERRITORY AMERICA
    NLS_CALENDAR GREGORIAN
    NLS_DATE_FORMAT DD-MON-RRRR
    NLS_DATE_LANGUAGE AMERICAN
    NLS_CHARACTERSET AR8ISO8859P6
    NLS_SORT BINARY
    NLS_NCHAR_CHARACTERSET UTF8
    NLS_COMP BINARY
    NLS_LENGTH_SEMANTICS BYTE
    NLS_NCHAR_CONV_EXCP FALSE
    $export NLS_LANG=AMERICAN_AMERICA.AR8ISO8859P6
    $imp testdba/testdba file=full251105.dmp fromuser=PROFINAL touser=PROFINAL
    *$csscan testdba/testdba FULL=Y FROMCHAR=AR8ISO8859P6 TOCHAR=AR8ISO8859P6 LOG=P6check CAPTURE=Y ARRAY=100000 PROCESS=2*
    There is EXCEPTIONAL DATA in .err file+
    clients accessing 8.0.5 dataabase uses characterset AR8IS08859P6, which is SAME as 8.0.5 database
    -CSSCAN result->>[Database Scan Parameters]
    Parameter Value
    CSSCAN Version v2.1
    Instance Name MIG1
    Database Version 10.2.0.1.0
    Scan type Full database
    Scan CHAR data? YES
    Database character set AR8ISO8859P6
    FROMCHAR AR8ISO8859P6
    TOCHAR AR8ISO8859P6
    Scan NCHAR data? NO
    Array fetch buffer size 100000
    Number of processes 2
    Capture convertible data? YES
    [Scan Summary]
    Some character type data in the data dictionary are not convertible to the new
    haracter set Some character type application data are not convertible to the new characters
    [Data Dictionary Conversion Summary]
    Datatype Changeless Convertible Truncation Lossy
    VARCHAR2 2,235,403 0 0 *1,492*
    CHAR 1,097 0 0 0
    LONG 155,188 0 0 6
    CLOB 24,643 0 0 0
    VARRAY 21,352 0 0 0
    Total 2,437,683 0 0 1,498
    Total in percentage 99.939% 0.000% 0.000% 0.061%
    The data dictionary can not be safely migrated using the CSALTER script
    [Application Data Conversion Summary]
    Datatype Changeless Convertible Truncation Lossy
    VARCHAR2 16,986,594 0 0 *1,240,383*
    CHAR 164,114 0 0 0
    LONG 7 0 0 0
    CLOB 1 0 0 0
    VARRAY 1,436 0 0 0
    Total in percentage 93.256% 0.000% 0.000%
    6.744%
    [Distribution of Convertible, Truncated and Lossy Data by Table]
    USER.TABLE Convertible Truncation Lossy
    PROFINAL.BASE_MASTER_DATAS 0 0 *362,003*
    PROFINAL.CODE_ALLOW 0 0 *53*
    PROFINAL.CODE_ALLOWANCE_TYPES 0 0 *1*
    PROFINAL.CODE_BONUS_TYPES 0 0 *2*
    PROFINAL.CODE_BRANCHES 0 0 *2*
    PROFINAL.CODE_CERTIFICATES 0 0 *94*
    Kindly help,,,
    Edited by: userR12 on Nov 25, 2009 1:43 AM
    Edited by: userR12 on Nov 25, 2009 1:52 AM

  • Error java.sql.exception when setting up repository for OWB 11g

    Hey all,
    I am encountering the following error on the last step of Repository Assistant, that is, while trying to set up the design repository in OWB 11g:
    "The Warehouse Builder workspace installation failed
    java.sql.SQLException : ORA-00942 table or view does not exist"
    Below is an excerpt from the the log file:
    main.TaskScheduler timer[5]20080620@14:51:54.054: 00> oracle.wh.service.impl.assistant.ProcessEngine.processSQLUserToken(ProcessEngine.java:1106)+>     at java.lang.Thread.run(Thread.java:595)
    main.TaskScheduler timer[5]20080620@14:51:54.054: 00> oracle.wh.service.impl.assistant.ProcessEngine.display(ProcessEngine.java:1572): Exception = java.sql.SQLException: ORA-00942: table or view does not exist
    main.TaskScheduler timer[5]20080620@14:51:54.054: 00> oracle.wh.ui.install.assistant.wizards.AssistantWizardDefinition.display(AssistantWizardDefinition.java:788): [executeOwbReposOrRuntime]: Error occurred during Workspace Installation. Exception =java.lang.Exception: java.sql.SQLException: ORA-00942: table or view does not exist
    main.AWT-EventQueue-0[6]20080620@14:51:54.054: 00> oracle.wh.ui.jcommon.WhButton@a22671: WhButton setLabel rtsString = OK
    main.AWT-EventQueue-0[6]20080620@14:58:17.017: 00> oracle.wh.ui.install.assistant.wizards.AssistantWizardDefinition.display(AssistantWizardDefinition.java:788): before open 'UnSuccessDialog'
    main.AWT-EventQueue-0[6]20080620@14:58:17.017: 00> oracle.wh.ui.install.assistant.wizards.AssistantWizardDefinition.display(AssistantWizardDefinition.java:788): Open UnSuccessDialog ...
    main.AWT-EventQueue-0[6]20080620@14:58:17.017: 00> oracle.wh.ui.jcommon.WhButton@a22671: WhButton setLabel rtsString = OK
    I am new to OWB so please let me know if I've left out any information that would help in figuring out why the installation is not completing.
    Thanks.

    The only thing I can think of in OWB 11g is that the main schema that is used, which is OWBSYS, wasn't fully installed or it doesn't have all the tables or views it needs or they weren't created properly with the cat_owb.sal script.
    Something must not have been created right. I would try to stop all OWB services with the appropriate scripts in:
    <your_owb_home>owb\rtp\sql
    try the stop_service.sql script.
    Then try to drop the users owbsys and whatever you might have created (if it exists) for a workspace owner user. Then clean up with:
    <your_owb_home>\owb\UnifiedRepos\clean_owbsys.sql
    After that it is back to the drawing board from the beginning. DO these steps again that you likely did in the first place:
    1. create owbsys with:
    <your_owb_home>\owb\UnifiedRepos\cat_owb.sql <tablespace_name>
    2. Set the control center home with:
    <your_owb_home>\owb\UnifiedRepos\reset_owbcc_home.sql <your_owb_home>
    *pay attention to the case of the the OWB HOME you give as a variable to the above script.  It needs to match the case of your real path.
    3. Finally unlock owbsys.
    4. look at <your_owb_home>\owb\bin\admin\ if the rtrepos.properties file size is at '0'. If it is for some reason, rename it to something else right now.
    5. Then try to run the repository assistant again.
    -Greg

  • WDS Set up - Help Needed! Airport Extreme with one Relay and one remote

    Hi Guys,
    I need a bit of help. I am feeling quite stupid and frustrated. I am having some difficulty with setting up a WDS network with:
    Base station: Airport extreme (current version)
    Relay: Airport Express (current version)
    Remote: Airport Express (current version)
    I start by cold resetting the three units. The Base station is connected via Ethernet. The setup I wish to get going is a simple base - relay - remote.
    I go through the utility manager and set up the base station, first as "create a wireless network" enter the ISP details etc etc. Its green light. Everything is fine. Then manually configure the Base Station. Hold down option key hit Participate in a WDS. I then select main enter + and add the Mac Id's for the intended Relay unit and Remote Unit (12 character and numeric string). At this stage I am only adding the intended Relay unit and Remote units MAC number.
    Question 1: Do I need to add the base unit's MAC number itself under: WDS Remotes? even I am setting it up as Main?
    I am careful to note the security settings and the the Wireless Network name to match these in the relay and remote set up. Under the Wireless tab I leave the Radio Mode: as Automatic (802.11a/n - 802.11b/g/n). I make sure the base has "allow this network to be extended" ticked. Under Radio Channel selection I edit it to reference channel 1 for 2.4Ghz (5 Ghz leave as Auto). I am careful when setting up the Relay and remote to match the Radio Channel. (Although I tired many channels as I thought maybe interference was a factor and denying the fact its obviously my set up skills as a factor).
    Question 2: Do you need to disable Guest networks? I would think it does not matter as I have tired turning it off and has not made any difference.
    Under Access Control I leave as default, Not enabled.
    Next I hit update and and error message comes up. WDS Error as it can not find other units. Ok fine as the relay and remote are not yet set up. So I ignore and can get to the stage where the base unit is working and green light with an internet connection.
    I then proceed to set up the Relay unit. Doing the same steps as above with a couple of differences being I add the MAC numbers and select the WDS Mode (Relay for Relay and Remote for Remote. I add the Main base station (i.e Airpot Extreme MAC No.) when prompted and then + the Remotes MAC number. The same for the Remote except I only need to add the base station's main no.
    Question 3. Do I need to add the Relay's own MAC number to its own setup? This seems doubtful as with the base station but tired with and without for good measure with no success.
    The 2.4Ghz channels are all set to 1. Radio mode set to Auto. Although even when I try to manually set them to all identical it doesn't seem t help.
    Then the problems begin. The base unit is Green and the Relay and Remote say they are not connected to the internet. I assume since I have not seen a WDS Error message then the units are set up correctly or as I ignored it on the base unit. But when click unignore the error seems to work itself out.
    Question 4. I need help to understand why I have no internet. The remote / relay says something about no IP number and I don't really understand what I should do? Do I need to go back the Airport Utility Manager and start messing about with the TCP/IP, DHCP, NAT ? The base is set up PPPoE and the relay and remote are set to Bridge.
    It is really puzzling me why the relay and remote flash amber with error messages related to the IP number? I have tried turning off the base station and router and then on again but no joy.
    Can anyone please enlighten me or give me a few ideas? I am doing something very obviously stupid and I guess the fix is something simple that I have overlooked.
    I did spend the time and go through the threads and search online, So I am not trying to waste anyone's time I referenced the two links to get a second opinion:
    http://broadcast.oreilly.com/2009/03/taming-an-airport-express-wds.html
    http://www.macobserver.com/tmo/article/settingup_an_airport_relay_with_airportexpress/
    Any help much appreciated!

    Versed wrote:
    I need a bit of help.
    Welcome to Apple's discussion groups.
    My WDS experience is limited to "main" and "remote" configurations (no "relay"), so I'm not posting from direct experience, but below is what I think would work in your case.
    I go through the utility manager and set up the base station, first as "create a wireless network" enter the ISP details etc etc. Its green light. Everything is fine. Then manually configure the Base Station. Hold down option key hit Participate in a WDS. I then select main enter + and add the Mac Id's for the intended Relay unit and Remote Unit
    I don't think the "main" unit needs to be told about the "remote" unit, only about the "relay" unit.
    Question 1: Do I need to add the base unit's MAC number itself under: WDS Remotes? even I am setting it up as Main?
    You'd never enter the MAC address of a unit into its own configuration, if that's what you mean. I also don't think that you'd need to enter the MAC address of the main into the remote and conversely.
    I am careful to note the security settings and the the Wireless Network name to match these in the relay and remote set up. Under the Wireless tab I leave the Radio Mode: as Automatic (802.11a/n - 802.11b/g/n).
    Five things have to match in a WDS configuration: network name, encryption type, network password, band, and channel.
    I make sure the base has "allow this network to be extended" ticked.
    I don't think that's important for a WDS configuration.
    Question 2: Do you need to disable Guest networks?
    I wouldn't think that matters.
    Under Access Control I leave as default, Not enabled.
    That's fine.
    WDS Error as it can not find other units. Ok fine as the relay and remote are not yet set up.
    Right.
    I then proceed to set up the Relay unit. Doing the same steps as above with a couple of differences being I add the MAC numbers and select the WDS Mode (Relay for Relay and Remote for Remote. I add the Main base station (i.e Airport Extreme MAC No.) when prompted and then + the Remotes MAC number. The same for the Remote except I only need to add the base station's main no.
    I think this should be the MAC address of the relay station, not that of the main station.
    Question 3. Do I need to add the Relay's own MAC number to its own setup?
    No.

  • SQL STATEMENT NOT PROPERLY ENDED - HELP NEEDED

    Can anyone tell me the error in this code, I get an error message sql statement not properly ended when I run it.
    update MODT set rootobj=(SELECT REF(A) FROM
    OR_COMP_T A
    WHERE A.ID=O.ID)
    AS OR_COMP_T_REF)
    FROM OLD_MODT O where id = 1;

    Hi, here is the schema and the expected results.
    =======================================================================================
    CREATE TYPE OR_MODT_OBJ;
    CREATE TYPE OR_MODT_OBJ_REF AS TABLE OF REF OR_MODT_OBJ;
    =================================================
    CREATE OR REPLACE TYPE OR_COMP_T_OBJ
    (id number (6),
    typ char (4),
    SUPERID REF OR_COMP_T_OBJ,
    MOD REF OR_MODT_OBJ);
    =================================================
    CREATE OR REPLACE TYPE OR_COMP_T_REF AS TABLE OF REF OR_COMP_T_OBJ;
    =================================================
    CREATE TABLE OR_COMP_T OF OR_COMP_T_OBJ
    =================================================
    CREATE TYPE OR_MODT_OBJ
    (id number (6),
    typ char (4),
    rootobj REF OR_COMP_T_OBJ,
    comp_tb     OR_COMP_T_REF);
    =================================================
    CREATE TABLE MODT OF OR_MODT_OBJ
    NESTED COMP_TB STORE AS COMP_TB_NESTED;
    =================================================
    INSERT INTO OR_MODT (ID,TYP,ROOTOBJ,COMP_TB)
    SELECT ID,TYP,NULL,NULL FROM OLD_MODT;
    INSERT INTO OR_COMP_T(ID,TYP,SUPERID,MOD)
    SELECT ID,TYP,NULL,NULL FROM OLD_OR_COMP_T;
    ==================================================
    There are two rows in OLD_MODT, and these two rows are to be inserted into OR_MODT.
    They are:
    Sample data in OLD_MODT are:
    id,      typ,     rootobj
    1     type1     1
    2     type3     365
    =================================================
    Data from OLD_OR_COMP_T is to be inserted into OR_COMP_T as well, and likewise, it has a ref to OR_MODT, so the ref data was not inserted at the same time.
    Now OLD_OR_COMP_T has a number of rows but attribute MOD for two of these rows os the rootobj for OR_MODT,
    such that:
    id     typ     superID     mod
    1     type4     NULL     1
    2     type2     10101     1
    3     type     20202     1
    365     type2     NULL     2
    366     type2     20202     2
    I want to get the ID of OR_COMP_T where ID is 1 and where ID is 365. These values are to be in rootobj.
    I also want to get the value of ID in OR_MODT to be placed in MOD of OR_COMP_T.
    PLEASE HELP ME.

  • Urgent help needed pls regarding LOGO

    hello friends this is sudhakar . i really need help
    pls urgent
    i wrote scjp 5.0 certification in august and cleared succesfully
    i got all certificates but for logo i have to send the mail which cost me around 620/- rupess to them. but,
    can u any one tell how can v say to sun pupil tat i got all my cetificaties and i need the logo for my resume
    i heard we can do with online in www.sun.com only so can u help me out pls it is urgent.....

    http://www.sun.com/training/certification/faq/index.html#logos
    This part should be relevant to you -
    All customers that reside outside US and Canada: Once you have successfully passed one of our Java platform exams, a certification kit will be mailed to you that includes a Sun Logo Agreement. Please sign the agreement and mail it back to the address supplied. Depending from which country you mail the agreement, it may take up to month for you to receive the logo. We are currently working to provide an online logo for our International customers.
    This means you send the mail to them or wait for them to go online (which might mean months).

  • E71 - MFE Set Up - Help Needed

    Hi,
    Hope someone can help here. Have MFE on E71 and have entered the details I believe are relevant from my work Microsoft Outlook account. However, when I try and sync, I get 'Connection error, try again later'. I think I have either the domain or ports wrong, but have no idea where I can find this information?
    The username and password settings are what I use to log in to my email account, are these case sensitive?
    The exchange server I have got directly from Microsoft Outlook via Tools-Email Accounts-View or Change-Change (and it is there).
    The only thing left I am not 100% sure on is the domain and the ports?
    If anyone can tell me where these can be found on my system or in Outlook setting, it would be much appreciated.

    You can get all the information from the network administrator / whoever looks after your Exchange Server...
    If you log on to the network that the Exchange server's on, the domain's in the box underneath the password box, most admins use the default ports, but the administrator will be able to confirm that. Also, you need to make sure that mobile access is enabled - another question for the administrator...
    Not a great deal of help there I'm afraid, but the administrator's the person to ask in this case
    Nokia History: 3110, 5110, 7110, 7110, 3510i, 6210, 6310i, 5210, 6100, 6610, 7250, 7250i, 6650, 6230, 6230i, 6260, N70, N70, 5300, N95, N95, E71, E72
    Android History: HTC Desire, SE Xperia Arc, HTC Sensation, Sensation XE, One X+, Google Nexus 5

  • SQL Query Sorting Order issue - Help needed

    Hi All,
    I am using the following query in my project to display the records in the grid.
    /* Formatted on 04-09-2013 PM 8:01:51 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY building_name ASC,
             LOWER (child_asset_group) ASC,
             LOWER (relation) DESC
    The problem is , if any one sorting with any column  , the order is not correct
    In this below code , i have done sorting by port . But the result data order is not correct .
    /* Formatted on 04-09-2013 PM 8:07:02 (QP5 v5.149.1003.31008) */
      SELECT eol,
             status_msg,
             relation,
             building_name,
             device_id id,
             CEIL (SYSDATE - updated_date) duration,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             TO_CHAR (updated_date, 'YYYY-MM-DD HH24:MI:SS') updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             LISTAGG (TESTBED_ID, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_id_ref,
             LISTAGG (NAME, ',') WITHIN GROUP (ORDER BY TESTBED_ID)
                AS testbeds_names,
             spname || '-' || ip_address || '-' || port AS child_asset_group
        FROM DEVICE_TESTBED_VW
       WHERE lab_id IN
                ('7099849',
                 '10769617',
                 '4258712',
                 '10513562',
                 '10515074',
                 '5882676',
                 '8330925')
    GROUP BY eol,
             status_msg,
             relation,
             device_id,
             lab_id,
             aisle_id,
             aisle_location_id,
             ip_address,
             port,
             slot_num,
             hostname,
             pid,
             description,
             sl_num,
             eitms_code,
             status,
             dnd_flag,
             aisle,
             aisle_location,
             spname,
             os_version,
             user_id,
             updated_date,
             isterm_svr,
             net_type,
             DEVICE_GROUP_REF,
             cmd_id_ref,
             building_name
    ORDER BY PORT ASC
    Can some one help me to fix this issue?

    Hi,
    Sorry, it's not clear what you want.
    Whenever you have a problem, please post a little sample data (CREATE TABLE and INSERT statements, relevant columns only) from all tables involved, so that the people who want to help you can re-create the problem and test their ideas.
    Also post the results you want from that data, and an explanation of how you get those results from that data, with specific examples.
    Simplify the problem as much as possible. For example, if you really need to GROUP BY 28 columns, post a problem where you need to GROUP BY only 2 or 3 columns.  (Just explain that you really have 28, so people will give solutions that are sure to work for all 28).)
    Always say which version of Oracle you're using (for example, 11.2.0.2.0).
    See the forum FAQ: https://forums.oracle.com/message/9362002

Maybe you are looking for