UD Connect Generated SQL Statement

Hi All,
Can anyone tell me if it's possible to influence the generated SQL statement?  We need to be able to use the order by clause so as to get the records in the correct order.
Any help much appreciated.
Thanks
Craig

Hi
Yes its possible in THIS WAY.
CASE-1
In UD Connect we have the DATA in a BASE TABLE. When we execite the under like DATASOURCE  (UD-CONNECT). The dependant Info PACK brings the complete data to PSA. After the DATA LANDS in PSA. We can sort out in the same way how can SORT in the SQL Statement method. But to do this you have to PUT a Start routine at infopack level.
Case-2
You have to use a store procedure out side the SAP BI .

Similar Messages

  • How to examine the generated SQL statement in Receiver JDBC Adapter

    I have been searching this forum how to display te generated sql statement (by the jdbc receiver adapter).
    The only suggestion is to use RWB, but I was unable to find any details about how to do so.
    Any help is appreciated

    Hi,
    To add, u can see the SQL Statements in Audit log of RWB.
    Select Message Monitoring-> Adapter Engine. choose ur entry and click on Details option button, u can see the SQL Statements in Audit Log.
    Regards,
    Sudharshan
    Message was edited by:
            Sudharshan Aravamudan

  • Not able to View generated SQL statement

    Hi,
    In order to view the generated SQL statement in Receiver JDBC Adapter,
    i have done logSQLStatement as true in  CC still not able to view in RWB,
    also mesg protocol i m using in CC is "xml sql format", is it bcos of this i am not able to ?
    If yes, then how can i see that sql string?
    Regards,
    Pratibha

    Pratibha,
    In our JDBC scenario the message protocol is also set to XML SQL Format
    The Integration Process has a mapping step of type XSL that uses an Imported Archive to create the SQL select statement.  Then there is a synchronous Send step for the JDBC component
    Both this SQL statement and the returned SQL result are available in the XML message monitor SXMB_MONI
    Regards,
    Mike

  • Where to see generated SQL statement from jdbc adapter?

    Hi everybody,
    where can I see the generated SQL statement from JDBC adapter?
    Regards Mario

    Yes and True lterally means the same, but alas XI does not understand literature..
    Just checked the note as well, as you are correct!
    Regards
    Bhavesh

  • TopLink does not generate SQL statements for inserting new objects

    TopLink does not generate SQL statements for inserting new objects. Why?
    Thanks in advance...

    Please see the response in
    Why does not unitofwork.commit write data to the database?
    Regards,
    Chris

  • Generate SQL Statement

    HI, I am previously a MS Server user. I am so used to the GUI of the Enterprise Manager which could allow to generate table, make SQL statement with drap n drop of a mouse cursor. I wonder if oracle provides anything similar like the MS Server's enterprise manager?

    You can use Oracle Enterprise manager to do all the tasks related to database.
    Chandar

  • FDM-generated SQL statement in log file?

    Hello all, hopefully a simple question:
    When you perform an import using FDM, I know that behind the scenes a SQL SELECT statement is composed and executed against the database server. My question: is the actual SQL statement kept in a log somewhere (so that we can see it?) In our case it's an Oracle DB server and we're using the ERPI Adapter; not sure if that's relevant. We would like to grab that SQL statement and use it as a jumping-off point for some other things.
    Thanks in advance for anything you can offer.

    The SQL Statement is not written to the log for the adapter.  The only things that are logged are what show in the adapter log file if you enable loggin for the ERPi source adapter in the "Get Data" action.    

  • Generated SQL statement contains unnecessary cast

    I have a table containing a column of type decimal(10,0). Generated entity model maps this to a int32. When I perform a query on this field, for example
    test.Where(p => p.id = 10)
    the generated query contains the following
    where (Cast(id as number (19,0)) = 10)
    the prevents the server from using indexes on this column.
    How can i prevent this unnecessary cast?

    I follow your description but cannot reproduce the extra casting in the WHERE clause in the generated SQL.
    Are you using the lastest ODAC production version (11.2.0.3) ?
    When id column is defined as decimal(10, 0), it's indeed mapped to Int32 as you described.
    That's because decimal(10, 0) is actually number(10).
    10 is Int32 by default and ID column is already mapped to Int32. I don't see there is casting.
    The only way I can reproduce the extra casting is explicitly adding decimal casting to 10. For example,
    test.Where(p => p.id == (decimal) 10)
    Then I got the following:
    WHERE (10 = ( CAST( "Extent1"."ID" AS number(19,0))))
    But I don't think that's what you did.
    Would you please provide more details?

  • How to dynamically execute generated SQL statements using 11gR2 ?

    Hello,
    I'd like to know if it is possible to do what the following statement intended to do:
    select * from (select replace('select empno from emp',
                                 '') from dual);in other words, is it possible to dynamically generate and execute a select statement in a from clause ?
    thank you for your help,
    John
    Edited by: 440bx on Jul 16, 2010 3:57 PM changed "generate" to "generated" in subject

    Hello Aketi,
    That is totally WICKED !!
    I've been playing with the code you posted, pretty much since you did, trying to figure out how it works. I have some idea of how it works now but, I cannot figure out why I get the set of results, not once but TWICE.
    When I run the query you posted above, this is what I get:
    SQL> @getxml2
    TABLE_NAME                          count
    CLOB_EXAMPLE                            1
    D42                                     1
    DEPT                                    4
    DEPT_2                                  0
    DEPT_ACCIDENTS                          6
    DEPT_EAST                               2
    ... some tables deleted to shorten the output
    T1                                      1
    T10                                    10
    T100                                    0
    22 rows selected.
    TABLE_NAME                          count
    CLOB_EXAMPLE                            1
    D42                                     1
    DEPT                                    4
    DEPT_2                                  0
    DEPT_ACCIDENTS                          6
    DEPT_EAST                               2
    ... some tables deleted to shorten the output
    T1                                      1
    T10                                    10
    T100                                    0
    22 rows selected.
    SQL>The result is shown TWICE. I cannot figure out why. Any ideas as to why the result is shown twice ? (I ran the statement from SQL*Plus and started a fresh instance of SQL*Plus to ensure that no settings from previous scripts would be the cause).
    Thank you for your help, great little piece of code!
    John.
    Edited by: 440bx on Jul 16, 2010 5:30 PM
    Edited by: 440bx on Jul 16, 2010 5:31 PM - corrected name in Hello greeting
    Edited by: 440bx - 11gR2 on Jul 17, 2010 2:55 AM - corrected misspelling
    Edited by: 440bx - 11gR2 on Jul 17, 2010 2:56 AM - corrected another misspelling

  • Connection Failed SQL State: 'HYT00' SQL Server Error: 0 [Microsoft] [ODBC SQL Server Driver] Login Timeout expired

    I backed up  my database   on old Notebook    SQLSTRINGCONNECT worked all day  for any database in SQL SERVR I created
    have brand new computer  Notebook
    installed SQL SERVER 2008 THE EXACT SAME WAY
    I RESTORED THE DATABASE
    However, I cannot connect to it via Visual  FoxPro 9.0  with   SQLSTRINGCONNECT
    or even Windows 7    ODBC Data Source ADministrator

    Hi,
    We need more information as Olaf asked, but my first guess is that you have permissions problem since the users are not the same users in different machines (local users, or SQL Server users),
    even if they have the same name :-)
    [Personal Site] [Blog] [Facebook]

  • Sql statement generator for java.

    Is there a (api's ) tool which generates sql statements given a database table, which can be embeeded into the application.

    Dear Anand,
    Try this one:
    CASE balance WHEN 0 THEN 'Completed' ELSE CASE WHEN DATEDIFF(DD, EndDate, GetDate()) >= 0 THEN 'Progress' ELSE 'Pending' END END
    I have assumed you don't have negative balance.  It that is not true, give me the complete case.
    Thanks,
    Gordon
    Thanks,
    Gordon

  • Toplink generate the SQL statement correctly but it does not return any row

    Hi
    I faced an strange problem when using Toplink as JPA provider. Following snippet shows how I create and execute a query using Toplink JPA:
    q = em.createQuery("SELECT B FROM Branch B WHERE B.street LIKE :street");
    q.setParameter("street", "'%a%'");
       List<Branch> l = q.getResultList();
      System.out.println("List Size: " + l.size());The SQL statement resulted by this query is as follow (according to the generated log file)
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST (? AS VARCHAR(32672) ))
      bind => [%a%]Problem is that List size is always 0, independent of what I provide as parameter. I tried and executed the generated SQL statement in the SQL manager and I got some tens of record as the result. The SQL statement i tested in the SQL manager is like:
    SELECT ID, STREET FROM BRANCH WHERE (STREET LIKE CAST ('%a%' AS VARCHAR(32672) ))Can someone please let me know what I am missing and how I can fix this problem?
    Thanks.

    Hi,
    Thank you for reply.
    All data are stored in lower case so, the case sensitivity is not a problem. I am wondering how the generated query works fine when I execute it in the sql manager but it return no result when it is executed by the JPA.
    Thanks for looking into my problem.

  • Windows 7 clients suddenly unable to connect to SQL database

    Our environment in a nutshell:
    Server1: Small Business Server 2003 R2 (Active Directory domain, it is the sole domain controller [DC])
    Server2: Dedicated to SQL Server 2005 and the SAP Business One database
    Server3: Windows Server 2003 R2 Standard Terminal Server. This provides user sessions that are the equivalent of Windows XP SP3.
    Two Windows 7 workstations: 1x 64-bit, 1x 32-bit. Both are domain joined.
    All above computers on a gigabit LAN.
    Client product is SAP Business One 2007 A (8.00.181) SP:00 PL:49
    SQL Native Client is 9.00.5000.00
    SQL Server is mixed-mode authentication, however all users use trusted Windows connections. All users with access to the product are members of an "SAP Users" domain security group.
    Normal operation is:
    Local Win7 workstations have client installed and connect over the LAN to the SQL Server instance on Server2
    Remote users log on to the Server3 Terminal Server, fire up sessions and connect to the SQL Server instance
    Up to and including Thursday, March 12 everything was working fine for all users. As of Friday, March 13 the Terminal Server users/sessions are still working perfectly but the Windows 7 workstations can no longer connect to the SQL Server instance with trusted connections. They are still able to connect if they switch to a SQL Server logon and use the "sa" user account and its password.
    Also, the users normally using the Win7 workstations can log on to the Terminal Server with their usual domain accounts, and run SAP from there, which works perfectly.
    The error the Windows 7 users are seeing:
    Connection failed:
    SQL State: 28000
    SQL Server Error: 18452
    [Microsoft][SQL Native Client][SQL Server]Login failed for user ". The user is not associated with a trusted SQL Server connection.
    Prior to each logon attempt above, the Server2 SQL Server machine logs another event to its Application Event Log:
    SSPI handshake failed with error code 0x8009030c while establishing a connection with integrated security; the connection has been closed. [CLIENT: xx.xx.xx.xx]
    Source: SQL Server instance, event 17806. From SQL Server log, Severity 20, State 2
    What I've tried so far:
    All servers have been restarted in correct order
    Running the client in Windows XP SP3 compatibility mode. No difference
    Running the client as Administrator. No difference
    Upgrading to SQL Server Native Client 11.0 via:
    Uninstall B1 client
    Uninstall v9.00 Native Client
    Install v11.00 Native Client
    Install B1 client
    Net effect is no difference
    Googling the event IDs that are being logged seems to point to:
    Expired domain account. Manually checked that the 2 users accounts are not expired and they belong to the "SAP Users" group. Furthermore, the domain accounts are still working when used in Terminal Server sessions.
    Problem with Service Primary Names (SPNs). This seems to be Active Directory-related. Again, the domain accounts normally used on the Win7 workstations work fine on the Terminal Server so I'm inclined to think AD is OK
    Other information that may be useful:
    No Windows updates applied between March 12 and 13 on either Win7 workstation
    Both Win7 workstations running Microsoft Security Essentials and the native Windows 7 firewall
    All servers running Trend Worry Free Business Security suite
    Sorry about the length of the post but hopefully it will reduce wild goose chases. Any troubleshooting ideas greatly appreciated.

    Problem found!
    It turns out it was some sort of subtle problem with Trend antivirus running on the servers.
    On all 3 servers there are 3 main protection components that are enabled by default:
    Antivirus/Anti-spyware
    Web Reputation
    URL Filtering
    What I did was to turn off all 3 components for all the servers. With Trend this can be done from the central management console. SAP then worked on one of the Win7 clients using Trusted Connection (i.e. Windows Authentication).
    Then I turned the Trend components back on, on all servers, one at a time (to try to find which component was the culprit). Here’s the funny part: I turned all 3 back on, and SAP still works on the Win7 client using Windows Authentication! I even restarted it to make sure that state of affairs persists across a restart, and it’s still OK.
    It's worth noting the problem was not solved shortly after it appeared by restarting all 3 servers. There was even a scheduled installation of Windows updates a couple of hours ago, which restarted all 3 servers again, and the problem still persisted. It was not fixed until the Trend components were globally disabled (on all 3 servers), then re-enabled.
    Trend WBFS is version 9.0, pre SP1.

  • Generated SQL does not have fully qualified columnnames

    Hi,
    I'm trying to run a JDO query which results in:
    [code=-5001, state=42703]
    java.sql.SQLException: [SQL5001] Column qualifier or table CUSTOMER
    undefined.
    The model is basically like this:
    Class Order has a 1-1 relation with Class CustomerRole which in turn has a
    n-1 relation with Class Customer
    Class Order and CustomerRole are both mapped to table SCHEMA1.ORDER (the
    ORDER table contains the FK to the CUSTOMER table)
    Class Customer is mapped to table SCHEMA2.CUSTOMER
    I perform a query using an Extend of class Order.
    I add the following filter to the query:
    "this.CustomerRole.Customer != null"
    (CustomerRole is the name of the relation between Order and CustomerRole,
    while Customer is the name of the relation between CustomerRole and
    Customer)
    When I execute this query, I get the following message:
    kodo.util.DataStoreException: [SQL5001] Column qualifier or table CUSTOMER
    undefined. {SELECT t0.ID, t2.CUSTID, t3.ADDRESS, t4.COUNTRY,
    t4.COUNTRYNAME, t2.NAME FROM SCHEMA1.ORDER t0 INNER JOIN SCHEMA1.ORDER t1
    ON t0.ID = t1.ID LEFT OUTER JOIN SCHEMA2.CUSTOMER t2 ON t1.CUSTID =
    t2.CUSTID LEFT OUTER JOIN SCHEMA2.CUSTOMER t3 ON t2.CUSTID = t3.CUSTID
    LEFT OUTER JOIN SCHEMA1.COUNTRY t4 ON t3.COUNTRY = t4.COUNTRY WHERE (0 <
    (SELECT COUNT(*) FROM SCHEMA2.CUSTOMER WHERE CUSTOMER.CUSTID =
    t1.CUSTID))} [code=-5001, state=42703]
    NestedThrowables:
    com.solarmetric.jdbc.ReportingSQLException: [SQL5001] Column qualifier or
    table CUSTOMER undefined. {SELECT t0.ID, t2.CUSTID, t3.ADDRESS,
    t4.COUNTRY, t4.COUNTRYNAME, t2.NAME FROM SCHEMA1.ORDER t0 INNER JOIN
    SCHEMA1.ORDER t1 ON t0.ID = t1.ID LEFT OUTER JOIN SCHEMA2.CUSTOMER t2 ON
    t1.CUSTID = t2.CUSTID LEFT OUTER JOIN SCHEMA2.CUSTOMER t3 ON t2.CUSTID =
    t3.CUSTID LEFT OUTER JOIN SCHEMA1.COUNTRY t4 ON t3.COUNTRY = t4.COUNTRY
    WHERE (0 < (SELECT COUNT(*) FROM SCHEMA2.CUSTOMER WHERE CUSTOMER.CUSTID =
    t1.CUSTID))} [code=-5001, state=42703]
    java.sql.SQLException: [SQL5001] Column qualifier or table CUSTOMER
    undefined.
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:63)
         at kodo.jdbc.sql.SQLExceptions.getDataStore(SQLExceptions.java:51)
         at
    kodo.jdbc.runtime.AbstractSelectResultObjectProvider.handleCheckedException(AbstractSelectResultObjectProvider.java:150)
         at com.solarmetric.rop.WindowResultList.<init>(WindowResultList.java:57)
         at
    kodo.jdbc.runtime.JDBCFetchConfigurationImpl.newResultList(JDBCFetchConfigurationImpl.java:135)
         at
    kodo.runtime.CopyOnWriteFetchConfiguration.newResultList(CopyOnWriteFetchConfiguration.java:159)
         at kodo.query.AbstractQuery.executeWithMap(AbstractQuery.java:750)
         at kodo.query.AbstractQuery.execute(AbstractQuery.java:633)
         at TestApp.<init>(TestApp.java:67)
         at TestApp.main(TestApp.java:135)
    The problem is the last part of the query where it selects from
    SCHEMA2.CUSTOMER while the Where part refers to just CUSTOMER (without
    schema qualifier).
    Are there any ideas to solve this? Is there a way to force columnnames
    always being fully qualified in generated SQL statements?
    Thanks,
    Regards,
    Alexander

    Unfortunately, this is a bug that has to be fixed on our end. We'll
    make sure a fix is in the next 3.1 release. Thanks for the report!

  • Maximum SQL statement on ODBC 8176 or higher ?

    Hello.
    I am developing a DB reporting program using ODBC.
    My customer complained that the program shut down when query the SQL statement.
    But, my computer didn't shut down when I queried the same SQL statement.
    The difference is my customer used 8177 ODBC driver, but my computer installed 8176 driver, so I changed ODBC driver 8176 to 8177 and the problem appeared too.
    I debugged and I found that the program shut down at SQLPrepare API.
    The size of the SQL statement is 8238 bytes.
    I tested and I found that the program shut down when the SQL statement size was around 5900bytes or larger.
    I think, this is the Oracle ODBC drivers bug, does anybody meet the same problem?
    I noticed to my customer this situation and he tried to downgrade ODBC driver 8177 to 8176 but he failed.
    How can I solve this problem? I tried that the same SQL statement with OCI but it was no problem.

    I've never encountered a situation where the ODBC driver improperly handled a statement that the Oracle database could, and I've seen cases where the ODBC driver was given statements longer than Oracle's maximum.
    My recollection is that Oracle itself doesn't support SQL statements longer than 8k (though I think it depends on the version of the database-- it may have been 4k in the past). If you want to generate SQL statements this long (and I'm not sure you do-- perhaps there are views, etc that you need to create to simplify your queries) you really ought to by using the DBMS_SQL package. You populate a table with 256 byte chunks of data and then call this package, so you can have infinitely long SQL statements.
    Justin

Maybe you are looking for

  • Configure WiFi network and deploy via e-mail

    Hi, I'm running into problems when I configure a WPA2 WiFi network with iPhone Configuration Utility v3.3 and send the profile to an iPad with iOS 4.3.5 via e-mail. If I try to use the internet over WiFi after that, it always asks me for the WPA2 pas

  • Sign in Error

    When I try signing in Adobe Forms Central software I get an error that reads: A connection with the FormsCentral server could not be established. Please make sure you are connected to the internet and try again. Note:  You might otherwise be connecte

  • Installing more than 5 devices...

    How do you enable more than 4 devices on the MSI-6580? e.g I have 2 cd-rom drives and two hard disks. How do i install a new hard disk?

  • Adobe Illustrator, Photoshop, InDesign redemandent le code d'activation.

    Bonjour, nous avons installé Adobe Illustrator, Photoshop, InDesign, et ils redemandent le code d'activation. Pouvez-vous m'aider ? Do you prefer we speak English ?

  • Handeling Null value using Essabse cube.

    Hi Gurus, I am new to OBIEE with Essabse cube. I have imported the cube and develop the report. I have flatened the measure. Everything is working fine. When i had a report request to have the Organisation and the Period Hierarchy along with the Meas