Why can't I find any matches ?

My first query select PONumber and itemNO from table1 based
on the document number entered in the form.
<cfquery name="qryName1" datasource="dbName">
select
PONumber,
rtrim(itemNo) as itemNo
from table1
where documentNo = '#form.documentNumber#'
</cfquery>
I then take the two fields retrived and match it against this
table, to get the pGR and netPrice.
<cfquery name="qryName2" datasource="dbName">
select pGr, netPrice
from OpenPO
where
(purchDoc = '#qryName1.PONumber#' and Item =
'#TRIM(qryName1.itemNo)#')
</cfquery>
What is happending is that the PONumber matches but the
itemNo does not match. That is why I rtrim in the sql in the first
query and trim in the where clause in this query but it still does
not find a match. Both items are defiend as nvarchar 5 in the sql
tables. I even used cfoutput to show the len and it is 5, so there
are no blank spaces, yet it still will not find a match, and I know
there are matches.
Any anybody tell me what is wrong and/or what to look for
?

NYG,
Can you pull out the raw data from the OpenPO table on the
Item col for the record you want? Perhaps by altering query2:
<cfquery name="qryName2" datasource="dbName">
select pGr, netPrice, Item
from OpenPO
where purchDoc = '#qryName1.PONumber#'
</cfquery>
I realize this might bring back several records but it could
be helpful to see what the DB has versus what you're comparing.
In addition, what happens if you adjust the query2 where
clause to use a like for the itemNo)?
where (purchDoc = '#qryName1.PONumber#' and Item like
'%#TRIM(qryName1.itemNo)#')
Also, more out of curiosity, does anything change if you
alter query1 to change the name of the alias for ItemNo:
<cfquery name="qryName1" datasource="dbName">
select
PONumber,
rtrim(itemNo) as itemNum
from table1
where documentNo = '#form.documentNumber#'
</cfquery>
More curious than anything on that last one!

