Working with result set i need a solution..... plz treat it as urgent
i have a query which returns 12 records so the result set contains 12...
now i want to display in the set of 5 rows... so
out put must me
Name Rate Name Rate Name Rate
1 6 11
2 7 12
3 8
4 9
5 10
how can i achieve this output...
I guess this will clear the question......
You create a for loop that indexes from 1 to 5. You get a row(item) from the result each time through the loop. You all check next() and break out of the loop when it returns false.
Similar Messages
-
For another program (WASY WGeo) after the working with PS CC I need a picture with the right colours in the end with 256 colours in 8 bit per picture - I still got it until yesterday. I don´t know what I´ve done wrong in PS CC but I´m still working in mode with 8 bit RYB. I controlled my result with Irfan View: it´s a picture with 16,7 million colours and 56 bit pp.
Topic or subject titles should be clear, pertinent and concise so that individual users can tell at a glance if they can help or not.
That field is not for attempting to fit your entire question in there.
Please keep this in mind next time you post. Thank you. -
Does break work for result set ?
while(rs.next())
if(true)
break; // does break work for result set ?
break is not working when i wanted to go out of while loop like above. how can i go out when condition matches ?Well this is what i learned and i'm learning in
school.So what does your school tell you is the only correct indenting style?
The "break or not" discussion has been around ever since, and there is no agreed-upon solution that says "always do it" or "never do it".
You don't have to write nice code. The important
thing is that you code's performance! This is complete bullshit.
You client will never read your code, (only if it is
open source or a script).But the guy who maintains it. Sorry, but this is really ignorant. Unclear code will lead to bugs that are difficult to find and resolve. "Optimizations" will lead to more bugs.
This all leads to longer development time, late project and increased project and maintenance costs. Ask your customer if he really wants that. -
Hi there ,
Can any one please tell me that how do we work with BC sets & how can we use that to migrate the data from one system to other system....
Regards
KaushikPls go through this document.it is very useful
http://help.sap.com/saphelp_46c/helpdata/en/d2/a22237406d183fe10000009b38f889/frameset.htm
http://sapabaplive.blogspot.com/2007/12/create-bc-set-from-transport-request.html
if it is useful reward some points -
My chosen site won't work with fp11. I need to revert to a fp10
My chosen site won't work with fp11. I need to revert to a fp10. I doubt I can copy and navigate lines of text and symbols to remove something completely and try to see what choice to use to replace it, and ever suceeed.
See How do I revert to a previous version of Flash Player?
-
Hi , I have problem with my iphone 4s the wifi I can't put it on or off it's not worked with me , so what can I do plz answer me as soon you can
if it wont turn on or off the wifi ground connector could be loose. backup and restore the phone to new and see if it works then if not take to someone who fixes iphones
-
Issue with result set of query
I have the following tables:
--soccer.soccer_optical_player_gm_stats
--This is only sample data
GAME_CODE PLAYER_ID NUMBER_OF_SPRINTS
88884 84646 55
88884 64646 15
88884 55551 35
88884 88446 10
etc...--soccer.soccer_optical_team_gm_stats
--This is only sample data
GAME_CODE TEAM_ID
88884 13
88884 13
88884 15
88884 13
etc...--customer_data.cd_soccer_schedule
--sample data
GAME_DATE 5/2/2009 7:30:00 PM
GAME_CODE 88884
GAME_CODE_1032 2009050207
HOME_TEAM_ID_1032 13
HOME_TEAM_ID 5360
HOME_TEAM_NAME Los Angeles
HOME_TEAM_NICKNAME Galaxy
HOME_TEAM_ABBREV LA
AWAY_TEAM_ID_1032 15
AWAY_TEAM_ID 5362
AWAY_TEAM_NAME New York
AWAY_TEAM_NICKNAME Red Bulls
AWAY_TEAM_ABBREV RBSo using the tables above i'm trying to sum the number of sprints for each team and output it...
With the following code:
select distinct
sch.game_date,
tm.team_id,
sch.game_code,
sch.game_code_1032,
sch.home_team_id_1032,
sch.home_team_id,
sch.home_team_name,
sch.home_team_nickname,
sch.home_team_abbrev,
sch.away_team_id_1032,
sch.away_team_id,
sch.away_team_name,
sch.away_team_nickname,
sch.away_team_abbrev,
home_tm_sprints,
away_tm_sprints
-- bulk collect into distance_run_leaders
from
customer_data.cd_soccer_schedule sch,
soccer.soccer_optical_team_gm_stats tm,
select distinct
sum(plyr.number_of_sprints) as home_tm_sprints,
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code,
rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_home
from
soccer.soccer_optical_player_gm_stats plyr,
soccer.soccer_optical_team_gm_stats tm,
customer_data.cd_soccer_schedule sch
where sch.season_id = 200921
and tm.team_id = sch.home_team_id
and sch.game_code = plyr.game_code
group by
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code
order by rankings_order_home asc
) home_team,
select distinct
sum(plyr.number_of_sprints) as away_tm_sprints,
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code,
rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_away
from
soccer.soccer_optical_player_gm_stats plyr,
soccer.soccer_optical_team_gm_stats tm,
customer_data.cd_soccer_schedule sch
where sch.season_id = 200921
and tm.team_id = sch.away_team_id
and sch.game_code = plyr.game_code
group by
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code
order by rankings_order_away asc
) away_team
where sch.game_code = tm.game_code
and sch.season_id = 200921Issues:
1. The output above returns multiple entries(like 30 or so) for each game_code (i only want two entries returned for each game_code).
--(Only difference between the two result sets is the team_id, which ultimatly lets me know if it a result for the home or away team)
Something like:
GAME_DATE 5/2/2009 7:30:00 PM 5/2/2009 7:30:00 PM
TEAM_ID 13 15
GAME_CODE 88884 88884
GAME_CODE_1032 2009050207 2009050207
HOME_TEAM_ID_1032 13 13
HOME_TEAM_ID 5360 5360
HOME_TEAM_NAME Los Angeles Los Angeles
HOME_TEAM_NICKNAME Galaxy Galaxy
HOME_TEAM_ABBREV LA LA
AWAY_TEAM_ID_1032 15 15
AWAY_TEAM_ID 5362 5362
AWAY_TEAM_NAME New York New York
AWAY_TEAM_NICKNAME Red Bulls Red Bulls
AWAY_TEAM_ABBREV RB RB
HOME_TM_SPRINTS 152 152
AWAY_TM_SPRINTS 452 4522. In addition to that, I'm also having an issue trying to figure out how to do a general ranking...in the from clause i'd so a seperate ranking for just the home teams and just the away the teams. I can't seem to figure out how to merge the rankings into one, and just have one general ranking.
Edited by: user652714 on May 7, 2009 4:18 PM
Edited by: user652714 on May 8, 2009 7:14 AMok maybe I just need to give you a better understanding of what i'm trying to ultimatly do, and maybe that will help clarify things.
In the original code I posted the following subquery in the from clause...
select distinct
sum(plyr.number_of_sprints) as home_tm_sprints,
sch.game_code,
sch.home_team_name as home_team_name,
sch.game_code,
rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_home
from
soccer.soccer_optical_player_gm_stats plyr,
soccer.soccer_optical_team_gm_stats tm,
customer_data.cd_soccer_schedule sch
where sch.season_id = 200921
and tm.team_id = sch.home_team_id
and sch.game_code = plyr.game_code
group by
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code
order by rankings_order_home asc the result set was this...
HOME_TM_SPRINTS GAME_CODE HOME_TEAM_NAME GAME_CODE RANKINGS_ORDER_HOME
576 870988 New York 870988 1
480 870991 Chicago 870991 2
435 870945 Chicago 870945 3
416 870983 San Jose 870983 4
402 870961 D.C. 870961 5
322 870972 Columbus 870972 6
236 870957 Columbus 870957 7
215 870986 Kansas City 870986 8
143 870984 Los Angeles 870984 9Here is the other subquery that i had originally posted:
select distinct
sum(plyr.number_of_sprints) as away_tm_sprints,
sch.game_code,
sch.away_team_name away_team ,
sch.game_code,
rank () over (order by sum(plyr.number_of_sprints) desc) as rankings_order_away
from
soccer.soccer_optical_player_gm_stats plyr,
soccer.soccer_optical_team_gm_stats tm,
customer_data.cd_soccer_schedule sch
where sch.season_id = 200921
and tm.team_id = sch.away_team_id
and sch.game_code = plyr.game_code
group by
sch.game_code,
sch.home_team_name,
sch.away_Team_name,
sch.game_code
order by rankings_order_away ascResult rest:
AWAY_TM_SPRINTS GAME_CODE AWAY_TEAM GAME_CODE RANKINGS_ORDER_AWAY
483 870972 Chicago 870972 1
435 870945 New York 870945 2
430 870986 D.C. 870986 3
429 870984 New York 870984 4
402 870961 New England 870961 5
384 870988 San Jose 870988 6
320 870991 New England 870991 7
208 870983 Chivas USA 870983 8
118 870957 Colorado 870957 9Final output that I want/trying to get
TM_SPRINTS GAME_CODE TEAM GAME_CODE RANKINGS_ORDER
576 870988 New York 870988 1
483 870972 Chicago 870972 2
480 870991 Chicago 870991 3
435 870945 Chicago 870945 4
435 870945 New York 870945 4
430 870986 D.C. 870986 6
429 870984 New York 870984 7
416 870983 San Jose 870983 8
402 870961 D.C. 870961 9
402 870961 New England 870961 9
384 870988 San Jose 870988 11
322 870972 Columbus 870972 12
320 870991 New England 870991 13
236 870957 Columbus 870957 14
215 870986 Kansas City 870986 15
208 870983 Chivas USA 870983 16
143 870984 Los Angeles 870984 17
118 870957 Colorado 870957 18The above is what i'm going for...but if it's to difficult to merge the columns into one (instead of having a seprate column for home_team_* and away_team_* that's fine to.
Edited by: user652714 on May 11, 2009 9:04 AM -
Work with result of a select in an external Java Program
Hi!
i would like work with a field of a select in a external java program. I give you an example:
i want copy a table into another table, but i want do a little modification (before insert action) in one parameter via Java class wich parameter is a field in the select.
Example:
i've two tables:
TABLE_BACK (ID, CARACT)
TABLE_NEW (ID, CARACT)
and i've a java Method in an external class com.upc.myClass.modifyCaract(String paramS)
Then, before insert a row in table_new, i want do a transformation in Caract field from table_back. I want do something like this:
INSERT INTO TABLE_NEW (ID, NAME) ( SELECT ID, <%=com.upc.myClass.modifyCaract('I WANT HERE CARACT FIELD FROM TABLE_BACK') FROM TABLE_BACK )
is it possible? how can i do it?
Thanks!!
Message was edited by:
valdomirHola Valdomir,
Que tal estas? Ya ha empezado el calor en Barcelona ? jejejejejejej
Well, I think to be possible do what you need.
1) In a procedure step, at source tab query the values, something like:
select caract as MY_CARACT from TABLE_BACK
2) at target tab, use the tags "<@ @>" to import the java class (after put it in the correct ODI directory).
3) at same target tab, after the tag just write (as your example):
INSERT INTO TABLE_NEW (ID, NAME) ( SELECT ID, <@=com.upc.myClass.modifyCaract('I #MY_CARACT) FROM TABLE_BACK )@>
I think this will be enough....
Un saludo,
Cezar Santos -
Hello,
First I am using Dreamweaver CS4 and working with the built in data table templates. I am using the spotlight with detail area option. I have it working fine and the data displays correctly. However there are no labels generated with the data. An example is a phone number shows as 123-456-7890 just as it is in the data table, but I would like a label for that field to show the output as Cell Phone: 123-456-7890.
Any help would be greatly appreciated. I know I am probably missing something rather simple.
MJMolloy01Well, I figured the solution out myself. I guess a little peace and quite will always help work through the issue. I found that if I go into code mode and insert a label tag in front of the dynamic data it works fine.
If there is an easier way of doing this feel free to explain.
Thanks,
MJMolloy01 -
Have this message constantly. I'm working with PS CC2014 - OSX 10.10. Any solutions?
Have you printed to this printer from 10.10 before? If so, check your connections.
-
Those the iphone 5s unlock works with LTE or you need an especific model for that
i need to know if all iphone 5s unlock works with LTE only or you need to get an especific model please?
If you wish to use Verizon, you must buy a Verizon-specific iPhone, and those are only available in the US. Verizon will not allow phones purchased elsewhere onto their networks.
Regards. -
Quickpaint reports not working with assignment set defined with criteria
Hello,
I have a problem with quickpaint reports in HRMS. When i run quickpaint report against assignment set defined with criteria it reports following error: APP-PAY-06867 An error occurred during formula execution FFX00_DATA_NOT_FOUND (assignment criteria was &ASG_LOCATION=New York).I defined several assignment sets with different criteria and i always get the same error when i run any quickpaint report.
The same Quickpaint report works well with assignment set defined by including individual assignment.
Thanks in advance!
best regardsThanks for uploading the sample reports.
I am not abe to reproduce the issue and the graphs generated in both the attached reports are the same except that the width of the graphs being displayed are different as seen in the below images.
ATML 5.1 Report Graph
XML Report Graph
Regards
Srivinayaka Pandurangan
National Instruments
With Best Regards,
Srivinayaka
National Instruments -
After downloading Maverick on the MacBook Pro that I bought in 2011, I am unable to open iPhoto. The message says "You can't use this version of the application "iPhoto" with this version of OS X. You have "iPhoto" 9.2.3" What??? That is ridiculous. Why doesn't Maverick download everything? I've tried the "fixes" I found on this forum, but none of them work for me, because there is no workaround via the library. I can't access the library.
I have an old iPhoto version and it still works with Mavericks, the version before yours, that is puzzling.
-
I'm using a 20" iMac that I purchased in 2007. It's running OS 10.4.11, and still doing beautifully. But I've got to get serious about upgrading and I don't want to lose the material that's on it. Purchased an external hard drive about two years ago, copied everything I wanted at that time on to it. When I tried using the h.d. a few days ago it was garbled. Now I see that inside the box it says that it requires OS 10.5+. Anyone know if there's still a new hard drive out there that would work with 10.4.11? Can't even find thumb drives to work with my system anymore. Any ideas would be appreciated.
If I were you I would bite the bullet and upgrade to Snow Leopard. You will still be able to use AppleWorks by installing the Rosetta emulator included in Snow Leopard. And, it's a much better OS version than Tiger.
Upgrading to Snow Leopard
You can purchase Snow Leopard through the Apple Store: Mac OS X 10.6 Snow Leopard - Apple Store (U.S.). The price is $19.99 plus tax. You will be sent physical media by mail after placing your order.
After you install Snow Leopard you will have to download and install the Mac OS X 10.6.8 Update Combo v1.1 to update Snow Leopard to 10.6.8 and give you access to the App Store. Access to the App Store enables you to download Mavericks if your computer meets the requirements.
Snow Leopard General Requirements
1. Mac computer with an Intel processor
2. 1GB of memory
3. 5GB of available disk space
4. DVD drive for installation
5. Some features require a compatible Internet service provider;
fees may apply.
6. Some features require Apple’s iCloud services; fees and
terms apply.
See App Compatibility Table - RoaringApps. -
Lenovo not working with samsung Lcd TV.need advice...
I am using a Lenovo 3000 N100 series AQ1 768 laptop.Its got no external graphics card.I want to connect it to my Samsung LA32B550 LCD TV via a vga cable.
I have all the hardware fixed but there seems to be something missing on the configuring section of the laptop settings that i am missing out on.I have installed the Presentation Director for lenovo 3000 series and also using the hotkey Function + F7 .still the problem persists and i do not get the output on the lcd screen.
One thing i should let you know is that as soon as i am turning on "attached" in the second monitor option in the display settings it turns active but when i say apply it reverts back to inactive.and the Presentation director says theres a configuration problem on the display.
Any help in this issue would be highly appreciated cause i the purpose of spending so much money on the LCD is to see the output on television of the animation work i do.Hence i need the output on screen .
Thanks a lot in advance.Hi, I am totally new to this kind of tech. I have been wanting to connect my Lenono n100 to an analogue LCD TV. I would like to watch streamline movie on the TV. Is this possible.
Can you tell me how to connect the n100 to your Samsun LCD TV via vga cable? What about S-video? does it work? thanks in advance
nabchak wrote:
I am using a Lenovo 3000 N100 series AQ1 768 laptop.Its got no external graphics card.I want to connect it to my Samsung LA32B550 LCD TV via a vga cable.
I have all the hardware fixed but there seems to be something missing on the configuring section of the laptop settings that i am missing out on.I have installed the Presentation Director for lenovo 3000 series and also using the hotkey Function + F7 .still the problem persists and i do not get the output on the lcd screen.
One thing i should let you know is that as soon as i am turning on "attached" in the second monitor option in the display settings it turns active but when i say apply it reverts back to inactive.and the Presentation director says theres a configuration problem on the display.
Any help in this issue would be highly appreciated cause i the purpose of spending so much money on the LCD is to see the output on television of the animation work i do.Hence i need the output on screen .
Thanks a lot in advance.
Maybe you are looking for
-
Hi, New build listed below. Works great 99% of the time. The only issue I have is infrequent random lock-ups. The lock-ups occur either during windows start-up, or randomly while doing some non-stressing task (like web browsing or word processing)
-
I really don't know computers. I have been working here now for three months and it is just me who works here so I can't ask anyone. It was working fine until all of a sudden when i press get mail i get: please enter a password for user ...... on ser
-
UPDATING PROBLEM CS 6 Hi I've been running cs6 for over twelve months with all updates going ahead notifying me of when available and me selecting an updating. I re-installed in February the whole CS6 suite no problems. Updates continued okay. Re-ins
-
ESS / MSS configuration guides on ECC6 and EP7
Can any one send the ESS/MSS configuration guide or documentation (Not sap help) for setting up self services applicaiton in ECC6 and EP7 environment. Thanks and regards Dhina
-
Best Practices - Dynamic Ranking, Dimension Values to Return, etc.
The pinned post says non-technical questions belong on the Business Forum. I can't find an Endeca-specific business forum. If there is one, please tell me where to find it. My question is about dynamic ranking and the initial display of only the top