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.
Similar Messages
-
Hello, the 'Save As' dialog box used to allow the backspace button to go up one level in the directory when the focus is in the folder contents box but it does not work any more, please help. BTW the same 'Save As' dialog in other applications still allow the backspace button to go up one level in the directory.
cor-el,
I kept forgetting and procrastinating about following your instructions, since I have internet access only for limited amounts of time and usually I am busy with important tasks when I am.
Out of the blue, the problem corrected itself (the Save As box started to open full screen, then shrunk down to a normal size and the edges can now be dragged to a custom size).
Even the copy and paste problem in the filenaming area seems to have been less troublesome lately even though there have been no updates to Firefox in a few weeks.
Even though I marked the solution as not helpful, the problem has in fact been resolved. I will save the solution instructions in case the issue returns. -
Error when generating the SQL statement while running the Query
Hello SDN Mates,
Am using three cubes in one infoset and build a query on that. Intially it was running fine, but now am getting error generating the SQL statement. Can you please throw some light on this. Your idea would be highly appreciated.
Thanks and Regards
Arun SHi Arun
is there any change in the objects (Check also the consistency of infoobject ) included in infoset, just make sure those are active, open the query in designer and check if no error/warning message are present
Thanks
Tripple k -
SSIS The parameterized sql statement yields metadata which does not match the main SQL statement
Hi all,
I'm getting the above error when trying to execute a custom lookup. What I'm trying to do is lookup the minimum promotional price between date ranges. The SQL executes fine in SSMS
SELECT refTable.PRICE
FROM ( SELECT MIN(PRICE) AS PRICE ,
NAME ,
ITEMRELATION ,
FROMDATE ,
TODATE
FROM [dbo].[AllCustPrices]
GROUP BY NAME ,
ITEMRELATION ,
FROMDATE ,
TODATE
) [refTable]
WHERE [refTable].[NAME] = ?
AND [refTable].[ITEMRELATION] = ?
AND ? BETWEEN [refTable].[FROMDATE]
AND [refTable].[TODATE]
but errors in SSIS?Apologies, totally forgot i posted a question on here. I still haven't resolved this. full error text is TITLE: Package Validation Error
Package Validation Error
ADDITIONAL INFORMATION:
Error at Data Flow Task [Lookup MIN Price [440]]: The parameterized SQL statement yields metadata which does not match the main SQL statement.
Error at Data Flow Task [SSIS.Pipeline]: "Lookup MIN Price" failed validation and returned validation status "VS_ISBROKEN".
Error at Data Flow Task [SSIS.Pipeline]: One or more component failed validation.
Error at Data Flow Task: There were errors during task validation.
(Microsoft.DataTransformationServices.VsIntegration)
BUTTONS:
OK
If I take off the MIN function and just put * SSIS is quite happy, it does not like MIN for some reason?
I'm really stumped with this... checked metadata for third parameter which is W/C Date DT_DBTIMESTAMP which is same as FROMDATE, TODATE where i'm using BETWEEN... -
i have just dowloaded the icloud control panel on my PC and i am am able to see everything that has been pushed to icloud from my ipad. However i cannot see my email. i can send from the computer using icloud, but i do not see any mail that is being received by my ipad, which is set up with my mail server. What haven't i checked lol?
turn your ipad off by holding the sleep wake button for 5 seconds and slide to turn off then turn it back on and the apps should be finished and if the apps didnt finish just redownload them
-
PLEASE HELP!! My mom is gonna kill me.. Tried recovering(restoring) with other pc's aswell but itunes does not show any message or any error (nothing)...Only the windows gives the message (Unknown Device) error 43.
Jailbreaking may or may not be legal, but either way it voids your warranty and cannot be discussed in an Apple hosted forum. When you jailbreak a phone you are giving up all Apple support. You are on your own, and will have to use non-Apple resources to resolve the problem.
-
when I connect my iPhone, iPhoto opens and the phone begins charging but iTunes does not recognize it and I cannot sync. Any advice?
Howdy AndieKanaras,
It sounds like your iPhone is being recognized everywhere but in iTunes. I would use the troubleshooting for that issue in the following article, named:
If you don't see your connected device in iTunes for Mac
Thank you for using Apple Support Communities.
All the very best,
Sterling -
internet Download Manager cannot integration with firefox4 its Look in the menus it works but it does not actually work
IDM may need to be updated to work with Firefox 4.0. You could contact them and make them aware of the problems you are having with their program.
-
I cannot open itunes. Everytime i try it says "The itunes application could not be opened.The folder cannot be found." I have tried the shift key option but this does not work. Please help.!!
Try the actions here for that driver.
iOS: Device not recognized in iTunes for Windows
I would first do this:
Removing and reinstalling iTunes, QuickTime, and other software components for Windows Vista or Windows 7 -
Hello! I cannot download applications, when I try to do it the application says "waiting" but it does not continue downloading! Can someone help me????
Download only one application at a time.
Click all downloading applications until they all say "Paused". Then click one at a time, let it complete downloading, then click the next and repeat. -
Hi i am have had a lot of trouble emptying my trash. when i go to put something in there it asks from my password and the item goes off the screen, but this does not clear any space on the hard drive.
1. Triple-click the line below to select it:
~/.Trash
2. Right-click or control-click the highlighted line and select
Services ▹ Show Info
from the contextual menu. An Info dialog should open.
3. The dialog should show "You can read and write" in the Sharing & Permissions section. If that's not what it shows, click the padlock icon in the lower right corner of the window and enter your password when prompted. Use the plus- and minus-sign buttons to give yourself Read & Write access and "everyone" No Access. Delete any other entries in the access list.
4. In the General section, uncheck the box marked Locked if it's checked.
5. From the action menu (gear icon) at the bottom of the dialog, select Apply to enclosed items and confirm.
6. Close the Info window and test. -
I have iPhone 6, 8.3. I cannot use bluetooth at all from my device, even to connect my macbook pro. I did all the recommended trouble shooting such as reboot and reset network settings. but it does not recognise any bluetooth device. Pls help.Thank you.
See iPhone BT profile on what can be connected/paired:
iOS: Supported Bluetooth profiles - Apple Support
And BT troubleshooting:
iOS: Troubleshooting Bluetooth connections - Apple Support -
I cannot install the trial for Acrobat XI Pro. The file downloaded fine, but it does not open. What can I do?
For Windows:
http://trials2.adobe.com/AdobeProducts/APRO/11/win32/AcrobatPro_11_Web_WWMUI.exe
For MAC:
http://trials2.adobe.com/AdobeProducts/APRO/11/osx10/AcrobatPro_11_Web_WWMUI.dmg
ACROBAT XI -
I forgot to answer the secret question camels Store account and you follow the steps in the site account settings but I have not got any mail explains what are the steps involved
Call your contry's number from http://support.apple.com/kb/HE57 and ask to speak with Account Security.
-
I'm trying to extend the range of an Airport Extreme 802.11g by adding an Airport Express 802.11n. I set the Express up to join the existing network, but it does not make any difference in the range of the network. What's wrong?
Let me see if I can help you with the basic WDS configuration steps:
Note: To help facilitate the setup, temporarily connect the AXn directly to the AEBS LAN port using an Ethernet cable. Once the setup is complete, you can move the AXn to the desired location. For all configuration steps you will be using the AirPort Utility. Before starting, be sure to jot down the AppleIDs for both base stations.
802.11g AirPort Extreme Base Station (AEBS) Configuration
AirPort Utility > Select the AEBS > Manual Setup > Wireless tab
Wireless Mode: Participate in a WDS network
Manual Setup > WDS tab
WDS Mode: WDS main
Allow wireless clients (checked)
WDS Remotes: <enter the AppleID for the AXn here>
Click on Update and allow the base station to restart.
802.11n AirPort Express Base Station (AXn) Configuration
AirPort Utility > Select the AXn > Manual Setup > Wireless tab
Wireless Mode: Participate in a WDS network (Note: You may have to hold down the Option (Mac) or Control (PC) key to see this option in the list.)
Manual Setup > WDS tab
WDS Mode: WDS remote
Allow wireless clients (checked)
WDS Main: <enter the AppleID for the AEBS here>
Click on Update and allow the base station to restart.
Maybe you are looking for
-
Error message when opening a .cp file (version issue?)
I am using Captivate 4.0 and exporting to a .swf file. My project partner is using Captivate 3.0 I sent her my Captivate file to use as a template for our project and when she tries to open it, she gets an error message: Adobe Captivate could not ope
-
How to relocate table in new tablespace in Oracle 8i
Hi all I would like to know how to relocate table from one tablespace to another tablespace in Oracle 8i. Currently, I create new table without data in new tablespace and then load data from old table in old tablespace. However, I think it is not eff
-
Hello, I am having an issue starting up a 640 R/3 instance. The problem is that I am seeing no errors in the log file. The last entry is Starting Programs but the message server and dispatcher do not get launched (a symbolic link does get created but
-
Accordion widget in document template
I'm trying to design my site using an accordion widget for my left-side navigation bar: each tab is a product category and when you click it, it shows all the subcategories. When I was working on just the index page, the accordion worked fine every t
-
Help!! My Safari can't launch
I just bought a iPad yesterday and tried to launch the safari today but it just won't launch even after i have restarted a few times. My firmware is 4.2.1