UNION keyword should not

I'm trying to get the following union query on my coldfusion site:

< name cfquery = "committee_record."

DataSource = "AS400a CMTLIB".

MaxRows = 100

DbType = "ODBC" >

SELECT MBRESMPF. MBMID,

MBRESMPF. MBCYR,

MBRESMPF. MBCCD,

MBRESMPF. MBDCD,

UCase (COMITEPF. CMNAM) AS COM,.

MBRESMPF. MBMRC,

UCase (RANKSPF. RKDSC) AS rank.

MBRESMPF. MBRPT,

MBRESMPF. SPORT,

MBRESMPF. MBERP,

UCase (DIVISNPF. DVNAM) LIKE DIV

FROM MBRESMPF INNER JOIN RANKSPF ON MBRESMPF. MBMRC = RANKSPF. RKCDE LEFT JOIN COMITEPF ON MBRESMPF. MBCYR = COMITEPF. CMCYR AND MBRESMPF. MBCCD = COMITEPF. CMCCD AND MBRESMPF. MBDCD = COMITEPF. CMDCD LEFT JOIN DIVISNPF ON MBRESMPF. MBDYR = DIVISNPF. DVDYR AND MBRESMPF. MBDCD = DIVISNPF. DVDCD

WHERE MBRESMPF. MBMRC <>"ORCDVPRN4" AND MBRESMPF. MBMRC <>'ORCIPDRNS' AND MBMID = #id_number #.

ORDER OF MBRESMPF. MBMID, MBRESMPF. MBCYR / / DESC

UNION SELECT MBRESMPF. MBMID,

MBRESMPF. MBCYR,

MBRESMPF. MBDCD,

MBRESMPF. MBDCD,

UCase (DIVISNPF. DVNAM) AS COM,.

MBRESMPF. MBMRC,

UCase (RANKSPF. RKDSC) AS rank.

MBRESMPF. MBRPT,

MBRESMPF. SPORT,

MBRESMPF. MBERP,

UCase (DIVISNPF. DVNAM) LIKE DIV

FROM MBRESMPF INNER JOIN RANKSPF ON MBRESMPF. MBMRC = RANKSPF. RKCDE LEFT JOIN DIVISNPF ON MBRESMPF. MBDYR = DIVISNPF. DVDYR AND MBRESMPF. MBDCD = DIVISNPF. DVDCD

WHERE MBRESMPF. MBMRC = "ORCDVPRN4" OR MBRESMPF. MBMRC = 'ORCIPDRNS' AND MBMID = #id_number #.

ORDER OF MBRESMPF. MBMID, MBRESMPF. MBCYR / / DESC

< / cfquery >

But I get the following error message:

Error Diagnostic information

Of ODBC error code = 37000 (syntax error or access violation)

[IBM] [iSeries Access ODBC Driver] [DB2 UDB] SQL0199 - keyword UNION should not. Let's take valid: TO USE SKIP WAIT WITH FETCH OPTIMIZE.

The error occurred while processing an element with a general identifier of (CFQUERY), occupying the position of document (19:1) (22:23).

This query works for me no problem in Microsoft Access.  Someone at - it suggestions?

Thank you!

I'm surprised that it works in Access, but from my experience a UNION query generally expected a single ORDER BY the end (a recordset that is the result of the union is so orderly and not to each recordset that contributes to the union)?  I'm not able to test this right now, sorry.

--

Adam

Tags: ColdFusion