Similar Messages

  • WHAT is "Hibernate this Group" and why can't I find ANY information on this and HOW to get accidentally hibernated groups BACK???

    This is REALLY getting me frustrated! What is "Hibernate this Group"? Why can't I find any information on it? Why can't I get groups back that have been accidentally "hibernated"? There is a "moon" symbol on my upper right screen that says "Hibernate this Group" and I don't know what it does or how it works! AND I accidentally "hibernated" a group when I clicked on it too long and a bunch of "zzz's" showed up and then it was GONE! How do I get it all back? And why isn't there a tech center I can contact to help with this???

    This sounds like some third-party app or extension, because this functionality is not in Firefox by default. [[Reset Firefox – easily fix most problems]] should remove it

  • Why can't I find any games in the Store for Ipod Classic?

    Why can't I find any games in the Store for the Ipod Classic?

    Hard to say, as you provide almost no information..  I would guess that you are looking in the wrong place.

  • Why can`t I find any wifi on my windows7 but it works just fine on my Macbook Pro??

    I`ve used Bootcamp and successfully downlaoded the windows7 but I can`t find any wifi. Why is that?

    Did you also download and install the Windows Support Software?

  • Why can't I find any of the Star Wars movies in the iTunes Store?

    I can't find any of the movies.

    Apple can only sell what the content providers grant them licenses to sell - if the film studios haven't granted Apple a license to sell those films in your country then Apple can't sell them there

  • Why can't iTunes find any of my music

    Hi
    The photo above is only the start of my current issues.
    Bascially after moving my music from my Macbook HD to a seperate Wifi HD in my house iTunes can not "locate" my music. That is kind of a seperate issue, as I know how to put music back on to my computer from the Wifi HD. THe reason I moved it was that I was consuming 90% of my 320G memory.
    Now I am getting this iCloud error message on almost every single iTunes song I have bought. That is thousands and thousands of pounds of music cant be played.
    This iCloud problem is also effecting iMatch to my iPhone and iPad as well...!!!
    Anyone have any ideas whats going on ????
    Please help
    Gareth

    HI THanks for this helpful post. I will try this. I have 2 iPods. One is 3rd Gen. I love the little small square, so I bought it on ebay. Then I got a little iPod nano ( again a tiny square shape)
    So I tried to sync them today and update them.
    This is the response I got.
      I get a message that the original file cannot be found and asks if I want to try and locate file.  I locate the file and it's empty?!
    This freaked me out because I have all this music I love. The only thumb drive is my back up drive which is not a thumb. Will the back up drive have my music files too?
    Thanks-Peace Out

  • HT6119 I live in Australia and I want to buy books written in Spanish. Why can't I find any at the iBook store?

    Is it a way to buy books in other languages?

    You can only buy the books that are available in your country's ibookstore. If there are particular ibooks that you would like to buy in Spanish then you can try requesting that they be added, but unless the publisher/rights-holder for Australia agrees to it then Apple won't be able to sell them there : http://www.apple.com/feedback/itunes.html

  • TS4079 why can't Siri find any places in Canada??

    Has anyone had problems with not being able to find places or maps in Canada using Siri?

    Siri is a beta product. Currently, location based services are only available in the U.S.

  • Why can't Firefox find the simplest sites and sites that I frequent?

    Why can't Firefox find ANY of the servers for the sites I frequent the most?
    Were you bought out by Google Chrome? This is beyond frustrating and ******* off your customers even if you are a free service is probably not a good business model.
    ''Edited by a moderator due to language. See the [http://support.mozilla.com/kb/Forum+and+chat+rules+and+guidelines Rules & Guidelines] .''

    http://kb.mozillazine.org/Error_loading_websites#IPv6
    To disable IPv6, change the preference network.dns.disableIPv6 from "false" to true . Here are the steps:
    Type '''about:config''' in the address bar, press Enter.
    Find network.dns.disableIPv6 in the list.
    Right-click -> Toggle.
    Restart your Mozilla application and try again.

  • In Dreamweaver CC why can i not get any workspace options? Where do I find 'Draw AP div'?

    In Dreamweaver CC why can i not get any workspace options? Where do I find 'Draw AP div' or any of my 'designer' tools?

    Insertion of APDivs/Layers are deprecated in CC. Historically, APDivs caused many, many problems for people who didn't understand they were not intended to be used as a primary layout tool.  Look at FluidGrid Layouts.
    http://blogs.adobe.com/dreamweaver/
    Nancy O.

  • Why firefox4 stops typing in FIND when it finds any matching word of that incomplete word ?

    In previous Firefox version 3.x, whenever I search through 'Find', it used to allow me to type the whole word in Find, to search on the page but in Firefox 4, it instantly stop allowing to type, once it finds any matching word on the incomplete word typed in the find.

    Hey srjna,
    Re-indexing Spotlight may help in getting Finder to locate the files that it's not currently displaying when searching.
    Spotlight: How to re-index folders or volumes
    https://support.apple.com/en-us/HT201716
    Regards,
    Allen

  • Why can I not download any apps to my Itouch Gen 2?

    Why can I not download any apps to my Itouch Gen 2?
    SO, I just purchased 2 4th gen ITouch’s and a 2nd gen Ipad for my kids. All is well and fine however my second gen device is toast so I am using one of my kids older 2 gen ITouch. My kids had been complaining that they could not download anything on the 2nd gen devices but I figured they were doing something wrong, my bad. The device has Netflix that works just fine but I am finding that if I were to delete the app and did not have it backed up I would not be able to get it back from the appstore. The device has been taken care of and is in good working order,  but I am finding that Apple has chosen to no longer support IOS4.2.1 which I get. However I would expect that at a minimum I would be able to download any app that was available for the 4.2.1 os at the time the next version was released.
    Drive space it cheap and ****** off customers are expensive.
    Apparently Apple has planned obsolescence built into their business plan which I am finding pretty hard to swallow.
    I just purchased over a grand worth of new devices and I am wondering if that was wise since apparently apple will deem them obsolete in a couple of years. That great because the newer devises are great, however I have a devise that there is nothing wrong with and apple has made the choice to no longer support the devise and not allow applicable software downloads making the devise basically useless. This is not supporting your customers!
    I would hope that Apple changes their posture on this planned Obsolescence and backs its products durability with the ability to get applicable apps for the actual lifetime of the devise and not some 2 year window.
    I brought my concerns to the nearest apple store where they gave me some song and dance about how the older devise was not fast enough. This is probably true for the newer apps but I think if this was a limitation then ITunes should make the newest version of the app at the time of the app is available for the devise.
    Like I said drive space is cheap and this is like a row in some database.
    I am wondering if I will continue to buy apple products.

    If it really is only your email, that is not valid, reset your primary email address at  https://appleid.apple.com/cgi-bin/WebObjects/MyAppleId.woa/
    If that does not work, because of a forgotten password or security questions, or because your account has been disabled for security purposes, you need to give Apple Support a call - only they will be able to help you. See this webpage on how to contact Apple Support in your country: There are either telephone numbers given or an email form:
         Apple ID: Contacting Apple for help with Apple ID account security
    Explain, that you need help with an account security problem.
    You can also try to email the iTunes Support using this form:    https://ssl.apple.com/emea/support/itunes/contact.html

  • Why can I not see any of my music purchases, I have not changed my ID or account details

    Why can I not see any of my music purchases, I have not changed my ID or account details?

    Hi,
    Please enable Speakers in Playback devices as follows:
    1. Right click speaker icon (right hand corner)
    2. Select Playback devices
    3. Right click Speakers
    4. Enable it and set as Default
    5. Click Apply/Ok
    Regards.
    BH
    **Click the KUDOS thumb up on the left to say 'Thanks'**
    Make it easier for other people to find solutions by marking a Reply 'Accept as Solution' if it solves your problem.

  • Why can I only find Bob Seger tribute or cover bands?

    Why can I only find Bob Seger tribute or cover bands, and not even be able to locate any of his original music on movie sountracks??

    I would guess that it is because whomever owns the distribution rights to the music does not allow itunes to sell it.
    Itunes can only sell what the owners of the rights will allow them to sell.

  • I have an eMac. 1.25 GHz Power PC G4. OS 10.5.8.  Why can't I find a Flash Plugin that will run my videos on Facebook etc?

    I have an eMac. 1.25 GHz Power PC G4. OS 10.5.8.
    Why can’t I find a Flash Plugin that will run my videos on Facebook etc?

    You can check here:  http://www.adobe.com/products/flash/about/  to see which version you should install for your Mac and OS. Note that version 10,1,102,64 is the last version available to PPC Mac users*. The latest version, 10.2.152.25, 10.3.x beta, or later, is for Intel Macs only, as Adobe no longer support the PPC platform. Version 11.0.1.152 is for Lion.
    * Unhelpfully, if you want the last version for PPC Macs, you need to go here:  http://kb2.adobe.com/cps/142/tn_14266.html  and scroll down to 'Archived Versions/Older Archives'. Flash Player 10.1.102.64 is the one you download. More information here:  http://kb2.adobe.com/cps/838/cpsid_83808.html
    You should first uninstall any previous version of Flash Player, using the uninstaller from here (make sure you use the correct one!):
    http://kb2.adobe.com/cps/909/cpsid_90906.html
    and also that you follow the instructions closely, such as closing ALL applications first before installing. You must also carry out a permission repair after installing anything from Adobe.
    (If you are running a PPC Mac with Flash Player 10.1.102.64 and are having problems with watching videos on FaceBook or other sites, contributor Texas Mac Man suggests the following solution which fools the site into thinking that you are running the latest version:)
    Download this http://www.steelbin.com/FPforFBPPC.zip to your desktop, unzip it, and replace the current Flash Player plug-in which is in your main/Library/Internet Plug-Ins folder, (not the user Library). Save the old one just in case this one doesn't work

Maybe you are looking for