Need help with if statements involving strings.
For this code, assume that I input a value that would make the boolean statement true. For some reason, this program will never return true. Can somebody please help me?
Scanner scan = new Scanner(System.in);
String personPlay;
boolean loop=false;
System.out.print("Enter a proper string(RPS): ");
personPlay=scan.nextLine();
if (personPlay=="R"||personPlay=="P"||personPlay=="S")
loop=true;
Don't use == to compare Strings. use .equals
if(personPlay.equals("R") || personPlay.equals("P") || personPlay.equals("S"))
loop = true;
}
Similar Messages
-
Need help with Object States or Buttons?
I currently work in InDesign to compile layouts and present design decks to clients. Our template includes an approval section (Not Approved, Revised, Approved) that we currently have as white/black bubbles that we change manually on each page. I've been trying to find a way to speed up this process. I know that in InDesign you can create buttons than you can then click on-off on your PDF - we used to do this but it is too time consuming (we have PDF's anywhere from 25-120 pages). I have been playing around with Object States, so we can quickly update the bubbles in InDesign itself as we work.
Does anyone know of a way to change the state of multiple objects on multiple pages at the same time? (For example, if I want to change all pages to "Approved" at the same time - or if I only wanted to do some, but not all, of the pages.)
Can anyone recommend any other InDesign tools that may be able to create a similar function for an "approval" stamp, but that still is done in InDesign (not in the PDF after exporting)?I was hoping that wouldn't be the only way. My have multiple master pages already, and not all pages will be "approved" at the same time. So we've run into issues with putting these on the masters as it gets easier to miss them.
-
Need help with If statement Please
Hi guys,
This is my first time posting and sorry if for some reason i post incorrectly.
I am having trouble figuring out what I am doing with my if Statement and why the compiler is giving me an error which says 'cannot find symbol';
Just incase you need to see the code here it is. And please any pointers would help me get back on track. And please dont laugh at the novice code i just started^^;
import java.util.*;
import java.text.*;
public class Student
public static void main(String[]args)
Scanner scan=new Scanner(System.in);
double std1, std2, std3, num1, num2, num3, num4;
String a, answer1, name1;
System.out.println("Welcome to _____ program, press any button to continue: ")
a=scan.nextLine();
System.out.println("Good, would you like to enter a grade for a student(y/n)?");
answer1=scan.nextLine();
if (answer1 == y)
System.out.println("Please enter the students name ");
name1=scan.nextLine();
System.out.println("Please label the test number ");
num1=scan.nextDouble();
System.out.println("Please enter the grade, "+name1+" recieved");
std1=scan.nextDouble();
if (answer1==n)
System.out.println("Thank you for trying my program ");
else
System.out.println("It's obvious you couldn't follow a simple direction good bye ");Thanks Flounder,
I'll keep in mind to edit the code the way you told me too.
As far as the code goes, what do you mean 'y' is not a string and should be a variable. All I'm trying to do is give a true false statement.
For example
if (input==y)
System.out.println("________");
And in my code it gives an error stating that y is a variable.
I dont understand why.
Thanks much for all your replies. -
Need help with update statement with multiple joins
I've got the following select statement that is pulling 29 records:
SELECT
PPA.PROJECT_ID,
PPA.SEGMENT1,
peia.expenditure_item_id,
peia.expenditure_type,
pec.expenditure_comment
FROM PA.PA_PROJECTS_ALL PPA,
pa.pa_expenditure_items_all peia,
pa.pa_expenditure_comments pec
where PPA.segment1 < '2008' and
PPA.project_id = 52 and -- just run for project # 20077119 for testing
peia.expenditure_type = 'PAYROLL' and
peia.project_id = ppa.project_id and
PEC.EXPENDITURE_ITEM_ID = PEIA.EXPENDITURE_ITEM_ID;
I need to update the pec.expenditure_comments to a static field for those 29 records. I assume I should start with the following, but not sure how to complete the where:
update
pa.pa_expenditure_comments pec
set pec.expenditure_comment = 'REFERENCE HD#728'
where
First time that we've ever needed to update, so any and all help appreciated.Try using exists:
update pa.pa_expenditure_comments pec
set pec.expenditure_comment = 'REFERENCE HD#728'
where exists ( select null
from pa.pa_projects_all ppa
, pa.pa_expenditure_items_all peia
, pa.pa_expenditure_comments pec2
where ppa.segment1 < '' -- not sure what you posted here, so for next time:
-- please put your examples between the code tags.
and ppa.project_id = 52 -- just run for project # 20077119 for testing
and peia.expenditure_type = 'PAYROLL'
and peia.project_id = ppa.project_id
and pec2.expenditure_item_id = peia.expenditure_item_id
and pec2.expenditure_item_id = pec.expenditure_item_id
); -
Need help with IF Statement!!!
I am trying to write an IF statement using FormCalc in LiveCycle. I have cell "tpe" which captures total points. I would like to assign levels based on the number of points achieved. For example, level I = 1001-1985; level II = 851-1000; level III = 551-850; level IV = <551. I want cell "level" to show either I, II, III or IV, based on the points in cell "tpe". How can I do this? I have zero familiarity with FormCalc or scrips in general. Can someone please help me with this? Would appreciate any help!! Thanks!
This is what it says:
topmostSubform.Page3.tpe::calculate - (FormCalc, client)
sum (rrtotal, programtotal, financetotal, leadershiptotal, executivetotal, meetingstotal, filestotal, brotherhoodtotal, conferencetotal, communicationstotal, minutestotal, standardstotal, basileustotal, abtotal, gramtotal, antigramtotal, tamtotal, pgramtotal, partotal, epistotal, torchtotal, hodtotal, phitotal)
if ($ > 1000 and $ <= 1985)then
level = "I"
elseif ($ > 850 and $ <= 1000)then
level = "II"
elseif ($ > 550 and $ <= 850)then
level = "III"
elseif ($ <= 550)then
level = "IV"
else level = ""
endif -
Need help with select statement or query
Not familiar with what to call it, but here is what i need...
To give our analyst a better idea of warranty on some of our
equipment, i
would like to add to the page a column that displays if the
device is still
under warranty
I currently capture the date the equipment was returned from
repair, so what
could i use within my select statement or query to display a
warranty
expiration date or display on the page...
example :
Returned from repair 10/20/2006 warranty expires on
11/20/2006
each equipment has different warranties, so i need a formula
or something to
say... device #1 has 60 day warranty ( so 10/20/2006 + 60days
=
12/19/2006 )
I would imagine this to be a query
Table 1 would contain the equipment type and warranty time
Table 2 would contain the current status of the equipment
Query would take the back from repair date + warranty =
expiration dateSimple. Join the two tables and create a derived column for
the expiration date. The exact syntax is dependant on your DBMS, so
check the manual for whichever you are using and look at the date
functions. There will be a function that will allow you to add a
number of date units (day, month, year, etc) to a date
field. -
Need help with Loop Statements!!!
Hi
im a student just starting to learn Java. I have an assignment but am stuck on the folowing question:
"Describe the operation of the 'for' loop Flow Control statement explaining the function of the initialisation, conditional and iteration parts.
Also describe the operation for the 'while' loop Flow Control statement expaling the function of the initialisation, conditional and iteration parts."
Could someone please help answer it?
(Ive looked in some books but cant find much on asnwering it)
Any help would be much appreciated!
Thanks"Could someone please help answer it?
(Ive looked in some books but cant find much on asnwering it)" - Yes
put this into a for loop so that it takes any number of arguments from the command line - eg
my name is Susie Woosie Floosie (and any number of additional names)
at present it will only output - eg
my name is Susie Woosie
public class forLoop{
public static void main (String []args) {
String firstName = args[0];
String secondName = args[1];
System.out.println("my name is "+firstName+" "+secondName); -
Need help with provide statement in pnp progrm
hi experts,
i need to select all the records that :
1. pa00014-sunty in so_subty.
base on the records that he found' i need to select from pa0001:
p0014-endda = > p0001-begda and
p0014-begda = < p0001-endda and
p0001-persk ne so_persk.
what i did:
provide * from p0001
from p0014
between pn-begda and pn-endda
where p0014-subty = so_subty and
p0014-endda = > p0001-begda and
p0014-begda = < p0001-endda and
p0001-persk ne so_persk.
check p0001_valid = 'X'.
endprovide.
i got 2 problems:
1. i not recognize the syntax: check p0001_valid = 'X'.
2. the syntax for the provide is not good.
i new in pnp thing.
i hope i was clear.
thanks in advanced,
Michal.Hi,
May be this code will help you.
infotypes: 0001,0002,0008,0000,1000,0021,0041,0587 .
PROVIDE ename BTRTL PLANS STELL ORGEH ABKRS FROM P0001 BETWEEN PN-BEGDA AND PN-ENDDA .
if p0001-begda = '20070801' .
IT_FINAL-ORGEH = P0001-ORGEH .
IT_FINAL-STELL = P0001-STELL . " JOB
IT_FINAL-PLANS = P0001-PLANS . " POSITION
IT_FINAL-ename = P0001-ename . " personnel name
IT_FINAL-BTRTL = P0001-BTRTL . " DEPARTMENT
IT_FINAL-ABKRS = P0001-ABKRS . " PAYROLL AREA
APPEND IT_FINAL .
endif .
ENDPROVIDE.
PROVIDE GBDAT GESCH FROM P0002 BETWEEN PN-BEGDA AND PN-ENDDA .
IT_FINAL-GBDAT = P0002-GBDAT . " DOB
IT_FINAL-GESCH = P0002-GESCH . " ***
IF IT_FINAL-GESCH = 1 .
IT_FINAL-GTXT = 'M' .
ELSE.
IT_FINAL-GTXT = 'F' .
ENDIF .
APPEND IT_FINAL .
ENDPROVIDE .
PROVIDE TRFST FROM P0008 BETWEEN PN-BEGDA AND PN-ENDDA.
IT_FINAL-TRFST = P0008-TRFST . " personnel level
APPEND IT_FINAL .
ENDPROVIDE.
PROVIDE FAVOR FANAM FROM P0021 BETWEEN PN-BEGDA AND PN-ENDDA where P0021-pernr = pernr-pernr
and p0021-SUBTY = '11' .
IT_FINAL-FAVOR = P0021-FAVOR . " FATHER'S NAME
IT_FINAL-FANAM = P0021-FANAM .
CONCATENATE IT_FINAL-FAVOR IT_FINAL-FANAM INTO IT_FINAL-FNAME .
APPEND IT_FINAL .
ENDPROVIDE.
Regards,
Himanshu -
Need help with session state/item refresh
I have an application that allows users to record productivity information for our employees. There are different types of work they have to do, so the form is in header/multiple-detail form and uses collections to handle all processing. In the header portion are the fields that record the time of work. Though this is stored in the database as a single field for start of shift and single field for end of shift, in the entry it is split up into 9 fields: 3 for day, month, and year, and three more each for start hours, start minutes, AM/PM, end hours, end minutes, and AM/PM, which I then concatenate to get the dates to store. The update part works fine. When I go in to display each of these, I have to use an SQL query to retrieve only that section of the time.
The problem I am having is that if the user pulls up several timecards to edit them, it retains these time values from the previous timecard, and due to the way the collections refresh, I can't seem to get either item session state parameter (Only when Null/Always from Source) to achieve the desired result. If I use the Only When Null option, I retain the values from the previous timecard. If I use the Always from Source, the user can't update any of the time-related input.
Can anyone suggest a solution? I've tried a session state process that fires on entry to clear those items and ran into the same problem as using the Always From Source option. There has got to be a way to handle this, but it's got me stumped and my users are clamoring for a fix.
Page initial load
A. Before Header process populates job collection and other collection (not header info), which comes straight from DB table.
B. Data displays for Header (from table) and two detail sections (from collections)
User presses Submit to save changes
1. On Submit Before Processing: updates job and other collections (to preserve changes in case validation fails)
2. Validations check to make sure job codes are valid, date is valid, employee is valid, etc.
3. On Submit After Processing: Writes changes to header from input form, writes changes to job and other from collections to appropriate DB tables
I also have two On Submit After Processing processes to add blank lines - one for each collection. These are triggered via buttons.Blair:
Does creating a 'before header' process to populate these fields make a difference ? The sql could be something like
select TO_CHAR(TC_START_TIME,'HH') into :P1115_TIME_IN_HH from TC where TC_ID = :P1115_TC_ID;You should set the 'Source Used' back to 'Only when current value in session is null' and the 'Source Type' to 'Static Assignment(....)' and clear out the 'Source value or expression' field.
varad -
Need help with a for loop - string checking
I am trying to create a for loop to make sure a user entered string contains only letters but something doesn't take. No errors, but the inner loop of try again doesn't ever come into play. What am I missing please.
String k = keyboard.nextLine();
for (int i = 0; i < k.length(); i++)
char c = k.charAt(i);
int m = c;
if (((m < 97) && (m > 122)) || ((m < 65) && (m > 90)))
System.out.print("Try again please: ");
k = keyboard.nextLine();
System.out.println(k);molested,
(you and BigDaddyLoveHandles should get on well)
I would use regular expression for that... which would look something like this...
// get response containing at least one letter.
while (true) {
String response = keyboard.nextLine();
if( response.matches("[a-zA-Z]+") ) break;
System.out.print("Try again please: ");
}Message was edited by: corlettk - frog got the { -
I need help with this code involving making stuff in safari appear the same in internet explorer
In the Preview mode, Safari shows it the way I want it too
look, but when I go to view it on Internet Explorer, the window
look blank. When I check the 'veiw source code' for it it shows all
the codes I have for it. I'm guessing because I'm using positioning
in CSS and HTML its not aligning right in explorer. But I heard
from one of my friends that there is a code that somehow makes it
so that the webpage looks the same for safari and internet
explorer. He said he didn't know the code, and I've can't find it
on the web so far, so maybe somebody here knows what I'm talking
about? He said all I had to do is enter the code in the code panel
and it should work.Looks like you did not close the JavaScript comments on the
portfolio page:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a
)&&x.oSrc;i++) x.src=x.oSrc;
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for
(i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers
.document);
if(!x && d.getElementById) x=d.getElementById(n);
return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
</script>
Try adding the closing comment just above the closing
</script> tag, like this:
<script language="JavaScript" type="text/JavaScript">
<!--
function MM_swapImgRestore() { //v3.0
var i,x,a=document.MM_sr;
for(i=0;a&&i<a.length&&(x=a
)&&x.oSrc;i++) x.src=x.oSrc;
function MM_preloadImages() { //v3.0
var d=document; if(d.images){ if(!d.MM_p) d.MM_p=new
Array();
var i,j=d.MM_p.length,a=MM_preloadImages.arguments; for(i=0;
i<a.length; i++)
if (a.indexOf("#")!=0){ d.MM_p[j]=new Image;
d.MM_p[j++].src=a
function MM_findObj(n, d) { //v4.01
var p,i,x; if(!d) d=document;
if((p=n.indexOf("?"))>0&&parent.frames.length) {
d=parent.frames[n.substring(p+1)].document;
n=n.substring(0,p);}
if(!(x=d[n])&&d.all) x=d.all[n]; for
(i=0;!x&&i<d.forms.length;i++) x=d.forms[n];
for(i=0;!x&&d.layers&&i<d.layers.length;i++)
x=MM_findObj(n,d.layers
.document);
if(!x && d.getElementById) x=d.getElementById(n);
return x;
function MM_swapImage() { //v3.0
var i,j=0,x,a=MM_swapImage.arguments; document.MM_sr=new
Array; for(i=0;i<(a.length-2);i+=3)
if ((x=MM_findObj(a))!=null){document.MM_sr[j++]=x;
if(!x.oSrc) x.oSrc=x.src; x.src=a[i+2];}
//-->
</script>
Ken Ford
Adobe Community Expert
Fordwebs, LLC
http://www.fordwebs.com
"SCathey" <[email protected]> wrote in
message news:[email protected]...
>
http://myweb.usf.edu/~scathey/
Theres the link. The home, resume, and bio page
> seems to work fine, but when I check the portfollio
page, thats when it turns
> blank in internet explorer. I used a javascript slide
show code for those
> pages, but I used a similar code like that and I had no
previous problems. I
> just want to know if there is a code that allows the
codes to work the same in
> all browsers.
> -
I need help with this code error "unreachable statement"
the error_
F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
int index;
^
F:\Java\Projects\Tools.java:71: missing return statement
}//end delete method
^
F:\Java\Projects\Tools.java:86: missing return statement
}//end getrecod
^
3 errors
import java.util.*;
import javax.swing.*;
import java.awt.*;
public class Tools//tool class
private int numberOfToolItems;
private ToolItems[] toolArray = new ToolItems[10];
public Tools()//array of tool
numberOfToolItems = 0;
for(int i = 0; i < toolArray.length; i++)//for loop to create the array tools
toolArray[i] = new ToolItems();
}//end for loop
}//end of array of tools
public int search(int id)//search mehtod
int index = 0;
while (index < numberOfToolItems)//while and if loop search
if(toolArray[index].getID() == id)
return index;
else
index ++;
}//en while and if loop
return -1;
}//end search method
public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
if(numberOfToolItems >= toolArray.length)
return 0;
int index;
index = search(id); <-----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------HERE
if (index == -1)
toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
numberInStock ++;
return 1;
}//end if index
}//end if toolitem array
return -1;
}//end insert method
public int delete(/*int id*/)//delete method
}//end delete method
public void display()//display method
for(int i = 0; i < numberOfToolItems; i++)
//toolArray.display(g,y,x);
}//end display method
public String getRecord(int i)//get record method
// return toolArray[i].getName()+ "ID: "+toolArray[i].getID()
}//end getrecod
}//end class
Edited by: ladsoftware on Oct 9, 2009 6:08 AM
Edited by: ladsoftware on Oct 9, 2009 6:09 AM
Edited by: ladsoftware on Oct 9, 2009 6:10 AM
Edited by: ladsoftware on Oct 9, 2009 6:11 AMladsoftware wrote:
Subject: Re: I need help with this code error "unreachable statement"
F:\Java\Projects\Tools.java:51: unreachable statement <-----------------------------------------------------------------------------------------------------------------THIS
int index;
^
F:\Java\Projects\Tools.java:71: missing return statement
}//end delete method
^
F:\Java\Projects\Tools.java:86: missing return statement
}//end getrecod
^
3 errorsThe compiler is telling you exactly what the problems are:
public int insert(int id, int numberInStock, int quality, double basePrice, String nm)//insert method
if(numberOfToolItems >= toolArray.length)
return 0; // <<== HERE you return, so everyting in the if block after this is unreachable
int index;
index = search(id); //< -----------------------------------------------------------------------------------------------------------------HERE
if (index == -1)
toolArray[index].assign(id,numberInStock, quality, basePrice,nm);
numberInStock ++;
return 1;
}//end if index
}//end if toolitem array
return -1;
}//end insert method
public int delete(/*int id*/)//delete method
// <<== HERE where is the return statement?
}//end delete method
public String getRecord(int i)//get record method
// return toolArray.getName()+ "ID: "+toolArray[i].getID() <<== HERE you commented out the return statement
}//end getrecod
}//end class -
Need help with the session state value items.
I need help with the session state value items.
Trigger is created (on After delete, insert action) on table A.
When insert in table B at least one row, then trigger update value to 'Y'
in table A.
When delete all rows from a table B,, then trigger update value to 'N'
in table A.
In detail report changes are visible, but the trigger replacement value is not set in session value.
How can I implement this?You'll have to create a process which runs after your database update process that does a query and loads the result into your page item.
For example
SELECT YN_COLUMN
FROM My_TABLE
INTO My_Page_Item
WHERE Key_value = My_Page_Item_Holding_Key_ValueThe DML process will only return key values after updating, such as an ID primary key updated by a sequence in a trigger.
If the value is showing in a report, make sure the report refreshes on reload of the page.
Edited by: Bob37 on Dec 6, 2011 10:36 AM -
Help with Switch statements using Enums?
Hello, i need help with writing switch statements involving enums. Researched a lot but still cant find desired answer so going to ask here. Ok i'll cut story short.
Im writing a calculator program. The main problem is writing code for controlling the engine of calculator which sequences of sum actions.
I have enum class on itself. Atm i think thats ok. I have another class - the engine which does the work.
I planned to have a switch statement which takes in parameter of a string n. This string n is received from the user interface when users press a button say; "1 + 2 = " which each time n should be "1", "+", "2" and "=" respectively.
My algorithm would be as follows checking if its a operator(+) a case carry out adding etc.. each case producing its own task. ( I know i can do it with many simple if..else but that is bad programming technique hence im not going down that route) So here the problem arises - i cant get the switch to successfully complete its task... How about look at my code to understand it better.
I have posted below all the relevant code i got so far, not including the swing codes because they are not needed here...
ValidOperators v;
public Calculator_Engine(ValidOperators v){
stack = new Stack(20);
//The creation of the stack...
this.v = v;
public void main_Engine(String n){
ValidOperators v = ValidOperators.numbers;
*vo = vo.valueOf(n);*
switch(v){
case Add: add(); break;
case Sub: sub(); break;
case Mul: Mul(); break;
case Div: Div(); break;
case Eq:sum = stack.sPop(); System.out.println("Sum= " + sum);
default: double number = Integer.parseInt(n);
numberPressed(number);
break;
//default meaning its number so pass it to a method to do a job
public enum ValidOperators {
Add("+"), Sub("-"), Mul("X"), Div("/"),
Eq("="), Numbers("?"); }
Notes*
It gives out error: "No enum const class ValidOperators.+" when i press button +.
It has nothing to do with listeners as it highlighted the error is coming from the line:switch(v){
I think i know where the problem is.. the line "vo = vo.valueOf(n);"
This line gets the string and store the enum as that value instead of Add, Sub etc... So how would i solve the problem?
But.. I dont know how to fix it. ANy help would be good
Need more info please ask!
Thanks in advance.demo:
import java.util.*;
public class EnumExample {
enum E {
STAR("*"), HASH("#");
private String symbol;
private static Map<String, E> map = new HashMap<String, E>();
static {
put(STAR);
put(HASH);
public String getSymbol() {
return symbol;
private E(String symbol) {
this.symbol = symbol;
private static void put(E e) {
map.put(e.getSymbol(), e);
public static E parse(String symbol) {
return map.get(symbol);
public static void main(String[] args) {
System.out.println(E.valueOf("STAR")); //succeeds
System.out.println(E.parse("*")); //succeeds
System.out.println(E.parse("STAR")); //fails: null
System.out.println(E.valueOf("*")); //fails: IllegalArgumentException
} -
I need help with Analytic Function
Hi,
I have this little problem that I need help with.
My datafile has thousands of records that look like...
Client_Id Region Countries
[1] [1] [USA, Canada]
[1] [2] [Australia, France, Germany]
[1] [3] [China, India, Korea]
[1] [4] [Brazil, Mexico]
[8] [1] [USA, Canada]
[9] [1] [USA, Canada]
[9] [4] [Argentina, Brazil]
[13] [1] [USA, Canada]
[15] [1] [USA]
[15] [4] [Argentina, Brazil]
etc
My task is is to create a report with 2 columns - Client_Id and Countries, to look something like...
Client_Id Countries
[1] [USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexico]
[8] [USA, Canada]
[9] [USA, Canada, Argentina, Brazil]
[13] [USA, Canada]
[15] [USA, Argentina, Brazil]
etc.
How can I achieve this using Analytic Function(s)?
Thanks.
BDFHi,
That's called String Aggregation , and the following site shows many ways to do it:
http://www.oracle-base.com/articles/10g/StringAggregationTechniques.php
Which one should you use? That depends on which version of Oracle you're using, and your exact requirements.
For example, is order importatn? You said the results shoudl include:
CLIENT_ID COUNTRIES
1 USA, Canada, Australia, France, Germany, China, India, Korea, Brazil, Mexicobut would you be equally happy with
CLIENT_ID COUNTRIES
1 Australia, France, Germany, China, India, Korea, Brazil, Mexico, USA, Canadaor
CLIENT_ID COUNTRIES
1 Australia, France, Germany, USA, Canada, Brazil, Mexico, China, India, Korea?
Mwalimu wrote:
... How can I achieve this using Analytic Function(s)?The best solution may not involve analytic functions at all. Is that okay?
If you'd like help, post your best attempt, a little sample data (CREATE TABLE and INSERT statements), the results you want from that data, and an explanation of how you get those results from that data.
Always say which version of Oracle you're using.
Edited by: Frank Kulash on Aug 29, 2011 3:05 PM
Maybe you are looking for
-
Hi Experts, based on the SAP ALV example for "cl_salv_table" I wrote an ALV report. The first screen is for data selection. After this the ALV grid is displayed. The problem is that the standard back button doesn't work as expected. So after clicking
-
How can Safari request HTML5 videos?
Hi, Safari on my iPad plays HTML5 videos. When I go to the video with Safari on my Mac, I got the message Flash PlugIn missing. How can I configure Safari on my Mac that it requests HTML5 videos? Thanks
-
Import librfc32.dll by reflection
Hi .net Specialists, hope anyone can help. I`d like to connect a external program with SAP. The external program provides a scripting interface to add custom VB.NET code. But it`s not possible to add own assembly references. The program vendor told m
-
Where is the Shared folder for the Themes?
While I know that the official position is that the calendar themes can not be changed, I see a reference to Shared/Backgrounds/Solid/aged-paper-cover.jpg in the vintage theme. Where can I find this and other images to edit? I tried looking for it in
-
Why the ringing voltage closely 0v for VIC3-2FXS/DID port?
Initially, I have tested every port of FXS module on ISR with an analog phone. There was ringing tone and I was able to communicate to other as normal. The second test involved measuring the ringing voltage on the same ports by using a pair cable and