If I want to order by dateAdded to I have to include it in the select statement like

If I do this:
<cfquery name="chart" datasource="#datasource#">
select behaviourID,score, dateAdded2 = convert(varchar,
dateAdded , 101)
from staff_charts_data
where userID =
<cfqueryparam value="#arguments.userID#"
cfsqltype="cf_sql_integer"> AND
NOT score = 5
</cfquery>
If I want to order by dateAdded to I have to include it in
the select statement like so:
<cfquery name="chart" datasource="#datasource#">
select behaviourID,score, dateAdded2 = convert(varchar,
dateAdded , 101),dateAdded
from staff_charts_data
where userID =
<cfqueryparam value="#arguments.userID#"
cfsqltype="cf_sql_integer"> AND
NOT score = 5
</cfquery>

you should be able to order by dateAdded without it being in
the select clause. The only time the order by field has to be in
the select clause is when your query has an aggregate and group by
clause, like this:
select field1, field2, max(field3) as youralias
from sometables
where whatever
group by field1, field2
order by ???
You can only order field1, field2, max(field3) or youralias.
You can't order by field4.

Similar Messages

  • I want to listen to internet radio as I used to do. The selection "Radio" has gone from my list under "Music". How do I get it back again?

    I want to listen to internet radio as I used to do. The selection "Radio" has gone from my list under "Music". How do I get it back again?

    I don't know if this is what you really want, but I created a Playlist for Radio, and add some of the stations I like from websites. (If you click on the web-links they load into iTunes in the Sidebar). And you can also add individual Radio stations from the top right,(under Apple) to a Playlist. That's the only way I know to have them in the Sidebar.
    Z_ZS-B, You also helped me to find the old Radio list! I didn't even know it was up on the right, under Apple. I haven't liked this version of iTunes so I hadn't even bothered to try and figure it out until now, but because I just bought a my first iPod Shuffle I'm determined to bend this version to my will. ;-)

  • Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement: there has been an error occurred while connecting to Apple's online store try again

    Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement:
    there has been an error occurred while connecting to Apple's online store try again

    Best I have been trying for a week to order greeting cards using iPhoto but do I always get the same statement:
    there has been an error occurred while connecting to Apple's online store try again

  • Want to move to FCE HD but have questions before I drop the coin . . .

    I currently have Adobe Premiere 3.0 on a Windows machine, plus I'm primarily a still photographer, so my video experience is limited. I'd rather do all of my video work on my new iMac, so I'm looking at buying Final Cut Express HD instead of returning to Premiere.
    It will be primarily used for producing instructional DVDs and in some places I will want to use some stop motion. As I see it, I have two choices: shoot in DV and edit, or produce a slideshow from stills shot at 2.5 frames per sec. and import that into a video. I'd want to dub in a voice-over narration to either one. The stop motion would have to have irregular timed spacing, so that the key images could be held for a time while the narration explains what is going on. These sequences would then be edited into the larger video as DVD chapters.
    Would FInal Cut Express HD be capable of handling either method?
    I'm currently an Aperture user -- can FCE HD read Aperture libraries for the incorporation of still images into video?
    Can I build a slide show in FCE HD or would other software be preferable and the result exported to FCE HD?
    Thanks

    You can use it to make slideshow videos/DVDs but FCE can only work in DV quality so your slides will be a maximum of 768x576 in PAL and less in NTSC.
    Compared with viewing them on a computer monitor of 1024x768 or more, some people find the quality a little disappointing.
    You can of course do it in HDV where the quality should be very high but most people have not yet got that equipment.
    Ian.

  • HT4061 I upgraded and no longer have an iphone. Now my fiance nor anyone with an iphone can text me because it still wants to use iMessage even though I have removed my number from the icloud, apple, and itunes. I have no idea what more to do.

    We have already deleted my name and number from his iPhone, and tried re-adding it. It still lists my number as an iMessage. It is not feasible to ask everyone in my contact list with an iphone to turn that off so that they can text me. Please help. I've already done everything that I could find online, deleting my number out of everything and nothing has helped thus far. Thanks in advance.

    Hi tinkdgw99,
    If you are having issues receiving text messages after switching away from an iPhone, you may find the following article helpful:
    iOS: Deactivating iMessage
    http://support.apple.com/kb/TS5185
    Regards,
    - Brenden

  • 350 U series - Want to Order but Don't Want 64 BIT - Any SOLUTIONS?

    I want to order a 350 U but I'm stuck on pushing the button because of the 64 BIT operating system.  I've Googled and Googled looking for a solution.  I have an HP that came with Vista that I replaced with XP - so would that be similar?  I don't mind the Windows 7 so much as I do the 64 bit - nothing I have will work with that!  I don't want to replace all my software!  Help please!

    you answered your question already
    there is a solution that you can replace the softwares.
    if i'm not wrong, all serie comes with windows 7 with 64 bit.

  • Using ORDER BY for column that's not in SELECT statement of select list?

    Hi all.
    I have a select list on an APEX page at apex.oracle.com, and I would like to order this by the value of column UnitOrder.
    The SQL is as follows:
    SELECT DISTINCT foodunit.name AS display_value, foodunit.foodunitid AS return_value
    FROM foodunit, food
    WHERE foodunit.foodid = :P18_FOODID
    ORDER BY foodunit.unitorder ASC;Off course, this code won't work. And since it's a select list, I can't just add foodunit.unitorder to the SELECT statement. Also, I can't get rid of the DISTINCT, because then for some reason it tends to display an infinite amount of the same row...
    The point of ordering it by UnitOrder is that all units who begin with gram, ml, mg, kg,... etc, will be shown on top of the select list. All other food units will be shown on the second place and so on.
    The column UnitOrder holds either 1 or 2 as a value. 1 is the value for all rows that should be displayed at the top of the select list, 2 is the value for all the rest.
    So, what I want is that all rows in which the UnitOrder is 1, get displayed on top of the select list. Usually only 2 list items get shown in the select list at a time, depening on which food item a user has selected. The select list then refines to certain rows that match the foodid etc etc..
    If anyone has an idea, I'd be very happy to hear about it.

    Thanks! I didn't think about using a join. Code works now, and is as follows:
    SELECT foodunit.name AS display_value, foodunit.foodunitid AS return_value
    FROM foodunit
    INNER JOIN food
    ON food.foodid = foodunit.foodid 
    WHERE foodunit.foodid = :P18_FOODID
    ORDER BY foodunit.unitorder ASC;

  • Order by column not in select statement

    Want to select multiple columns from a single table, and order by a column on the same table, but that is not in the select statement, or simply not shown in the output of the statement..
    Any help appreciated..

    Hi,
    In most cases, you can ORDER BY any column in the table(s) used, whether it is in the result set or not.
    Otherwise, include the column. Your front-end tool may be able to suppress the display, if you really don't want to see it.
    For example, in SQL*Plus
    COLUMN  dont_show  NOPRINTcauses any column named (or aliased) dont_show not to appear in the output.
    In Oracle9 (and up) sub-queries with ORDER BY return their results in order, so you can say things like:
    SELECT  col_a
    ,       col_b
    FROM    (
            SELECT    col_a
            ,         col_b
            ,         col_x   -- Not included in final output
            ORDER BY  col_x
            );

  • Order of records in o/p  of select statement

    Hi all
    I have doubt regarding the select statement. I need to execute a select statement (with out any order ie with out "order by") which searchs a table. I want to know whether in any
    circumstances the order of the records of the select statement is different.
    sample select statement which I need to execute
    select emp_no from emplyees where designation = 'programer'
    in one word order of records of in the o/p of a select statement will be unique ?
    (provided same query same, table,)
    can u plz quote the link to get more information
    regards
    Renjith

    Hi,
    YES, you can
    Do Order By Without Using Order By Clause
    in your select statement.
    I assume that you have unique data ( e.g. emp_no in Emp Table ) and you you do not want to use Order by clause.
    Solution 1:
    Select Emp_no
    from Emp
    group by Emp_no;
    the o/p will be in the sorted in the Ascending order.
    Solution 2: ( Only for columns holding Numeric Values )
    Select Emp_No
    From Emp
    Where 99999 - Emp_no in ( Select 99999 - Emp_no from Emp );
    Again this will sort the result will be in the Descending Order. you can use any big number instead of 99999 but it should be greater than Emp_no value.
    Note: You Should only use this method on not very large tables coz of performance issue.
    Hope this will solve your problem.
    Any Comment on this, any body.
    Thanks and Regards
    There is always a solution to the problem, And if there is no solution of a problem then problem is not a problem.

  • Does the ipod nano 7th gen work with Belkin Blue tooth In car hands free? Customer support said it did when I bought it, but the box doesn't say it does and I dont want to open it in case I have to return it.

    Does the ipod nano 7th gen work with Belkin Blue tooth In car hands free? Customer support said it did when I bought it, but the box doesn't say it does and I dont want to open it in case I have to return it.

    If the Belkin supports the A2DP (Stereo Bluetooth) profile then it will work.

  • Using order by in the select query

    Hi All,
    I have query in which I need the latest record. To get the latest record, I can
    1) Select all entries into an internal table and sort them descending and get the first one
    2) Select all entries into an internal table and order by in the select statement itself.
    Then read the first one.
    Which approach should be better as for as the performance is concern.
    The query is on MKPF table and I have the material document number. I need the latest entry.
    Regards,
    Shahu

    Hi,
    The first one would be better.At the most we should not use order by in select statement bcoz it directly sorts the data according to that in database itself reverting performance issues.
    Otherwise you can use select max* if records are less.
    Reward points if helpful.
    Thanks,
    Ponraj.s.

  • Want to use Index in Select statement

    Hi,
    I want to use the index tha is created for LIPS table for creation date. I want to use that INdex in the select statement to get the data from that table. Any one can tell me how can I right the select statement in report?
    thanks.

    Like I mentioned earlier, the optimizer is smart enough to choose the correct index based on the WHERE clause.  So if you created an index on field ERDAT for LIPS and your SELECT statement is like so.....
    Select ERDAT WERKS MATNR
              from LIPS
                          into table Itab
                                    Where erdat in s_erdat        "< - ERDAT First in WHERE Clause
                                        and werks in s_werks
                                        and Matnr in s_matnr.
    Then the optimizer will choose your index to use to access the data.  You can see these if you would do an SQL trace over your program and use the "Explain" button on ST05.  It will tell you which index it used and why.
    There is no need to use HINTs to force the use of the index.
    Regards,
    Rich Heilman

  • Select statement takes very long to run with order by clause.

    Hi all,
    I have a select statement which when I run without the order by clause takes arround 2 minutes to run. But with the order by clause it goes on for ever. I am trying to access the database server through a network which is not too fast.
    The select statement is based on 9 views which are again based on some views. It also has inline views and outer joins. These views and inline views can not be done away with.
    When selected without the order by clause it gives 3215 records.
    Anything like 2 to 3 minutes will be Ok.
    Thanks.
    --Malay                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    The select statement is as follows :-
    SELECT f.system_name,
    a.signal_type,
    f.sys_signal_name,
    a.bus_desc,
    b.vl_ident,
    b.vl_name,
    b.src_mac,
    b.src_mac_addr,
    b.dest_mac,
    b.dest_mac_addr,
    b.network,
    bb.bufr_size_in_bytes,
    bb.bag_in_ms,
    bb.is_rma_used,
    bb.is_ic_used,
    bb.sub_vl_cnt,
    bb.skew_max_in_ns,
    cc.msg_name,
    c.src_ip,
    c.src_ip_addr,
    c.src_port,
    c.dest_ip,
    c.dest_ip_addr,
    c.dest_port,
    cc.rate_in_ms,
    cc.tx_mode,
    cc.protocol,
    cc.port_type,
    cc.msg_length_in_bytes,
    d.mnemonic,
    d.start_addr32,
    d.lsb,
    d.end_addr32,
    d.msb,
    d.format,
    d.init_value,
    d.fs_mnemonic,
    d.fs_afdx_data_id,
    d.digital_data_id,
    DECODE(
    d.digital_datatype,
    NULL, '',
    'UNUSED', '',
    api$util.concat_column_data(
    'api_'
    || d.digital_datatype,
    'digital_data_id',
    d.digital_data_id,
    bool.FALSE
    ) AS data_details,
    f.connection_id
    || '_'
    || a.digital_bus_id
    || '_'
    || b.afdx_vl_id
    || '_'
    || bb.afdx_output_id
    || '_'
    || c.afdx_frame_id
    || '_'
    || cc.afdx_msg_id
    || '_'
    || d.afdx_data_id AS KEY
    FROM api_afdx a,
    api_afdx_vl b,
    api_afdx_output bb,
    api_afdx_frame c,
    api_afdx_msg cc,
    api_afdx_data d,
    vf_signal e,
    (SELECT DISTINCT aa.signal_id,
    cc.system_name,
    bb.connection_id,
    bb.sys_signal_name
    FROM vf_nodes aa,
    vf_connections bb,
    vf_system cc
    WHERE aa.connection_id = bb.connection_id
    AND bb.system_id = cc.system_id) f
    WHERE e.signal_id = f.signal_id(+)
    AND e.digital_bus_id = a.digital_bus_id
                   AND a.digital_bus_id = bb.digital_bus_id(+)
    AND bb.afdx_output_id = b.afdx_output_id(+)
                   AND b.afdx_vl_id = c.afdx_vl_id(+)
    AND bb.afdx_output_id = cc.afdx_output_id(+)
    AND cc.afdx_msg_id = d.afdx_msg_id(+)
    ORDER BY f.system_name,
    a.signal_type,
    f.sys_signal_name,
    b.vl_name,
    cc.msg_name,
    d.start_addr32,
    d.lsb;
    Where api_afdx ,
    api_afdx_vl ,
    api_afdx_output ,
    api_afdx_frame ,
    api_afdx_msg ,
    api_afdx_data ,
    vf_signal ,
    vf_nodes ,
    vf_connections ,
    vf_system
    are all views.

  • Output in different order than in select statement.

    I'm executing the following query. Just wondering if I'm missing something:
    select a.constraint_name, a.table_name, a.r_constraint_name, b.column_name, c.table_name, c.column_name from user_constraints a
    inner join user_cons_columns b on (a.table_name=b.table_name and a.constraint_name=b.constraint_name)
    inner join user_ind_columns c on (a.r_constraint_name=c.index_name)
    where a.r_constraint_name='QUE_PK' and b.position=c.column_position
    order by b.position
    (replace QUE_PK with your own primary key referenced in a foreign key)
    The columns appearing in the resultset are in different order than in the select statement.
    They came as follows: constraint_name, r_constraint_name, table_name, table_name, column_name, column_name. If I aliase one of the column, the result set is ok.
    I'm using version 1.1.0.23 on Ubuntu 6.10 against a 10g r2.

    To double check, you can go to <sqldeveloper>/system/oracle.sqldeveloper.1.1.0 (this may be <user_dir>/system/oracle.sqldeveloper.1.1.0 on your computer) and delete all of the *TableSettings.xml files. That will erase any custom column orders that you may have saved.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • The ff default theme keeps re-enabling itself after computer restart even though I enable littlefox and restart firefox, and it does the same on more than one computer. I want littlefox to start with firefox, not have to enable every time.

    I want littlefox to start with firefox, not have to enable every time the computer starts.

    @kalos
    Uninstalled everything PA, also uninstalled mangler which was the only thing that depended on PA. It didn't work anyway.
    No pulseaudio --kill command so I couldn't run.
    Checked systemd journal and there is no mention of PA this time.
    Checked top, and grepped ps aux and there is no PA there either.
    I also rebooted the machine completely just to make sure. However VLC and HTML5 have the same incompatibilities.
    _ vlc Videos/anime/fmab/01.mp4
    VLC media player 2.1.5 Rincewind (revision 2.1.4-49-gdab6cb5)
    [0x1bc30f8] pulse audio output error: PulseAudio server connection failure: Connection refused
    [0x1af4118] main libvlc: Running vlc with the default interface. Use 'cvlc' to use vlc without interface.
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    Fontconfig warning: FcPattern object size does not accept value "0"
    [0x7fb604001248] main vout display error: Failed to resize display
    But the video and audio did work until I ran some HTML5 video, after which the audio worked, and then I opened it again and it didn't work...
    @nomorewindows
    I see. That's too bad. At least we're not alone.
    Last edited by Greduan (2014-11-14 01:34:29)

Maybe you are looking for

  • Is it necessary to have the pkg files for Anyconnect VPN on the firewall

    Hello, I have an ASA 5505 and we are using Anyconnect client to connect to our VPN not the "Clientless" method. Well, I don't have so much space on the flash and I need it for an upgrade of the ASA image. So, do I must have the .pkg file for the Anyc

  • Using Oracle Text for searching with UCM 10g

    I am using Oracle text with UCM 10gR3 and Site Studio 10gR4 and I am trying to sort the search results by relevancy and to also include a snippet of the retrieved document. I have the fields that the SS_GET_SEARCH_RESULTS service returns but the rele

  • Why itunes doesnt sync album to artist

    I downloaded some cds to add to my itouch.  When I sync the Itouch with Itunes it doesn/t put the album under the artist.

  • Taking too long to save projects

    Hi...when I save my project it takes a really long time to save. Sometimes as long as a half hour. I am using a 2.3 gig processor, and have lots processing speed. When I look in "applications" running, I notice that 2 adobe ICONs present themselves.

  • Registration of Dreamweaver CS3 during silent installation

    Hi  All, I need to do packaging of Dreamweaver CS3 and i have to deploy in 100 of machine... and i need a silent installation. so first i created two xml file by --record=1 option. install.xml and remove.xml and i created application.xml.override and