Tricky Help

I have simple sql query in my report, when i execute report result will vertically, i need to show horizontally in out put. To better understand i will eg below.
select abc,ddd from dual;
Report Output:
abc
xxx
yyy
zzz
I need to show report out put like below
abc
xxx,yyy,zzz
In order to show out put like that, what i need to do any suggestions, that will be gr8 help to me.
Thx,
Kumar

Hi praveen
For the respective repeating frame in Reports layout, change the print direction property from "down" to "across" and this would give you the desired results.
Make sure in the layout, the bounding object of that repeating frame has needed width for repeating frame to put the values in across direction
Thanks
The Oracle Reports Team

Similar Messages

  • BPS Layout formatting looks simple but tricky - Help

    Hi ,
    Created a layout with the below charaterstics and Month1 give the qty for that month. It works great but
    1)  When there is no data i.e no qty for that month , it suppose to be blank but it gives the below out put
    Currenlty :
    Material     mplant  DType month(qty)
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    Desired :
    Material     mplant  DType month(qty)
    2) When there is data i.e qty for that month , it suppose to give two records but it gives the below out put
         i.e values and some more lines with material but no qty . Actually there is data for only 2 rows.
    Currently :
    Material     mplant  DType month(qty)
    552477     552477  A           10
    552477     552477  B           20
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    552477     552477     
    Desired :
    Material     mplant  DType month(qty)
    552477     552477  A           10
    552477     552477  B           20
    I created a macro to delete the duplicate when the number repeats but that doesnot solve because when ever I want to read the total number of rows in another macro it shows wrong total number of line because of these repeating material numbers .
    How can I get the desired output ? is there any simple setting in the layout or XL with out using a complicated macros etc.........
    Using sem bw 320
    Please help . Thank you inadvance.
    Raju
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:01 PM
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:04 PM
    Edited by: venkat bhuaptiraju on Jan 8, 2008 6:07 PM

    Thank you all for your reply very very useful tips. This is getting some how very interesting and frustating at the same time.
    Bindu : I used the similar code that you gave me that works perfect it removes the rows data that I do not need but retains the format for exmple the STYLES that I applied for the data and header data
    Arya : The cube has the 2 records and my below msg will clarify that the issue is not with this
    Aby : Yes even, I do not understand why the those 2 columns data with no key figure values
    Jeoffrey :
    - I checked 3- : Layout set to From Transaction data
    - I checked 4- restrictions (variables?)  may not be because ...see... my below observations........
    - I checked 5- ...may not be because ...see... my below observations........ BUT I am going through they
      are very interesting.
    Sappie :
    ...may not be because even for one material ...see... my below observations........
    More Facts :  Sorry I would have given this in the beginning.
    - I am running an adhoc package that contains an existing layout  which works perfect
    - When I copy layout and remove all the styles and macros still it works great
    - BUT when I create a new layout with exactly same setting NO CHANGE and run the SAME adhoc   package I get those material numbers repeating .........
    I have both the layouts in my PC and compared but did not see any difference , Can you please look at it if you think there could be something there ? Please send me you email I can email you.
    Again thank you for looking in to it, your replies are very logical.
    Regards,
    Raju

  • Another Dynamic header question, but this one is tricky. help!

    I have a prompt that has values like
    Version1
    Version2
    Version3
    Depending on the version selected, two general value columns called VALUE1 and VALUE2 need to have their headers changed.
    for example, if Version1 is selected then Value1 column heading should be Budget and Value2 heading should be Forecast.
    How can i achieve this? It seems a repository variable will not work. Also, I tried using one prompt based on another prompt but got stuck.

    You can do this
    prompt based on other prompt and writing a case statement
    Create a pv for pmt1 and write a case statement for  prompt2 passing the variable from first prompt
    case when '@{pv1}'='version1; then 'budget'... to the second pmt(pv2)
    once done, on the dashboard page edit the dashboard properties and we can put this second pmt as a dashboard filter and save the dashboard page
    now on the report column header use '@{pv2}' .Thats it.
    It should work.I have done this already!!
    Good luck.

  • Tricky specs to be followed...help needed

    Hi,
    I'm going to send out a documentary I have just edited with FCPX. it was my first "real" experience with this amazing software...
    I'm going to submit it to a docufestival which ask for a specific type of format...it seems a little tricky to me so I'm asking for you help: which steps I have to follow in order to comply with its standards?
    These are the specs:
    DCP (2K/4K).
    all DCPs to be in XYZ
    colorspace encoded in JPEG2000
    Thank you!

    Thank you! Now everything is clearer!
    there is just a little problem left...
    the software you suggested to use costs 699$ this doesn't fit my low (almost to zero) budget...
    plus I woukd be use it just once...
    do you know if there is anything cheaper or a service which can do it?
    thank you
    NP

  • Expert help needed with tricky query

    I have a query database with a real simple schema but a tricky requirement: i need to display records with a simple select but then filter the result based on the authority/access level of the user making the query.
    The source data is held in a table with just the following columns:
    SRCTABLE:
    subject_ID
    date
    data_ID
    data_item
    All column types are text strings and the first 3 are a composite key. There are 10s of millions of records in the table.
    The access authorization is held in another table with the following columns:
    ACCTABLE:
    data_ID
    access1
    access2
    accessn
    The ellipsis means there are as many (boolean type) access1...n columns as there are distinct access levels to the source data.
    The table contains one row for each distinct data_ID appearing in the source table. On each row the TRUE values in the access1...n columns indicate authorization to see the data item and the filter should leave that row in the result set.
    The question then is how to write the query statement? It is assumed that the access id (i.e. the relevant column) is known when the query is made.
    Something like
    SELECT data_item FROM SRCTABLE
    WHERE subject_ID="xxx" AND date = "1/1/2000";
    would do it except for the need to filter each row based on the access authorization of the user.
    Any help would be appreciated.

    Thanks everybody for responding.
    APC has a good point about really protecting every single item type separately. Unfortunately this is precisely the case. The security in this case is not oriented to increasing security in a levels oriented way. Rather each kind of item is protected by a need to know type security related to that particular item. Users are classified by their need to know a combination of the item types and those combinations are not in any sense consistent (and there will be new classes over time). This way access control necessarily becomes a matrix of item types vs access classes.
    Fortunately this particular database does not exist yet so i am free to solve the problem in any way that fulfills the requirement. This is just the suggested form. I am not entirely happy with it hence the question on this forum in the first place.
    So, i appreciate it should you have any further suggestions for optimal solution to handle the requirements. Again, those are:
    1. A query that returns the data_items for a given ID and date (this is dead simple)
    2. A filter (preferably in the query) that filters out those data_items the current user (his/her access class is known) is not authorized to see.
    3. The plan calls for a table listing every possible item type with a column for each access class, enumerating the items allowed for that class. Any other solution to this issue would be acceptable provided it is capable to independently validate any single item type against any access class.
    I hope this makes sense.

  • Need help in writing a tricky sql/PL/Sql Procedure

    Hi,
    I have a Branch table with just two fields in it node1 and Node2, The table looks like this
    node1 | node2
    -------|---------
    1 | 2
    3 | 2
    3 | 4
    4 | 5
    1 | 5
    1 | 6
    5 | 6
    in the above data if you draw lines between node_1 and node_2 you will see that there are 3 different paths to get from 1 to 5, as follows
    /--------6-------\
    1----------------------5
    \2------3-------4/
    Now I need to Find all the nodes between 1 and 5 or all the possible paths from node 1 to node 5 in this case I have 3 possible paths they are as follows
    1-2-3-4-5
    1-3-5
    1-5
    Now I know if this data was stored in a hierarchical manner I can get the results i want by using CONNECT BY and SYS_CONNECT_BY_PATH.
    Is there a way to transform this data into a hierarchcal manner so that I can use the CONNECT BY or can somebody give me an Idea as to how to write a PL/SQL procedure to get the result I want.
    Any help will be greatly appreciated

    Hi!
    1.Create another table Branch1 to hold 'transformed data'.
    2.Use the following procedure to insert data into branch1 table.
    declare
    cursor n is select * from branch;
    begin
    for nrec in n loop
    if nrec.node1 = 5 then
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    elsif nrec.node2= 5 then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    else
    if      nrec.node2> 5      then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    elsif nrec.node1> 5 then
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    elsif (nrec.node1 < nrec.node2 ) then
         insert into branch1(node1,node2) values(nrec.node1,nrec.node2);
    else
         insert into branch1(node1,node2) values(nrec.node2,nrec.node1);
    end if;
    end if;
    end loop;
    commit;
    end;
    3.Then execute the following connect by query:
    SQL> select lpad(' ',level*2,' ')||node1 from branch1
    2 start with node1=1
    3 connect by prior node2=node1;
    Hope this is satisfactory.
    Thanks!

  • Need help brainstorming a tricky IMAGE issue

    Hi,
    I've been trying to figure out a simple way around an issue, but as i simply cannot come up with an answer, i thought I'd put it out to the community to see if i can get some ideas back.
    I'm putting a Mobile game together, and I'm still establishing the foundations of it. One element is the idea of having all creatures and character to be able to look different. To this end, my proposal is to have a set of various frames of say different creatures, and with other items (like armour and weapons) in matching poses. For example, You would have say a person running in 4 frames. For each frame, there is a matching set of clothes frames for each pose. One coule be normal clothes, and another armour so when the character is wearing normal clothes, the system would draw to the screen the naked character and then place the clothes over the top. Proper transparency (using the PNG alpha channel) makes this masking effect work as it should and it seems to work okay here.
    Here is the problem. What i want to do is to be able to represent say, a hiding creature as being partially transparent wether through alpha blending or dithering. I have put an efficient class together than can quickly resize and recolour any image and draw it to the screen, and can also modify the transparency via either alpha blending or dithering. Here is the issue: This will NOT work when building the characters onto the screen! the problem if no-one notices here is lets say you then make the system draw the person at 50% opacity to the screen.Great, it works, but now we need to put the clothers on top so we draw THAT at 50% transparency. Uh-oh... Because the clothers are transparent, we get an artifact of the naked character shining through the clothers we just placed on top. So, the solution WOULD be simple: create an offscreen image for buffering, draw the character to it, then draw the results to the screen at 50% opacity... WRONG. The only Mutable off-screen image you can make is one filled with white pixels! Useless: we get an ugly white box around the character.
    The only two solutions i can think of are the following:
    1) Take a snapshot of the box around where we intend to draw the character. This should capture the background. We now build the character onto the screen as we normally would but if we want to make them transparent, we then paste the original background image over the top at a sertain opacity. I see problems with this being a) The design on the game is already very lean on memory requirements. I have built my own image handling classes that only load stuff when needed and discards it when no longer needed and also block wasteful reloading of images into memory, but having to always take a snapshot of a box around a character prior to drawing will slow it all down immensly.
    2) the class i use for transformations, recolouring and resizing does so by copying the image data into an array and then manipulating it. I've designed it very well so that it only ever holds one image at a time and loading a new image into it uses the same array and thus, never creates a new array in memory and then relying on the Garbage collector to reclaim it. Using this, i could render the characters to it, and then draw it to screen but the problem as i see it is that this would be very processor intensive and would most likely slow the entire system down.
    Naturally, the ideal solution is to draw to an offscreen image buffer and go from there, but i think the only way to do that is to use the BufferedImage which is on an API that isn't widely available (at least, it's not on my phone and it is pretty new). I need this to be as compatible as possible, so i don't want to access any optional API's i don't need to. I would prefer to be able to do this transparency trick, but if i can't, i guess i would have to find another way to represent a hiding character in the game (I guess a Black silouette).
    Any help, hints or ideas would be greatly appreciated!

    Okay, imagine you have a character running. The whole purpose of my design idea is to have it so the characters look different based on the gear they are equipped with (+Image a common game like Neverwinter nights, or WoW. Your character looks different based on what they are equipped with and no, I am not trying to create a game of that scale on a Mobile phone+). Naturally, the character isn't a static figure, so they move, run, attack and so fourth. My plan is to have a set of character frames in all the different frames, and matching clothes and equipment frames matching each cell (+we KNOW where their arm will be in the 2nd frame of a run-right action, so we would position say, a shield in the right spot. A clever appraoch is to be taken here for example, a right handed person would weild their shield in their left hand, and if they are running right, the shield would appear behind them and would be facing out, so the system would draw it in the order of "Left_Hand_Item->Character_in_the_Nude->Clothes_for_the_Character->Right_Hand_Item". Simple mirroring can handle any left/right directions as the frames for running in the different directions are also mirrored+). Essentially, the look of the character would need to be built on a per-frame basis. I am hessitant to build all of the frames of the character in memory at load time as I have the following action factors:
    - The character can face in 8 directions being all the diagonals, Vertical and horizontal directions.
    - The character needs the following actions to be available: Running, Standing, Dying -> On the ground (+This also counts falling down or sleeping+), Attacking / Swinging, Ranged attacks (+bow and arrow+).
    - To at least offer some kind or animateable look, there should be at least 2 frames for each action.
    As you can see, there is quite a lot. The approach i have already taken is fairly powerful. I decided to scrap the Java Sprites as it couldn't do what i needed it to do so i created my own caching system. A special MAP file stores the information on all the frames, and another class retrieves this on demand from the file, but only takes certain chunks. A initial class manages file access and loads the entire image into memory, and another uses this class to extract the frame it wants. When the other class is finished, the file-opening class then drops the full file from memory and attempts to reclaim the used memory. So far, it works well. The reason i have taken this appraoch is there is just too much data to have it all laoded into memory, it has to be done on demand and store as little information as possible. If i can represent 5 different characters by using a combination of other frames, i should have excellent results. I am trying to find a good balance between memory consumption and CPU usage. So, in a long winded answer:
    --There are a LOT of frames that may need to be transparent at any one time.
    --The amount of memory I'll need is still in the air at this point. As i build it, I am keeping a hawk-like eye on memory consumption and watching for anything being wasted (+using boolean where possible, If i don't need the capacity of an int, i use byte instead, etc+). This incidently ran me into the strong desire to utilize unsigned values as i don't need negatives anywhere, but I will have to live with that wasted bit.
    --I am aware that not all devices support Alpha blending which is why I also aim to support dithering. For example at 50% transparency, more than half the pixels are fully transparent (+Some may already be transparent, so we're not going to go and make them visible!)+
    --The transparent character is used to represent a character that is hiding. For example, you may have an Ally character being stealthy, so to make sure YOU the player can still see them, but represent clearly that they are in a special state, i wanted them to be transparent. Also, if there is an enemy stealthing, but you have detected them. I need to be able to represent that they have indeed been detected and that they can be seen, but they are still trying to be stealthy. So yes, one substitute would be to make them entirely black pixels and maybe even just draw the naked character black without any armour or equipment as a stealthing character would assume reduced detail.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Please clarify on these queries(tricky questions)...Waiting for Help

    Hi Guys,
    Can you please clarify me on the below queries please,these are all like Trickey questions
    {color:#000080}*1)How to Design a datastructure that will hold <{color:#800080}value,key{color}>, if you give the value it will return key.*
    *2)If we have package dependency then we need to prefer interface or abstract class? and why*
    *3)An array has 1000 elemnets how to find a particular number in effective way.*
    *4)If we have 1000 elements in HashMap, How to optimise*
    {color}
    Please help me on this.
    Hoping for your reply..
    Thanks In Advance,
    Anji

    Do your own homework.
    [_How to ask questions the smart way_|http://catb.org/~esr/faqs/smart-questions.html]
    db

  • Help with a tricky sql

    ** Consider the following table; we'll name this 'entities' for
    the following discussion.
    ENTITY FORM DEPTH EQUIV SOURCE
    100012802307W502 DVNU 1458 14399 GOVT
    100012802307W502 DVNU 1458 14399 IPL
    100012802307W502 PLSR 1455 14399 GOVT
    100012802307W502 PLSR 4238 14399 wayrig
    100012802307W502 PLSR 4450.4 14399 GOVT
    100012802307W502 PLSR 4788.3 14399 GOVT
    101070403227W300 BGVL 800 14399 GOVT
    101070403227W300 DVNU 855.3 14390 IPL
    101070403227W300 DVNU 855.6 14399 GOVT
    ** The goal
    For each unique ID (only 2 in the above example table: 100012802307W502
    and 101070403227W300)
    We need to get a single 'formation pick'.
    Without going into details, 'formation pick' is an industry term and
    in our example, a formation pick is identified by the FORM attribute.
    ** The Problem
    Given the above, the question which I need to answer is
    for each unique ENTITY, I want to get the PLSR formation pick.
    If for any ENTITY, there is not a PLSR pick, but there is
    an EQUIVALENT pick then for that ENTITY, we want that equivalent pick
    (in our example above, all FORM which have the same EQUIV value are
    considered equivalent; thus for 100012802307W502, there are PLSR picks
    while for 101070403227W300, there are not but there are equivalent
    picks (DVNU and BGVL)
    The picks are to be selected based on a priority
    top priority is given to SOURCE wayrig
    If a given pick does not have a wayrig, SOURCE, then accept IPL
    Finally, if neither the wayrig, or IPL SOURCE are available,
    accept the GOVT pick
    Thus, for 100012802307W502, where there are multiple PLSR picks, we
    want the one with the highest available priority
    (the 100012802307W502 PLSR 4238 14399 wayrig)
    row
    For 101070403227W300, which does not have a PLSR pick, we need to consider
    the qualifying equivalent picks and the highest applicable priority for
    these picks is where SOURCE = GOVT -> rows
    101070403227W300 BGVL 800 14399 GOVT
    101070403227W300 DVNU 855.6 14399 GOVT
    Thus, the final condition that
    should there be 2 or more picks whose priority is the same, then we
    want the one with the shallowest DEPTH
    row
    101070403227W300 BGVL 800 14399 GOVT
    Thus the desired final results
    ENTITY FORM DEPTH EQUIV SOURCE
    100012802307W502 PLSR 4238 14399 wayrig
    101070403227W300 BGVL 800 14399 GOVT
    ** Constraints
    It is most desireable to achieve this without having to create
    physical tables and/or views as the query(ies) must run against
    a public database where users do not have create table privileges.
    If anyone has solutions that include physical tables, please submit
    these anyways as they may help us devise the ultimate approach that
    we are seeking.
    More info (in case this is helpful)
    I have been working on this and variations of this problem for
    a little while.
    Here is a query that was submitted to me via this discussion group
    sometime ago on a similar problem
    select ENTITY, FORM, MIN(DECODE ( SOURCE,'wayrig',1,'IPL',2, 3)) PICK_PRIORITY
    from entities
    where EQUIV = '14399'
    GROUP BY ENTITY, FORM
    ENTITY FORM PICK_PRIORITY
    100012802307W502 DVNU 2
    100012802307W502 PLSR 1
    101070403227W300 BGVL 3
    101070403227W300 DVNU 3
    as you can see, the above query gets me partially where I need to go.
    Unfortunately, I have not been able to adapt the above query in such a
    way as to get the rest of the information related to the selected ENTITY;
    that is, the DEPTH, EQUIV, and SOURCE values are not present in the
    selected data.
    And of course, the above is only a piece of the puzzle as it does not
    get me a single row per selected ENTITY.
    Thanks for your consideration
    null

    "bounoe",
    I am a little bit confused, because what you are asking for and the sample result seem to be in slight conflict. What you ask for does not require that equiv = '14399', but your results seem to.
    So, if equiv must equal '14399', then
    SELECT DISTINCT entity, form, depth, equiv, source
    FROM entities
    WHERE equiv = '14399'
    AND (entity,
    DECODE(form,'PLSR',1,2),
    depth,
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)) IN
    (SELECT entity,
    DECODE(form,'PLSR',1,2),
    MIN(depth),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)
    FROM entities
    WHERE equiv = '14399'
    AND (entity,
    DECODE(form,'PLSR',1,2),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)) IN
    (SELECT entity,
    DECODE(form,'PLSR',1,2),
    MIN(DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4))
    FROM entities
    WHERE equiv = '14399'
    AND (entity,DECODE(form,'PLSR',1,2)) IN
    (SELECT entity,
    MIN(DECODE(form,'PLSR',1,2))
    FROM entities
    WHERE equiv = '14399'
    GROUP BY entity)
    GROUP BY entity,DECODE(form,'PLSR',1,2))
    GROUP BY entity,
    DECODE(form,'PLSR',1,2),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4));
    ENTITY FORM DEPTH EQUIV SOURCE
    100012802307W502 PLSR 4238 14399 wayrig
    101070403227W300 BGVL 800 14399 GOVT
    If equiv need not equal '14399':
    SELECT DISTINCT entity, form, depth, equiv, source
    FROM entities
    WHERE (entity,
    DECODE(form,'PLSR',1,2),
    depth,
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)) IN
    (SELECT entity,
    DECODE(form,'PLSR',1,2),
    MIN(depth),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)
    FROM entities
    WHERE (entity,
    DECODE(form,'PLSR',1,2),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4)) IN
    (SELECT entity,
    DECODE(form,'PLSR',1,2),
    MIN(DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4))
    FROM entities
    WHERE (entity,DECODE(form,'PLSR',1,2)) IN
    (SELECT entity,
    MIN(DECODE(form,'PLSR',1,2))
    FROM entities
    GROUP BY entity)
    GROUP BY entity,DECODE(form,'PLSR',1,2))
    GROUP BY entity,
    DECODE(form,'PLSR',1,2),
    DECODE(source,'wayrig',1,'IPL',2,'GOVT',3,4));
    ENTITY FORM DEPTH EQUIV SOURCE
    100012802307W502 PLSR 4238 14399 wayrig
    101070403227W300 DVNU 855 14390 IPL
    If neither of these is exactly what you need, please let me know.
    Barbara
    null

  • Please help with tricky query

    I need help with SQL query (if it can be accomplished with query at all).
    I'm going to create a table with structure similar to:
    Article_Name varchar2(30), Author_Name varchar2(30), Position varchar2(2). Position field is basicly position of an article author in the author list, e.g. if there is one author, his/her position is 0, if 2, then 1st author is 0, second is 1, etc.
    Article_Name Author_Name Position
    Outer Space Smith 0
    Outer Space Blake 1
    How can I automate creation of Position, based on number of authors on the fly? Let's say I have original table without Position, but I want to create a new table that will have this information.
    Regards

    If you have an existing table whose structure doesn't tell you what position the author is in, what's the algorithm you'd use to determine who was the first author, the second author, etc? If you issue a select query on a table without providing an "order by" clause, Oracle makes no guarantees about the order in which it retrieves rows.
    As an aside, why would you store position number in a varchar2 field? If it's a number, it ought to be stored as a number.
    Justin

  • Case statement help needed bit tricky

    I have a requirement for a Column Quarters which will idenitfy records based on their service and paid paids.
    Output of Column should be
    QTR
    FSY2015Q1
    Our Quarters start like this Q1= 9/1 /2014-11.30.2014 , Q2 12/1/2014 -02/28/2015, Q3: 3/1/2015 - 05/31/2015 Q4:06/01/2015 -08/31/2015.
    With the below Case statement  records that hit Q1 should be for the FSY upcoming.  records  in Sept, Oct, November of 2014, would actually be for FSY15Q1  (not FSY14Q1).   How can i correct
    this ?
    case
    when datepart(mm, Service_Through_Date ) between '9' and '11' and datepart(mm, c.paid_date ) between '9' and '11'
    Then 'Q1 '
    when datepart(mm, Service_Through_Date ) in ('01','02', '12' ) and datepart(mm, paid_date ) in ('01','02' , '12' )
    Then 'Q2 '
    when datepart(mm, Service_Through_Date ) between '03' and '05' and datepart(mm, paid_date ) between '03' and '05'
    Then 'Q3 '
    when datepart(mm, Service_Through_Date ) between '06' and '08' and datepart(mm, paid_date ) between '06' and '08'
    Then 'Q4 '
    else ' ' end + ' ' + 'FSY ' + '' + cast(datepart(Year, Service_Through_Date)as char(7)) as QTR
    FM

    Your best bet here is going to be to create a calendar table, which has your quarters in it.
    I wrote an article on them here: http://social.technet.microsoft.com/wiki/contents/articles/29260.tsql-calendar-functions-and-tables.aspx.
    For your particular scenario you'll need to add a column to the existing code, something like this:
    SELECT CASE WHEN DATEPART(MONTH,@date) IN (9,10,11) THEN 'FSY'+RIGHT(YEAR(@date)+1,2)+'Q1'
    WHEN DATEPART(MONTH,@date) IN (12) THEN 'FSY'+RIGHT(YEAR(@date)+1,2)+'Q2'
    WHEN DATEPART(MONTH,@date) IN (1,2) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q2'
    WHEN DATEPART(MONTH,@date) IN (3,4,5) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q3'
    WHEN DATEPART(MONTH,@date) IN (6,7,8) THEN 'FSY'+RIGHT(YEAR(@date),2)+'Q4'
    END AS fiscalQuarterName
    Once you have this column, you can simply join to the calendar table:
    SELECT service_through_date, paid_date, sc.fiscalQuarterName, pc.fiscalQuarterName
    FROM myTable t
    INNER JOIN calendar sc
    ON t.service_through_date = c.today
    INNER JOIN calendar pc
    ON t.paid_date = pc.today
    If you can't, or don't want to impliment this, you could solve the issue in your cast statement by moving the year into the CASE, like this:
    SELECT CASE WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 9 AND 11 AND DATEPART(MONTH, c.paid_date) BETWEEN 9 AND 11 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date)+1,2)+'Q1'
    WHEN DATEPART(MONTH, Service_Through_Date ) = 12 AND DATEPART(MONTH, c.paid_date) = 12 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date)+1,2)+'Q2'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 1 AND 2 AND DATEPART(MONTH, paid_date) BETWEEN 1 AND 2 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q2'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 3 AND 5 AND DATEPART(MONTH, paid_date) BETWEEN 3 AND 5 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q3'
    WHEN DATEPART(MONTH, Service_Through_Date ) BETWEEN 6 AND 8 AND DATEPART(MONTH, paid_date) BETWEEN 6 AND 8 THEN 'FSY'+RIGHT(YEAR(Service_Through_Date),2)+'Q4'
    ELSE 'FSY'+RIGHT(YEAR(Service_Through_Date),2)
    END
    Don't forget to mark helpful posts, and answers. It helps others to find relevant posts to the same question.

  • I need help whit this tricky problem:)

    Hi guys!
    I'm working with a webshop where i receive a tons of pictures from another company. Unfortunately they send me other pictures what i don't need. So i made a list from the files (like a list.txt) what i don't need and i want to write a script to move these files to another folder. How should i do this?
    Thx for your help!

    Prefi wrote:
    So i made a list from the files (like a list.txt) what i don't need and i want to write a script to move these files to another folder.
    So far I believe you have a bunch of photos (in a folder?) and you want to take specifically titled photos and move them to another folder?
    Alright so you have a folder that as an example contains:
    hello.jpeg
    welcome.jpeg
    goodbye.jpeg
    yes.jpeg
    no.jpeg
    Now you want to move welcome.jpeg and goodbye.jpeg to a new folder?
    Is this along the lines of what you want to do?

  • Stop motion animation help using images from a digital camera...how tricky is this?

    I'm teaching a media arts course for the first time, and I'm trying to figure out how to use images taken with a digital camera, import them to Premiere Elements 7, and put them in the timeline without having to shorten the length of them.  As soon as I drag an image from the project bin onto the timeline, it automatically plays for 5 seconds, and I have to try to shorten it to one frame length.  If that's what it takes, this process is going to take a lot of time, because the students are going to be taking several hundred photos.  If I edit them in the preview, it's still just as difficult.  Is there any way to change the settings before I import the images so that they automatically are one or two frames in length on my timeline?  Your help would be GREATLY appreciated. 

    Welcome to the forum.
    As Steve points out, setting the Edit>Preferences>Still Duration BEFORE Importing, will get what you want.
    When doing Stop-Motion, I find that a Duration = 3 to 5 Frames, works best, but that will depend on the images, how far apart, they were shot, and the exact effect that I want. It might take a little experimenting, to get things correct to both your eye, and to the images from the camera.
    Also, Scaling the Still Images, prior to Import is a very, very good idea, and especially so, with Stop-Motion, as you will have lots of them.
    Good luck,
    Hunt
    PS - if you are using Transitions, between the Still Images, you will want to alter the Duration of those too, prior to applying them.

  • Search help Tricky One

    Dear Friends,
    Go To SE 11
    i have a structure cobl_ex
    i have assigned a check table m_premk
    when i do this..
    The Origin of the input Help is "Input help implemented with check table"
    but
    when i attach search help "prem" to the same field pernr...
    the status changes to "Explicit search help attachment to field"
    why does this change
    i need check table "m_premk" and search help "prem" with origin of I/P help as "Input help implemented with check table"
    ho do i achieve this?
    You can see BFPF-BUKRS check table "T001"  "Input help implemented with check table" Search Help "C_T001".
    Please guide.
    Regards,
    Essam

    You have to do it this way
    1) Create a custom search help Z_M_PREMK with reference to view M_PREMK with required fileds.
    2) Then go and change the SAP search help PREM to include your Z_M_PREMK in it.
    3) Attach your PREM search help to the COBL_EX table, now it should give you both the options of PREM and also Z_M_PREMK.
    I suppose you are changing SAP standard object COBL_EX structure.
    Hope this helps.
    Fra
    reward and inspire

  • Tricky Loop code help

    Hey all, I could use some help with this.
    So my current code auto adjusts, and resizes a group of text.
    I'm looking to convert it to a loop so I can make it generate more text fields without breaking it.
    and I'm scratching my head on how to structure it.
    addEventListener(Event.ENTER_FRAME,patchSpacingFun);
    function patchSpacingFun(event:Event)
    patTexArr1["pp2"].x = patTexArr1["pp1"].width + patTexArr1["pp1"].x;
              patTexArr1["pp3"].x = patTexArr1["pp2"].width + patTexArr1["pp2"].x;
              patTexArr1["pp4"].x = patTexArr1["pp3"].width + patTexArr1["pp3"].x;
              patTexArr1["pp5"].x = patTexArr1["pp4"].width + patTexArr1["pp4"].x;
              patTexArr1["pp6"].x = patTexArr1["pp5"].width + patTexArr1["pp5"].x;
              patTexArr1["pp7"].x = patTexArr1["pp6"].width + patTexArr1["pp6"].x;
              patTexArr1["pp8"].x = patTexArr1["pp7"].width + patTexArr1["pp7"].x;
              patTexArr1["pp9"].x = patTexArr1["pp8"].width + patTexArr1["pp8"].x;
              patTexArr1["pp10"].x = patTexArr1["pp9"].width + patTexArr1["pp9"].x;
              patTexArr1["pp11"].x = patTexArr1["pp10"].width + patTexArr1["pp10"].x;
              patTexArr1["pp12"].x = patTexArr1["pp11"].width + patTexArr1["pp11"].x;
    here is basically what I got started for the loop
    its supposed to make these from the PatchLims
    var patTexArr1:Array = new Array();
    for (var i:int =0; i<patchLims; ++i)
    thanks

    if patTexArr1 is a movieclip, use:
    var patchLims:int=11;
    for (var i:int =1; i<patchLims; i++)
    patTexArr1["pp"+(i+1)]=patTexArr1["pp"+i].width+patTexArr1["pp"+i].x;

