Column alias works in MySQL, but not in cfoutput

I have the attached query that works fine in MySQL, but
throws an error "1stpay not a valid identifier name" - like it
doesn't recognize the aliases. However, it's recognizing my 2
aliases above. So is it the "if" lines that it's not liking?
Ultimately, I'd like to also create a column that adds the values
in "1stpay" and "2ndpay", but haven't figured that one out yet in
MySQL.
Thanks,
Richard

That did it.....I should have tried that already!
Thanks Dan!!!

Similar Messages

  • Tiger Server: Default MySQL works for phpMyAdmin but not command line ? ? ?

    Greetings all,
    I followed the excellent instructions at
    http://discussions.apple.com/thread.jspa?threadID=132783&tstart=0
    on upgrading PHP to version 5 and getting (the preinstalled) MySQL setup with phpMyAdmin
    I can connect through the phpMyAdmin, create new dbs, etc. Problem is that now I CAN'T connect from the command line. (I originally set my new root password from the command line and that's the last time I could connect from there!
    Now I get the dreaded ERROR 2002 when I attempt:
    /usr/bin/mysql -h localhost -u root -p
    If I use the IP address or hostname instead of "localhost" (after -h) I get a ERROR 2003. Dropping the -h and hostname from the line above still gets me a ERROR 2002.
    My phpMyAdmin config is a connect type "TCP" not socket, which might be one reason it works and the command line doesn't, but I still don't know where I've gone wrong.
    My /var/mysql/* is all owned by mysql and group www.
    I'm finding lots of people asking about the ERROR 2002, but not finding any solutions (particularly for Tiger Server). I'd prefer to use the preinstalled MySQL to installing a new installation (the thread referenced above says upgrading or removing the MySQL installation is too hard to do) and there has GOT to be a reasonable explanation for why it works with phpMyAdmin, but not the command line.
    Thanks in advance for any replies!
    Many   Mac OS X (10.4.3)  

    You know what? I think when I started mysql_safe, I did it with sudo. Maybe that is my problem?
    If so, what user do I want to start it as? I've seen one suggestion of doing this:
    ./bin/mysqld_safe --user=mysql &

  • In line view works in 9i but not 11g

    The following subset of a larger in ilne view works in 9i, but not in 11g. Any thoughts on why it doesn't work in 11g. An 'ORA-00979 : not a group by expression' message is displayed. This error message refers to the last 'group by' statement.
    select a.appl_start_term
    ,count(*)apps
    ,acc_total--, acc_gre
    from datatel_snap.applicant_current_part a
    , datatel_snap.acad_program b
    --accepted
    select appl_start_term
    ,count(*) acc_total
    --, sum(decode(test_grev,null,0,1)) acc_gre
    from datatel_snap.applicant_current_part a
    , datatel_snap.acad_program b
    , datatel_snap.dept c
    where appl_admit_status_cat in ('MASTER')
    and substr(appl_start_term,5,1)= 'F'
    and appl_school='SIS'
    and a.appl_acad_program = b.id
    and b.dept_1 = c.id
    and (derived_appl_disp = 'AC')
    group by appl_start_term
    ) z
    where appl_admit_status_cat in ('MASTER')
    and substr(a.appl_start_term,5,1)= 'F'
    and appl_school= 'SIS'
    and a.appl_acad_program = b.id
    and a.appl_start_term = z.appl_start_term(+)
    group by a.appl_start_term ,acc_total--, acc_gre
    order by 1
    Edited by: user8377830 on Jul 17, 2010 10:05 AM
    Edited by: user8377830 on Jul 17, 2010 10:10 AM

    Fine, you shoud do do either:
    - a group by "acc_total" or
    - use an aggregate function on "acc_total" (like: sum(acc_total), max(acc_total) etc.)
    Edited by: user11268895 on Jul 17, 2010 7:14 PM
    sorry id didn't read carrefully your statement...
    Try to prefix the column acc_total with "z." (both in the select and in the group by expression)
    SELECT   a.appl_start_term, COUNT (*) apps, z.acc_total              --, acc_gre
        FROM datatel_snap.applicant_current_part a,
             datatel_snap.acad_program b,
    --accepted
              SELECT   appl_start_term, COUNT (*) acc_total
    --, sum(decode(test_grev,null,0,1)) acc_gre
              FROM     datatel_snap.applicant_current_part a,
                       datatel_snap.acad_program b,
                       datatel_snap.dept c
                 WHERE appl_admit_status_cat IN ('MASTER')
                   AND SUBSTR (appl_start_term, 5, 1) = 'F'
                   AND appl_school = 'SIS'
                   AND a.appl_acad_program = b.ID
                   AND b.dept_1 = c.ID
                   AND (derived_appl_disp = 'AC')
              GROUP BY appl_start_term) z
       WHERE appl_admit_status_cat IN ('MASTER')
         AND SUBSTR (a.appl_start_term, 5, 1) = 'F'
         AND appl_school = 'SIS'
         AND a.appl_acad_program = b.ID
         AND a.appl_start_term = z.appl_start_term(+)
    GROUP BY a.appl_start_term, z.acc_total                              --, acc_gre
    ORDER BY 1.. and use different aliases in your subquery (not the same a the main one).
    Edited by: user11268895 on Jul 17, 2010 7:23 PM

  • Java calendar works in IE but not in Firefox

    This Java code works in IE but not in Firefox - any ideas - tks
    <pre><nowiki><TABLE bgColor=#ffffff border=1 cellPadding=0 cellSpacing=3 id=calendar style="DISPLAY: none; POSITION: absolute; Z-INDEX: 4; left: 28px; top: 365px">
    <TBODY>
    <TR>
    <TD colSpan=7 vAlign=center> <!-- Month combo box -->
    <SELECT id=month onchange=newCalendar()>
    <SCRIPT language=JavaScript>
    // Output months into the document.
    // Select current month.
    for (var intLoop = 0; intLoop < months.length; intLoop++)
    document.write("<OPTION " + (today.month == intLoop ? "Selected" : "") + ">" + months[intLoop]);
    </SCRIPT>
    </SELECT>
    <!-- Year combo box -->
    <SELECT id=year onchange=newCalendar()>
    <SCRIPT language=JavaScript>
    // Output years into the document.
    // Select current year.
    for (var intLoop = 1900; intLoop < 2028; intLoop++)
    document.write("<OPTION " + (today.year == intLoop ? "Selected" : "") + ">" + intLoop);
    </SCRIPT>
    </SELECT>
    </TD>
    </TR>
    <TR class=days> <!-- Generate column for each day. -->
    <SCRIPT language=JavaScript>
    // Output days.
    for (var intLoop = 0; intLoop < days.length; intLoop++)
    document.write("<TD>" + days[intLoop] + "</TD>");
    </SCRIPT>
    </TR>
    <TBODY class=dates id=dayList onclick="getDate('')" vAlign=center> <!-- Generate grid for individual days. -->
    <SCRIPT language=JavaScript>
    for (var intWeeks = 0; intWeeks < 6; intWeeks++)
    document.write("<TR>");
    for (var intDays = 0; intDays < days.length; intDays++)
    document.write("<TD></TD>");
    document.write("</TR>");
    </SCRIPT>
    <!-- Generate today day. --></TBODY> <TBODY>
    <TR>
    <TD class=today colSpan=5 id=todayday onclick=getTodayDay()></TD>
    <TD align=right colSpan=2><A href="javascript:HideCalendar();"><SPAN style="COLOR: black; FONT-SIZE: 10px"><B>Hide</B></SPAN></A></TD>
    </TR>
    </TBODY>
    </TABLE></nowiki></pre>

    Document.all doesn't work in Firefox, you need to use document.getElementById().<br />
    See https://developer.mozilla.org/En/DOM/document.getElementById
    <pre><nowiki> var parseYear = parseInt(document.all.year [document.all.year.selectedIndex].text);
    var newCal = new Date(parseYear , document.all.month.selectedIndex, 1);
    </nowiki></pre>

  • Custom F4 help in a BSP application working in Mozilla but not in IE

    Hi,
    I have created a custom F4 help in a BSP application.
    It is working in Mozilla but not in IE. I tried enabling javascript as well but still it is not working.
    Can someone please suggest a possible solution for this?

    Hi,
    See simmilar discussion in thread /thread/1883519 [original link is broken]
    I think this may be helpful for you.
    Thanks,
    Chandra

  • Why does the counter work in MAX, but not Labview?

    Please help, I have been away from Labview for over 3 months, and I am quite rusty....
    Last year, I successfully configured NI9401 to measure period (seconds) by counting the rising edges of my sensor signal.  Since then, I have aquired a new PC, and loaded all my software into it, including the Labview VI's that successfully worked on the old computer.
    I can see the digital signal using MAX and the test panel for the NI9401, so, I know my wiring and my TTL signal is OK, but, when I try to run the attached VI, nothing happens except the error below..  How do I tell this VI to look for the signal on MOD3/CTR0 and channel 14?
    Thanks. I am sure it is a small adjustment...this worked fine a few months ago...not sure what is wrong now.
    Thanks,
    Dave
    Solved!
    Go to Solution.
    Attachments:
    continuously measure period buffered_singlechannel_forum_feb_23_2012.vi ‏20 KB

    OK, now.  Resolved the issue. The vi is fine, but, some shaky wires were identified...worked in MAX but not in the vi.  Now that the connections have been tightened up, it works for both.  Sorry for the inconvenience.
    Dave

  • Works on emulators but not on mobile devices

    Hello,
    My project works on emulators but not on mobile devices (no image and on Samsung it says "unsupported file").
    Please help, I don't know what to do. My configurations: MIDP 2.1, CLDC 1.1.
    Thanks in advance.
    Edited by: Vitali.pom on Oct 27, 2011 12:01 PM

    Edit: I succeeded to solve it accidentally. I did the following: Sign the jar in Netbeans, clean and build, the jar didn't work, I wiped out the .ks from the jar and clean and build again. Now it worked.
    Edited by: Vitali.pom on Oct 30, 2011 1:28 AM

  • Wifi works at home but not when away from home

    My Wifi works at home but not when away from home, what is wrong?  I thought with a phone plan I didn't need to have a wifi connection.

    You either need WiFi or Cellular (or both). If you have neither, you can't connect to the internet.
    Most people use WiFi at home and Cellular while away from home, or connect to public WiFi networks where there are some.

  • Can't FaceTime anymore?  iPad states wifi connected and iPhone 4 states not connected?  I have wireless in my home? Not sure what happened.  Password works for iPad but not on phone?

    iPhone won't connect to wifi.  iPad is connected.  Password working on iPad but not on phone.  Can't upload software update of IOS 7.1 because phone not connecting to wifi?

    Connect iPhone to computer and open iTunes.  You will be prompted to update to iOS 7.0.  Keep your phone connected until the update is finished.

  • My apple id works on itunes but not on my ipod touch, what gives ?

    my apple id works on itunes but not on my ipod touch, what gives ?

    What are you trying to do on the iPod?
    Have you went to Settings>Store and sign out and then sign back in?

  • Album Art works for most, but not all

    I was reading previous forums on the subject, but no clear answer was given..
    The album art shows up fine in itunes and my library and works for most of my music on my ipod, but how come some album's art does appear? I have it set manually and select 'Get Info' then 'Artwork' and add it from there, then drag in the finished product to my ipod. I've been doing that and it works fine for most of the albums, but every so often, the album art will not appear on my ipod. Am I doing something wrong? I take them all from the same source (amazon.com) but it makes no sense to me how some randomly don't appear.
    I tried deleting the artwork and re-adding it, but nothing happened again. If you could answer why it works for most but not all or how I can get the album art to appear for the ones it will not by re-doing something, it would be appreciated. thanks.

    I encountered the same problem in the beginning. When I compared the size of the original images, the working ones seemed to be smaller in general, so I reduced the size of all covers I intended to upload on the pod to 300x300 pixels.
    This seemed to work - for 2 days. I bought the pod on friday, had pictures on sunday, but on Monday (after the first time the pod was fully discharged) none were left left.
    So I ended searching this forum for related problems...
    And decided to join my problem to this entry.

  • How to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?

    how to send active links in email from firefox. Works in IE but not Firefox... Is there a setting to change?
    == This happened ==
    Every time Firefox opened
    == Always

    Check with your web mail service provider for help with that issue.

  • Medical app from Intuit works in IE, but not Firefox.

    Encrypted medical app works in new IE, but not Firefox. Everything works down to the end, and click on "continue" and nothing happens. A tech and I have spent hours on this. Did not work on FF5 or 6. Did not work on old IE, but did on fresh new version with no data files copied in.

    If it works in IE but not FF, then it has nothing to do with the mp3s. More likely it's because of the HTML on the page.
    To start, page is missing DOCTYPE declaration... a MAJOR problem. The DOCTYPE declares which set of rules the browser will use to display the page. Without it, different browsers go crazy or do not work at all.
    http://www.w3schools.com/tags/tag_DOCTYPE.asp
    Validate the html code here:
    http://validator.w3.org/
    You will have to fix all the errors if you want this to work in all browsers.
    Best wishes,
    Adninjastrator

  • Flash Player works in Safari but not Internet Explorer 9

    I've installed Flash Player 10.3 and it works in Safari but not Internet Explorer 9. When I look in Manage Add-Ins I see Flash Shockwave but not Flash Player. My operating system is Windows Vista Ultimate (32bit). Safari is 5.0.5 and IE 9 is 9.0.8112.16421. I've tried uninstalling and re-installing Flash Player and uninstalling Norton 360. Nothing has worked so far. Can you help?

    Thank you for your reply. Shockwave is loaded and enabled.
    The files in flash directory are: a folder called FlashPlayerTrust: file, flash10q.ocx: file, FlashInstall.log; file, FlashUtil10q_ActiveX.dll; file, FlashUtil10q_ActiveX.exe, file, install.log.
    There is no file: NPSWF32.dll.
    When I test the browsers I get no spinning logo in either Safari or IE9. Safari says: missing plug-in, where I think the logo should be. IE-9 says nothing at the same location.
    Thanks.

  • Navigation works in IE but not Firefox or Safari!

    Hi guys
    Why do my nav links on the hompage work in IE but not in Firefox and Safari? http://www.jasonkieck.com/
    Any help would be appreciated

    The main reason is you have a <div id="bg_grid"> at the end of your html that is essentially over the top of everything else on your page, including your links. All clicks go to that <div> rather than your links undeneath it. I'm kind of surprised it works in IE to be honest.
    You do also have a ton of errors as Gramps points out, but that particular issue is not technically an error, so I have a feeling you could fix the ~100 problems shown by the validator and still have the issue.
    You could use z-index to "order the stack" as it were. Changing the z-index attributes for the css of those elements will allow you to change their order, regardless of their location in the html. A higher z-index number, the "closer" it is to the viewer (higher on the stack).
    Right now, they are both set to 1, so the one that comes later in the html is on top.
    Adding z-index:999 to the menu <div>  should do it,

Maybe you are looking for

  • HT4075 This does not work on Mountain Lion OS

    I have done this in the past, but now that I try it in MAC OS Mountain Lion it does not work. No '+' green icon appears, it only reorders the documents... Can anyone help?

  • Multivalue Attributes

    We are implementing Portal, and one of the requirements we have is to load multiple values into a single attribute. For example, a document might have an attribute for Manufacturer. We want to be able to assign GM, FORD, or both values. I know we can

  • Easy way to set interpolation on keyframes?

    Say you have text flying in using scale and you want it to start out fast and slow down. When you go in and select Bezier for interpolation, you have to set the curve for the x,y,and z parameters. It is hard to select the right parameter and you have

  • Editing other peoples' PDFs

    Hi, I am new to Adobe Acrobat 9 (and adobe in general!) I want to edit some text in a PDF that somebody has sent to me. So far all I can do is add an optional alternative text. How do I make  changes  permenant?

  • Filter encountered an error and could not complete the translation

    This just popped up. Worked fine on Friday and nothing has changed. Running FrameMaker8 on Vista. I try to open a word doc and this message popped up. I assumed it was the word doc. I try to open another word doc, from a different source and I get th