Similar Questions

  • K / keyword is not get bound...

    I use Robo help 8.0.My type of project is to generate a CHM by using a word document. I mean it's a DOC to CHM project.

    The Tab(usally,in the left hand side of any chm) Index should contain keywords.
    I used to call the keyword as follows:

    1. Select a topic in the word
    2 Goto Inseet-reference-> reference >-> click the button symbol, and then select the symbol 'K '.
    3.now foot no reference appears in the word (at the bottom of the page) document. Regardless of the name that I go here is my keyword in the generated chm file.

    But to my surprise, only a few of the keywords appear and many keywords do not appear in the tab Index of the chm file...

    Now, I started shooting hard... I checked the fonts, spaces etc. etc... etc...
    None of them work... its very very obscure...

    I can not even find why some are not working as expected...

    Could you get it someone please let me know a solution for this problem of wave? Its very urgent...




    Thank you Pierre and Colum...
    My problem is solved using the following very simple method:

    Add keywords from the index by selecting the topic text
    Double-click a topic to open it in Design view.

    Select the text to use as a keyword.

    Right-click the text, and then select Add To > Keyword Index > [index].

    But create the keyword manually (by insertion of symbols) has a bug it seems... Only a few are properly created and others not...

    Thank you again...

  • Is there an app Golf GPS for the Apple Watch series 2 which is "native" to the watch, in other words, should NOT be tied to an iPhone on the golf course?

    Is there an app Golf GPS for the Apple Watch series 2 which is "native" to the watch, in other words, should NOT be tied to an iPhone on the golf course?

    Hello

    You can find this app of interest:

  • The part 'From' the display of Thunderbird should not be transparent.

    Transparent bar mail, it is difficult to locate the gap between the header of the e-mail message and mail lists above the header of the e-mail message. The part 'From' should not be transparent. This is a recent problem, does not appear in the old version

    32 version was released and the issue is resolved, so it was a bug in Thunderbird. Thanks for your help. I'll mark this as resolved.

  • When I want to install the converter file for DownloadHelper my McAfee security says that the site contains viruses and malware and me should not go on this site

    The warning comes from the "save to file" from the installation file. Should I ignore it? I just had a big problem with a scam ransomware blocking system, so I'm really sensitive.

    Note that there is generally no need to use such a converter because a lot of media players can play flv and mp4 files as well.

    If you do not then you can look at VLC.

    There should not be a problem with the converter used by the Video DownloadHelper extension

  • Some junk mail I receive should NOT go to spam.  How can I fix this?

    I have an iMAC.  Some mail goes in junk mail, which should not be undesirable.  How can I fix this?

    control-click or right-click on the message and select Mark as "not junk".

  • iPhoto should not run every time that a device is connected

    iPhoto should not start when I plug any device on a computer.   This should be controlled by the owner of the device on the device. And this should be a configurable feature on the computer.  There should be a check box that says "Click here to have the automatic iPhoto launch when you plug in a device."

    I don't want to plug my phone in a my computer from a friend to have all photos hot, I took with his girlfriend while he was out of popup city on his screen while my phone charges.

    I want this automatic launch when my girlfriend plug her phone on my computer to load so I can watch through his albums.

    I won't launch when my father its branch on my computer because the things a child should not see their parents.

    Already, this option exists in iPhoto and iTunes, but you can check it or uncheck the box only when other devices are connected. You can also do this via the image transfer application in your Applications folder.

  • Bootcamp - Windows 10 should not see or read files from the disk HARD Apple intern.

    I have just successfully Windows 10 next OS X on my 15 "Macbook Pro mid-2014.

    Windows 10 should not see or read files from the disk HARD Apple intern.

    Should which driver I uninstall?

    On OSX, if the following Terminal command produces any output, then you cannot read partition OSX on the side Windows? FileVault2 will also disable access to the OSX partition.

    Cs diskutil list

  • I have installed on my Mac Pages. Before moving to El Capitan, I deleted Pages and now when I am trying to download the store again, it asks me to buy it. Should not be free?

    I have installed on my Mac Pages. Before moving to El Capitan, I deleted Pages and now when I am trying to download the store again, it asks me to buy it. Should not be free?

    Questions.

    1. What version of Mac OS X upgrade you to El Capitan?
    2. What version of Pages you removed before the upgrade of the El Capitan?
    3. Have you bought the OS X App Store Pages?
    4. When you bought your Mac?
  • For automatic indexing loop should not index empty array

    Hi guys,.

    I wanted to say in this VI remove empty elements in the table. He worked for table 1 d, but as soon as I gave him a table 2D, for some reason that I was unable to remove empty elements:

    sdfsdfsdfadgadf wrote:

    So when I was debugging, I saw at the 3rd row and 4th iteration of line, out of the inside OF the terminal loop index outter loop is [].

    Should not the terminal of the index of the outer loop treat [] as 'skip it '?

    In this case, the tunnel of indexation in the outer loop takes an empty 1-d array and adds it as a line to the 2D table. Because the 2D tables can not be serrated, it fills the remaining elements of the line (all) with the default value. Maybe we could say that an empty array should mean 'add all', but this behavior goes back very far and I don't know what effect this would have. As mentioned, it is easy enough to do what you want with a conditional append in the outer loop.

    sdfsdfsdfadgadf wrote:

    I mean what you described certainly applies if [] a something, but in this case it didn't. To prove the point, try something like this:

    Check the size of the table. You will find that it is 3,0,0. In other words, you have 3 pages, each with an empty 2D array, which is exactly what builds your code.

    I try to avoid dealing with > 2D paintings and which deals with the cases where they can be empty, so I don't remember the details of why this happens, but IIRC, it follows the rules of the system.

  • My C drive is full, what files should not be transferred to the E drive?

    Original title: complete C drive.

    My C drive is full, what files should not be transferred to the E drive? I am running Windows XP Home Ed

    Have you thought about doing a bigger hard drive?

    See: http://support.microsoft.com/kb/956324

    How to recover disk space

    As for what you can transfer on the E drive, any video, music or other personal files may be.

     
  • Question 1: Low virtual memory does that mean and how do I fix? Question 2: The corrupt system file that should not be removed. How do I correct?

    Question 1: what low virtual memory mean and how do I rectify.   I am invited this could change my access to some applications and the pc is very slow.

    Question 2: AVG pushes me that I have a corrupted system file, in a white space, I think, that should not be removed.  How do I rectify this?

    Uninstall AVG with tool for them to do it in safe mode.

    Reboot and install MSE.

    Without doubt, all problems solved. Let me know how it goes.

  • The items are displayed on the left pane of the Windows Explorer, which should not

    I just got a new computer with Windows XP Pro Service Pack 3.  I'm the only user & my 'Phil' user account has administrator privileges.  All of a sudden, when I open Windows Explorer, I see records of the tree (left) that I don't want.  I see the files that are on my desk, and other.

    Mobile device folder (which is not on my desk)
    Shared documents (from 'All Users', which is not on my desk)
    Documents of the administrator (which isn't on my desk)
    Several files that I keep on my desk
    In addition, I see "Logitech QuickCam Communicate STX", which is a program & should not be in the tree on the left side.

    I must have done something when I copied the folders & files from my old computer on my desk.  But I don't know what I did.  Is there a registry entry where I can hide or delete these folders to be seen on the left side of Windows Explorer.

    Don't know what to try.  I think it happened after that I have almost everything (files, shortcuts) copied from my old computer (also WinXP Pro) to my new from a backup, but I'm not sure.

    Thanks in advance,
    Phil

    OK, never mind.  I thought I did something to cause this, but I just plugged my old computer to a monitor & it shows the same thing... I guess my memory is bad.

  • Using excel, if I remove a value in a cell and you decide then he should not have been deleted, how I get it back?

    Using excel, if I remove a value in a cell and you decide then he should not have been deleted, how I get it back?

    Once you have removed the cell values and you have not saved the document again that you can always undo changes.

    Keyboard shortcut for undo is Ctrl + Z.

    MD MOEEN AJAZ KHAN - MCP, N +, A +.

  • I deleted Windows Defender on Windows Vista and tried to download and reinstall windows Defender but I gat a message that comes up saying that I should not install windows defender, because it came with the computer.

    deleted the windows on windows defender and impossible to reinstall! Message comes out and says that I should not install windows defender, because it came with windows vista. How can I try to fix it when I have windows Defender on my computer?

    You can not delete Defender in Vista.

    It is part of the Vista operating system.

    You can only activate / it:

    http://Windows.Microsoft.com/en-us/Windows-Vista/turn-Windows-Defender-on-or-off

    Enable or disable the Windows Defender

    Many anti-virus have conflict Defender (McAfee, AVG, etc.), and turn it out / conflict with it.

    Microsoft Security Essentials, it turns off because it has its own version.

    See you soon.

    Mick Murphy - Microsoft partner

Maybe you are looking for

  • How is - a leave Firefox

    Where is the output, or the button to quit smoking?

  • Cannot print mail, windows mail page freezes

    I have windows xp and in my windows mail, I can't print my email more.  When I go to file and print, the page freezes and the only way I can come on this is to go into the Task Manager and close the emial it.

  • I have a zip file I can't open

    I am trying to open a file with the XLSX extension, it's a spreadsheet that came to me in a zip file He used open and wants to know who or where he origanated from I guess.

  • WLAN driver problem

    Hi all I have a weird question, I was installing an win7 x 64 for my G1 430 Probook, that I bought yesterday. The thing is, I got everything but most importantly, the WLAN driver. I downloaded the correct drivers on your site, I have tried 2 differen

  • Is there any remote for the Sony Alpha a5000 physic?

    Hi I just wanted to know if there are any remote physical (not mobile phone) for the Sony Alpha a5000? Thanks in advance!