Maybe you are looking for

  • An error has occurred: Could not find the document.

    I get the "An error has occurred: Could not find the document." error when trying to open a URL using OpenDocument.  The URL is as follows: http://:<myserver>8080/BOE/OpenDocument/opendoc/openDocument.jsp?iDocID=AZjCUhaL3c9Is.YxtGMc7K4&sIDType=CUID I

  • Copying layers from one document to another

    Hi using Cs6, locked down all the layers I didnt want to copy across, select all, copy .. new document select paste remembers layers, paste in front, all layers beautifully copied but I cant see any of them on the artboard, only in the layers panel. 

  • Performance issue when moves child component

    Hi      I am using flex 3.5. When i moved a HBox(with 150 labels and textinputs), from container A to B, it takes lot of time. Any ideas Or tricks to improve the performance. Thanks, Sathyamoorthi.

  • Timestamp field in Generic Data sourcce.

    Hi All, i have created a generic datasource using tables vbrp,vbrk.mara,marc,knvv.. to get the sales data for planning.Here i have document created date and time.So i'm concatinating these 2 date and time fields into timestamp which is of format yyyy

  • Frequently need to clear ARP in order to access internet

    We have installed an ASA5512 behind a Comcast cable modem. Users are able to browse to the internet for 5-10 minutes before their sessions hang.  Clearing of ARP, "clear arp" re-enables the ability to access the internet, but only for 5-10 minutes. I