Bad SQL for filter expression

Using Kodo JDO 2.5.3, I am attempting to do queries of the following form:
select * from dschannel as c
where not exists (select pk from channelsegment as s
where c.pk = s.channel and
c.supporting = ? and
(s.validForEnd > ? or
s.validForStart < ?));
select * from dschannel as c
left join channelsegment as s
on c.pk = s.channel and
c.supporting = ? and
(s.validForEnd > ? or
s.validForStart < ?)
where s.channel is null;
The code looks like this:
extent = pm.getExtent( ChannelValue.class, true );
query = pm.newQuery( this.extent );
query.declareImports( "import
com.metasolv.resources.entity.connection.ChannelSegmentValueImpl; import
java.util.Date;" );
query.declareParameters( "String pConn, Date pStart, Date pEnd" );
query.declareVariables( "ChannelSegmentValueImpl assign" );
String filter = "! (key == assign.channel && supportingConnection == pConn
&& (assign.validForEnd > pStart || assign.validForStart < pEnd))";
query.setFilter( filter );
resultSet = (java.util.Collection) query.execute( connection,
interval.getStartDateTime(), interval.getEndDateTime() );
I am seeing the following Exception with mysql 4.0.15 and mysql connector
JDBC driver 3.0.8:
com.solarmetric.kodo.runtime.DataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = '101/DS3/LOC01/LOC02' AND (t1.validForEnd >
{ts '2001-07-24 20:59:49.0'} OR t1.validForStart < {ts '2038-01-18
22:14:07.0'}))]
[PRE=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = ? AND (t1.validForEnd > ? OR t1.validForStart
< ?))]
Syntax error or access violation, message from server: "You have an error
in your SQL syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'WHERE NOT (t0.PK = t1.channel AND
t0.supporting = '101/DS3/LOC0" [code=1064;state=42000]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = '101/DS3/LOC01/LOC02' AND (t1.validForEnd >
{ts '2001-07-24 20:59:49.0'} OR t1.validForStart < {ts '2038-01-18
22:14:07.0'}))]
[PRE=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE, t
0.name, t0.note, t0.previousVersion, t0.resourceBusinessName, t0.signalType,
t0.supporting, t0.direction, t0.validForEnd, t0.validForStart FROM DSChannel
t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK = t1.channel AND
t0.supporting = ? AND (t1.validForEnd > ? OR t1.validForStart < ?))]
Syntax error or access violation, message from server: "You have an error
in your SQL syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'WHERE NOT (t0.PK = t1.channel AND
t0.supporting = '101/DS3/LOC0"
at
com.solarmetric.kodo.impl.jdbc.runtime.SQLExceptions.throwDataStore(SQLExcep
tions.java:64)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
reManager.java:1167)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.executeQuery(JDBCQuery.java:1
26)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.executeQuery(Que
ryImpl.java:1565)
at
com.solarmetric.kodo.query.QueryImpl$AggregateQueryExecutor.executeQuery(Que
ryImpl.java:1401)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:685)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
at
com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:531)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:513)
at
com.metasolv.resources.queries.ChannelAvailabilityQueryBean.execute(ChannelA
vailabilityQueryBean.java:55)
at
com.metasolv.oss.inventory.InventorySessionBean.queryInventory(InventorySess
ionBean.java:1343)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl.queryInventory
(InventorySessionBean_xf0gis_EOImpl.java:3998)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl_WLSkel.invoke(
Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
NestedThrowablesStackTrace:
java.sql.SQLException: Syntax error or access violation, message from
server: "You have an error in your SQL syntax. Check the manual that
corresponds to your MySQL server version for the right syntax to use near
'WHERE NOT (t0.PK = t1.channel AND t0.supporting = '101/DS3/LOC0"
at com.mysql.jdbc.MysqlIO.checkErrorPacket(MysqlIO.java:1651)
at com.mysql.jdbc.MysqlIO.sendCommand(MysqlIO.java:889)
at com.mysql.jdbc.MysqlIO.sqlQueryDirect(MysqlIO.java:956)
at com.mysql.jdbc.Connection.execSQL(Connection.java:1874)
at
com.mysql.jdbc.PreparedStatement.executeQuery(PreparedStatement.java:1538)
at
com.solarmetric.datasource.PreparedStatementWrapper.executeQuery(PreparedSta
tementWrapper.java:93)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executePreparedQueryI
nternal(SQLExecutionManagerImpl.java:707)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQueryInternal(
SQLExecutionManagerImpl.java:600)
at
com.solarmetric.kodo.impl.jdbc.SQLExecutionManagerImpl.executeQuery(SQLExecu
tionManagerImpl.java:355)
at
com.solarmetric.kodo.impl.jdbc.ormapping.ClassMapping.selectPrimaryMappings(
ClassMapping.java:1743)
at
com.solarmetric.kodo.impl.jdbc.runtime.JDBCStoreManager.executeQuery(JDBCSto
reManager.java:1136)
at
com.solarmetric.kodo.impl.jdbc.query.JDBCQuery.executeQuery(JDBCQuery.java:1
26)
at
com.solarmetric.kodo.query.QueryImpl$DatastoreQueryExecutor.executeQuery(Que
ryImpl.java:1565)
at
com.solarmetric.kodo.query.QueryImpl$AggregateQueryExecutor.executeQuery(Que
ryImpl.java:1401)
at
com.solarmetric.kodo.query.QueryImpl.executeQueryWithMap(QueryImpl.java:685)
at com.solarmetric.kodo.query.QueryImpl.executeWithMap(QueryImpl.java:545)
at
com.solarmetric.kodo.query.QueryImpl.executeWithArray(QueryImpl.java:531)
at com.solarmetric.kodo.query.QueryImpl.execute(QueryImpl.java:513)
at
com.metasolv.resources.queries.ChannelAvailabilityQueryBean.execute(ChannelA
vailabilityQueryBean.java:55)
at
com.metasolv.oss.inventory.InventorySessionBean.queryInventory(InventorySess
ionBean.java:1343)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl.queryInventory
(InventorySessionBean_xf0gis_EOImpl.java:3998)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl_WLSkel.invoke(
Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
INFO ExecuteThread: '10' for queue: 'default' com.metasolv.oss.inventory -
ignoring exception
javax.oss.IllegalArgumentException:
com.solarmetric.kodo.runtime.DataStoreException:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = '101/DS3/LOC01/LOC02' AND (t1.validForEnd >
{ts '2001-07-24 20:59:49.0'} OR t1.validForStart < {ts '2038-01-18
22:14:07.0'}))]
[PRE=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = ? AND (t1.validForEnd > ? OR t1.validForStart
< ?))]
Syntax error or access violation, message from server: "You have an error
in your SQL syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'WHERE NOT (t0.PK = t1.channel AND
t0.supporting = '101/DS3/LOC0" [code=1064;state=42000]
NestedThrowables:
com.solarmetric.kodo.impl.jdbc.sql.SQLExceptionWrapper:
[SQL=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = '101/DS3/LOC01/LOC02' AND (t1.validForEnd >
{ts '2001-07-24 20:59:49.0'} OR t1.validForStart < {ts '2038-01-18
22:14:07.0'}))]
[PRE=SELECT DISTINCT t0.PK, t0.JDOCLASSX, t0.JDOLOCKX, t0.AEndPoint,
t0.AEndPointType, t0.DS0, t0.DS1, t0.DS2, t0.DS3, t0.DS4, t0.ZEndPoint,
t0.ZEndPointType, t0.adminState, t0.creationDate, t0.SPECKEY, t0.SPECTYPE,
t0.description, t0.lastModifiedDate, t0.lastModifiedUserId, t0.LASTUPDATE,
t0.name, t0.note, t0.previousVersion, t0.resourceBusinessName,
t0.signalType, t0.supporting, t0.direction, t0.validForEnd, t0.validForStart
FROM DSChannel t0 LEFT OUTER JOIN ChannelSegment t1 WHERE NOT (t0.PK =
t1.channel AND t0.supporting = ? AND (t1.validForEnd > ? OR t1.validForStart
< ?))]
Syntax error or access violation, message from server: "You have an error
in your SQL syntax. Check the manual that corresponds to your MySQL server
version for the right syntax to use near 'WHERE NOT (t0.PK = t1.channel AND
t0.supporting = '101/DS3/LOC0"
at
com.metasolv.resources.queries.ChannelAvailabilityQueryBean.execute(ChannelA
vailabilityQueryBean.java:61)
at
com.metasolv.oss.inventory.InventorySessionBean.queryInventory(InventorySess
ionBean.java:1343)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl.queryInventory
(InventorySessionBean_xf0gis_EOImpl.java:3998)
at
com.metasolv.oss.inventory.InventorySessionBean_xf0gis_EOImpl_WLSkel.invoke(
Unknown Source)
at weblogic.rmi.internal.BasicServerRef.invoke(BasicServerRef.java:362)
at
weblogic.rmi.cluster.ReplicaAwareServerRef.invoke(ReplicaAwareServerRef.java
:114)
at weblogic.rmi.internal.BasicServerRef$1.run(BasicServerRef.java:313)
at
weblogic.security.service.SecurityServiceManager.runAs(SecurityServiceManage
r.java:821)
at
weblogic.rmi.internal.BasicServerRef.handleRequest(BasicServerRef.java:308)
at
weblogic.rmi.internal.BasicExecuteRequest.execute(BasicExecuteRequest.java:3
0)
at weblogic.kernel.ExecuteThread.execute(ExecuteThread.java:213)
at weblogic.kernel.ExecuteThread.run(ExecuteThread.java:189)
Ben

pConn parameter is a String value like "1001/DS3/LOC01/LOC02" which is being
matched against the supportingConnection field (mapped to a column named
"supporting") on the ChannelValue candidate class. Note that the Extent is
created on the ChannelValue interface, but it is the DSChannelValue
concrete class that has matching instances. (This kind of Query started
working in 2.5.0, if I remember correctly.)
Ben
"Abe White" <[email protected]> wrote in message
news:[email protected]..
What is the value of the pConn parameter / connection variable?

Similar Messages

  • Bad SQL for JDO query

    Kodo JDO EE 2.3 RC1 (with InstantDB on JBoss 3.0 on JDK 1.3.1 on Mac
    OS X 10.1.5) generates wrong SQL for a JDO query with a parameter.
    Essentially (unimportant details omitted) I have the following:
    2 associated persistence-capable classes
    public class Person
         private String name;
    public class Issue
         private int id;
         private Person owner;
    both with application-managed identity (Person by name, Issue by id),
    both in the same package. I want to search the database for all Issues
    owned by a certain Person. My code looks like this:
    @pre p is persistent
    Collection findByOwner(Person p){
         // pm is the PersistenceManager
         //TODO pm.newQuery(Issue.class, filter) does not work with Kodo 2.3 RC1
         Extent extent = pm.getExtent(Issue.class, true);
         Query query = pm.newQuery(extent, "owner==person");
         query.setClass(Issue.class);
         query.setIgnoreCache(true);
         query.declareParameters(Person.class.getName() + " person");
         return (Collection)query.execute(p);
    and produces the following SQL statement
    SELECT t0.IDX, t0.JDOCLASSX, t0.JDOLOCKX, t0.NAME_OWNERX FROM ISSUEX
    t0, PERSONX t1 WHERE (t1.NAMEX = NULL AND t0.NAME_OWNERX = t1.NAMEX)
    which is wrong because the actual p.name, which is definitely not nil,
    got lost, and is even rejected by the database*, probably because
    NAMEX is the primary key and cannot be NULL.
    I am pretty sure that this used to work correctly with Kodo 2.2.4. Can
    anyone tell me what I could be doing wrong? I will provide the full
    source code at request.
    Thanks,
    Jakob
    * SQLException:
    Don't understand SQL after: "WHERE"
    Expected: "{" found: "NULL"

    This issue has been resolved in internal builds.
    Some tangential notes about the code below:
    - in our latest version, we no longer require extents when executing
    queries (the candidate class is sufficient).
    - I'm a little concerned about where the 'pm' variable came from in
    Issue.findByOwner(). If that's a member variable, you'd be better off
    doing 'JDOHelper.getPersistenceManager (this)' instead of caching it on
    your own -- this way, you'll avoid any potential issues with somehow
    using the wrong PM or something.
    - Given that all the info is stored in the database already, I'd suggest
    making the relation a bidirectional one, so that you can just traverse
    from Issue to Person without needing to do a query. This will be faster,
    as we will be able to leverage our PM and PMF caches rather than needing
    to execute a query against the data store.
    -Patrick
    Jakob Spies <[email protected]> wrote:
    Kodo JDO EE 2.3 RC1 (with InstantDB on JBoss 3.0 on JDK 1.3.1 on Mac
    OS X 10.1.5) generates wrong SQL for a JDO query with a parameter.
    Essentially (unimportant details omitted) I have the following:
    2 associated persistence-capable classes
    public class Person
    private String name;
    public class Issue
    private int id;
    private Person owner;
    both with application-managed identity (Person by name, Issue by id),
    both in the same package. I want to search the database for all Issues
    owned by a certain Person. My code looks like this:
    @pre p is persistent
    Collection findByOwner(Person p){
    // pm is the PersistenceManager
    //TODO pm.newQuery(Issue.class, filter) does not work with Kodo 2.3 RC1
    Extent extent = pm.getExtent(Issue.class, true);
    Query query = pm.newQuery(extent, "owner==person");
    query.setClass(Issue.class);
    query.setIgnoreCache(true);
    query.declareParameters(Person.class.getName() + " person");
    return (Collection)query.execute(p);
    Patrick Linskey [email protected]
    SolarMetric Inc. http://www.solarmetric.com

  • Using sql in the filter expression

    For a project I need to use a filter which is a construction
    with BETWEEN dateFrom AND dateTo.
    But the user does not choose these datevalues,
    he chooses timePeriods which have a unique startDate.
    The dashboard prompts are populated with these timePeriods and the user chooses 2 of these and 2
    presentation variables are set.
    Now I need to retrieve the according startDate for a chosen timePeriod.
    I tried to do this using a sub-query in the filter expression,
    but this seems not to be valid in Answers.
    In standard SQL it is expressed like this:
    select table1.* from table1
    where table1.dateValue  BETWEEN
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue1')+
    AND
    +(select table2.startDate from table2 where table2.timePeriod = 'theChosenValue2')+
    The return of the subqueries are single row, as it should in such constructions.
    I want the where clause to be in the filter expression for the dateValue column in Answers.(trimming of the WHERE keyword)
    Is there any other construction that does this trick in the BI Answers/Dashboard environment to do this?
    Kind regards

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

  • SQL in reports filter expression

    Hi All,
    I want to filter the report using the 'in' operator and specify a SQL as the expression. I want apex to be use the result of the query as the list of values for the 'in' operator. Is this supported?
    for example can I specify the filter as 'user_name in (select name from user_name_tab where group_id = 10)'
    Thanks
    Edited by: vmedi on Jan 3, 2012 2:53 PM
    Edited by: vmedi on Jan 3, 2012 2:53 PM

    Hi Micek,
    Thanks for your quick reaction.
    Yes you are right the ChosenValues will be replaced by presentation-variables in the final dashboard,
    I just am testing it with constant values in the Answers module.
    The problem seems to be that it is not allowed to use a sub-query in the filter expression.
    The Answers web application says there is a syntax problem near <select>, while I expect the SQL to be valid.
    I guess not all regular SQL is allowed in filter expressions.
    And since the report does not try to fetch data, no log of a generated, real SQL is written to the logfile.
    I need some alternative for the subquery, but one that is allowed in the filter expression.
    The problem is based on the fact that the user chooses a different value then the one that is filtered on.
    The timePeriods represent just one startDate, but I cannot use timePeriod itself to filter on.
    Because I need a between value, wich does not make sense for a timePeriod element
    such as '01-08' or 'JAN-08'.
    Several timePeriod notations are used, so using SubString and || to calculate a numeric value from the timePeriod varchar2 is not a good option.
    The error says:      
    Error getting drill information: SELECT "....
    State: HY000. Code: 10058. [NQODBC] [SQL_STATE: HY000] [nQSError: 10058] A general error has occurred. [nQSError: 27002] Near <SELECT>: Syntax error [nQSError: 26012] . (HY000)
    Any input is welcome
    kind regards

  • Problem in creating new implementation for filter dependent badi

    Hi Experts,
       I want to use badi NOTIF_EVENT_POST.It is a filter dependent badi. It is asking filter type while implementing thro se19. Could anyone pls tel me how to create new implementation for the filter dependent badi. Existing filter type is QMART. is there any problem if i change the filter type?
    Thanks in Advance!

    Hi ,
    NOTIF_EVENT_POST is filter dependent and filter values are based on QMART value in table TQ80. You need to specify the filter value ie : QMART value before implimentation , before that check all active implimentations for the same , if u have to impliment on same filter value , you need to deactivate the one which is implimented on same filter value .
    You are not supposed to change the filter type.
    Regards,
    Vamsi
    Edited by: CH. VAMSHI on Sep 29, 2009 11:58 AM

  • SQL Server 2012 Express LocalDB parm for keeping unicode char

    in developer's windows 8.1 pc, the SQL Server 2012 Express LocalDB does not seem to keep Unicode like \U2221. it get translated to the plain - instead of keeping as
    −.
    what  parameter od I need to setup to make sure it keep such character as is

    Hi fs - ab,
    You know that this forum is to discuss the VS IDE, to make this issue clearly, could you share us a screen shot for this issue? Where did you change your localDB with Unicode?
    I did some research about it.
    LocalDB supports two kinds of instances: Automatic instances and named instances.
    •Automatic instances of LocalDB are public. They are created and managed automatically for the user and can be used by any application. One automatic instance of LocalDB exists for every version of LocalDB installed
    on the user’s computer. Automatic instances of LocalDB provide seamless instance management. There is no need to create the instance; it just works. This allows for easy application installation and migration to a different computer. If the target machine
    has the specified version of LocalDB installed, the automatic instance of LocalDB for that version is available on the target machine as well. Automatic instances of LocalDB have a special pattern for the instance name that belongs to a reserved namespace.
    This prevents name conflicts with named instances of LocalDB. The name for the automatic instance is a single v character followed by the LocalDB release version number in the format xx.x. For example, v11.0 represents SQL Server 2012.
    •Named instances of LocalDB are private. They are owned by a single application that is responsible for creating and managing the instance. Named instances provide isolation from other instances and can improve performance
    by reducing resource contention with other database users. Named instances must be created explicitly by the user through the LocalDB management API or implicitly via the app.config file for a managed application (although managed application may also use
    the API, if desired). Each named instance of LocalDB has an associated LocalDB version that points to the respective set of LocalDB binaries. The instance name of a LocalDB is sysname data type and can have up to 128 characters. (This differs from regular
    named instances of SQL Server, which limits names to regular NetBIOS names of 16 ASCII chars.) The name of an instance of LocalDB can contain any Unicode characters that are legal within a filename. 
    A named instance that uses an automatic instance name becomes an automatic instance.
    Reference:
    http://technet.microsoft.com/en-us/library/hh510202(v=sql.110).aspx
    It seems that it is related to the SQL Server, am I right? If so, maybe the SQL Server forum would be better for this issue.
    If I have misunderstood this issue, please feel free to let me know.
    Best Regards,
    Jack
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • SQL Server 2012 Express LocalDB parm for keeping unicode char from TextBox

    Platform: developer's windows 8.1 pc with visual studio 2012 pro, .net 4.5, sql express 2012 express and localDB
    in a textbox, say textTbx on a  windows form, if there is Unicode like \U2221, I can have to save to file and read back without change using textTbx.Text value.
    however for the content in the textTbx.Text value, upon saving to
    SQL Server 2012 Express LocalDB, and then retrieved, the content gets changed for some Unicode like 
    U2221. it get translated to the plain - instead of keeping as
    −.
    what  parameter do I need to setup to make sure it keep such character as is?
    Btw: I had posted to visual studio general forum but was asked to post here

    Platform: developer's windows 8.1 pc with visual studio 2012 pro, .net 4.5, sql express 2012 express and localDB
    in a textbox, say textTbx on a  windows form, if there is Unicode like \U2221, I can have to save to file and read back without change using textTbx.Text value.
    however for the content in the textTbx.Text value, upon saving to
    SQL Server 2012 Express LocalDB, and then retrieved, the content gets changed for some Unicode like 
    U2221. it get translated to the plain - instead of keeping as
    −.
    what  parameter do I need to setup to make sure it keep such character as is?
    Btw: I had posted to visual studio general forum but was asked to post here
    Hello,
    In this case, we could convert the text value to varbinary type before storing them to sql, and we could convert it back to the encoded one, you could change UTF-8 to the one you are dealing with.
    You could refer to the suggestions shared by Filip Ekberg in the following thread.
    http://stackoverflow.com/questions/11859926/load-or-convert-varbinary-from-sql-to-textbox-text
    Here's an example on how you convert a text to bytes and then back again:
    var bytes = Encoding.UTF8.GetBytes("test");
    This will give you a byte array that looks like this:
    { 116, 101, 115, 116 }
    Now to get the text again, you can use Encoding.UTF8.GetString() like this:
    Encoding.UTF8.GetString(bytes);
    This means that you could simple do this when saving the value:
    cmdb.Parameters.AddWithValue("@text", Encoding.UTF8.GetBytes(textreview.Text));
    And then when loading it back you simply do this:
    textreview.Text = Encoding.GetString((byte[])dr["text"]);
    Regards.
    Carl
    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click
    HERE to participate the survey.

  • Microsoft SQL Server 2008 Express for SAP BusinessObjects Enterprise 4.0

    Hi Expert,
    I'm going to install SAP BusinessObjects Enterprise 4.0 on my virtualized system (vmware) composed as: windows server 2008 Enterprise Edition R2 + Tomcat. I have some doubts related to the DB version to choose.
    Due to the fact that Microsoft SQL Server 2008 Express is bundled with SAP BOE 4.0 I want to use this DB.
    However, I saw in the Microsoft Portal that Microsoft SQL Server 2008 Express (http://www.microsoft.com/sqlserver/en/us/product-info/compare.aspx)  that:
    Number of CPUs     1
    Maximum memory utilized     1 GB
    Maximum database size     10 GB
    These my doubts:
    1) Could these characteristics  generate performance issues for a production environment?
    2) Which is a typical DB size for a production enviroment? could be greater then 10 GB?
    3) Can I use Microsoft SQL Server 2008 Express  in a virtualized system (vmware)?
    Thanks in advance for collabortion
    regards
    gio'

    Hi Gio
    Remember that the BOE system database (or repository) only has a few tables in it, with really one main table that stores a reference to each folder, report, user, group, server, etc. on the system. So the table and the database itself do not grow very large. In the past year, we have done over 70 SAP BusinessObjects projects and I can't recall one where the database size would even approach 5GB in total, let alone 10GB.
    The reason for this is that the database only stores a reference to the physical objects and content within BOE-- the actual reports, universes, etc. are stored on the file system within the Input and Output file repository folders.
    And the memory constraints are not really an issue either with BOE-- the database itself does not come under much strain during the day-to-day operation of the server. If you believe that the memory may be an issue, you can always start with SQL Server 2008 Express and then using the new tools in the 4.0 CMC to monitor the memory usage on the server. If you need to, you can move the system database to another SQL Server edition, or alternately move the database to another one of the supported platforms, including Oracle, DB2, etc.
    Hope this helps!
    regards
    David

  • What is this error java.sql.SQLException: Bad format for number ?

    Dear All,
    I am reading few values from database. Then I get this error "MyError:Error : java.sql.SQLException: Bad format for number 'Sarawak' in column 6. " So what is this error referring to. I have checked the database column and its value fits according the data type. Any hints please?

    I have checked the database column and its value fits according the data type.Check again. Then check again. Keep checking until you find your error. You are trying to read a string containing "Sarawak" as a number. You have "getInt(6)" or other numeric type, and the 6th column in the select statement is not numeric.

  • Can't find ConfigurationFile.ini for SQL Server 2012 Express

    Hello,
    I installed SQL Server 2012 Express on my Windows 8.1 Pro laptop with an instance name of SqlExpress. However, when I try to find the ConfigurationFile.ini, I can't find it. I searched all the sub-folders under C:\Program Files\Microsoft SQL Server\110\Setup
    Bootstrap\Log\, but there is no such file. I need this file for future silent installation on many other computers. Can anybody help with this issue?
    Thanks,
    Jay

    For SQL Server Express edition you need to try with below parameters at the time of installation:
    UIMODE=Normal
    ACTION=Install
    For more information look at below link
    http://nickstips.wordpress.com/2010/08/16/sql-sql-server-2008-express-missing-configurationfile-ini/
    Please click "Propose As Answer"
    if a post solves your problem, or "Vote As Helpful" if a post has been useful to you

  • [svn] 2384: The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations , but we don't want to introduce this change in a Flex 3.0.x minor release.

    Revision: 2384
    Author: [email protected]
    Date: 2008-07-08 06:23:19 -0700 (Tue, 08 Jul 2008)
    Log Message:
    The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations, but we don't want to introduce this change in a Flex 3.0.x minor release. So I'm reverting this fix from the 3.0.x branch of ASC and checking in a new 1.4 downgraded asc.jar to reflect the change. This will be merged to other Flex 3 branches such as 3.0.3 and 3.1.0, but will not be merged to trunk.
    The change in behavior was noticed for Flex 3.0.x when a asc.jar was updated in revision 2108, and re-applied in revision 2129. Reverting this fix will resolve bug SDK-15924.
    QE: Yes
    Doc: No
    Checkintests: Pass
    Reviewer: Erik
    Bugs:
    SDK-15924 - Calling a .NET WebService always returns a fault (after build 2108)
    Other Bugs Referenced:
    ASC-3414 - with block uses local variable instead of object property when -warnings flag on
    Ticket Links:
    http://bugs.adobe.com/jira/browse/ASC-3414
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/ASC-3414
    Modified Paths:
    flex/sdk/branches/3.1.0/lib/asc.jar
    flex/sdk/branches/3.1.0/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java

    Yes but there's no point doing it here. As the Terms of Use make quite clear this is a User to User forum. It's Users like you talking to other Users. It's not a channel to communicate with Apple.
    Regards
    TD

  • [svn] 2383: The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations , but we don't want to introduce this change in a Flex 3.0.x minor release.

    Revision: 2383
    Author: [email protected]
    Date: 2008-07-08 06:22:40 -0700 (Tue, 08 Jul 2008)
    Log Message:
    The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations, but we don't want to introduce this change in a Flex 3.0.x minor release. So I'm reverting this fix from the 3.0.x branch of ASC and checking in a new 1.4 downgraded asc.jar to reflect the change. This will be merged to other Flex 3 branches such as 3.0.3 and 3.1.0, but will not be merged to trunk.
    The change in behavior was noticed for Flex 3.0.x when a asc.jar was updated in revision 2108, and re-applied in revision 2129. Reverting this fix will resolve bug SDK-15924.
    QE: Yes
    Doc: No
    Checkintests: Pass
    Reviewer: Erik
    Bugs:
    SDK-15924 - Calling a .NET WebService always returns a fault (after build 2108)
    Other Bugs Referenced:
    ASC-3414 - with block uses local variable instead of object property when -warnings flag on
    Ticket Links:
    http://bugs.adobe.com/jira/browse/ASC-3414
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/ASC-3414
    Modified Paths:
    flex/sdk/branches/3.0.3/lib/asc.jar
    flex/sdk/branches/3.0.3/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java

    Yes but there's no point doing it here. As the Terms of Use make quite clear this is a User to User forum. It's Users like you talking to other Users. It's not a channel to communicate with Apple.
    Regards
    TD

  • [svn] 2377: The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations , but we don't want to introduce this change in a Flex 3.0.x minor release.

    Revision: 2377
    Author: [email protected]
    Date: 2008-07-07 14:38:01 -0700 (Mon, 07 Jul 2008)
    Log Message:
    The ASC fix for ASC-3414 resulted in a correction of the behavior of E4X filter expression evaluations, but we don't want to introduce this change in a Flex 3.0.x minor release. So I'm reverting this fix from the 3.0.x branch of ASC and checking in a new 1.4 downgraded asc.jar to reflect the change. This will be merged to other Flex 3 branches such as 3.0.3 and 3.1.0, but will not be merged to trunk.
    The change in behavior was noticed for Flex 3.0.x when a asc.jar was updated in revision 2108, and re-applied in revision 2129. Reverting this fix will resolve bug SDK-15924.
    QE: Yes
    Doc: No
    Checkintests: Pass
    Reviewer: Erik
    Bugs:
    SDK-15924 - Calling a .NET WebService always returns a fault (after build 2108)
    Other Bugs Referenced:
    ASC-3414 - with block uses local variable instead of object property when -warnings flag on
    Ticket Links:
    http://bugs.adobe.com/jira/browse/ASC-3414
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/SDK-15924
    http://bugs.adobe.com/jira/browse/ASC-3414
    Modified Paths:
    flex/sdk/branches/3.0.x/lib/asc.jar
    flex/sdk/branches/3.0.x/modules/asc/src/java/macromedia/asc/embedding/LintEvaluator.java

    Yes but there's no point doing it here. As the Terms of Use make quite clear this is a User to User forum. It's Users like you talking to other Users. It's not a channel to communicate with Apple.
    Regards
    TD

  • Silent install parameters for Mgmt Studio (from SQL 2012 SP1 Express)

    Hi All,
    I'm looking to incorporate the installation of SQL Management studio ONLY from the SQL 2012 Sp1 Express bundle, into System Centre Configuration Manager. I need the silent installation options to install all features for it.
    File used - SQLManagementStudio_x64_ENU.exe
    From URL - http://www.microsoft.com/en-ca/download/details.aspx?id=35579
    I'm looking for something like this:
    "SQLManagementStudio_x64_ENU.exe /ACTION=INSTALL /QUIET /IAcceptSQLServerLicenseTerms="True"
    /FEATURES= etc.....
    Can anyone point me in the right direction? I just want to run the command and have it install SQL 2012
    Management Studio (this one is the full version) without having to run through the whole setup.exe process and it's silent installation..
    Thanks in advance

    Hello,
    First you need to extract the content of the .EXE file to a local folder, as shown below:
    SQLManagementStudio_x64_ENU.exe /x
    Then you can try to run the following command:
    "c:\folder_containing_installation_files\setup.exe" /ACTION=INSTALL /QUIET /FEATURES=SSMS /HIDECONSOLE
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • How do you allow SQL Server 2014 Express for remote connection and in firewall?

    I'm sorry if this was answered here before.
    I installed SQL Server 2014 Express and it is working perfectly. I want my server to be accessed through LAN. It is a named instance.
    I searched the internet and here's what i did:
    1. Through the SQL Configuration manager, I enabled all the Protocols of my Instance (TCP/IP, Named Pipes and Shared Memory). I changed in the IP Addresses the "IP ALL" TCP Dynamic Ports to 1434.
    2. In the Firewall I made an Inbound Rule to allow the Program (%ProgramFiles% (x86)\Microsoft SQL Server\MSSQL12.MyInstance\MSSQL\Binn\sqlservr.exe)
    3. I also made 2 Inbound Rules to allow (TCP/IP Port 1433) and (UDP Port 1434).
    4. Restarted my instance. SQL Server Browser and  SQL Server Reporting Services are also running.
    5. No Luck I cant still access the server using a different computer in the network.
    Please help.

    Hello,
    In Express Edition by default remote connections are disabled, you have to enable it first:
    Configure the remote access Server Configuration Option
    It's always a two way communication, so you have to create also outbound rules, not only inbound, and this on server as well as on client side; see
    Configure a Windows Firewall for Database Engine Access
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

Maybe you are looking for