Query Help required to Connect JDT1 with OINV tables

Dear Experts,
I have the following query which gives me the customer ageing report. I want some addtional fields from the OINV table and the document numbering table like Document Series Name, AR Invoice document Number,AR invoice remarks, BP Projects Number ( filled in accounting tab in BP projects) and in the query in Reference 1 column its giving the Invoice Numbers as posted in the Journal but for manual Journal Entries it not giving the Journal Number which I also want to be shown in Ref 1 or a seperat field.
The Query is as under :
select OCRD.cardcode 'Supplier Code',OCRD.cardname 'Name',sysdeb 'Debit Amount',syscred 'Credit Amount',
case JDT1.transtype
when '13' then 'INV'
when '14' then 'AR CN'
when '24' then 'INCOMING'
else 'Other'
end 'Type',
Ref1,
fccurrency 'BP Currency',
CONVERT(VARCHAR(10), refdate, 103)'Posting Date' ,
CONVERT(VARCHAR(10), duedate, 103) 'Due Date',
CONVERT(VARCHAR(10), taxdate, 103) 'Doc Date' ,
CASE
when (DATEDIFF(dd,refdate,current_timestamp))+1 < 31
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "0-30 days",
case when ((datediff(dd,refdate,current_timestamp))+1 > 30
and (datediff(dd,refdate,current_timestamp))+1< 61)
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "31 to 60 days",
case when ((datediff(dd,refdate,current_timestamp))+1 > 60
and (datediff(dd,refdate,current_timestamp))+1< 91)
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "61 to 90 days",
CASE
when (DATEDIFF(dd,refdate,current_timestamp))+1 > 90
then
case
when syscred= 0 then sysdeb
when sysdeb= 0 then syscred * - 1
end
end "90 + days"
from JDT1,OCRD where JDT1.shortname = OCRD.cardcode and cardtype = 'c' and intrnmatch = '0'
ORDER BY OCRD.CARDCODE, taxdate
Would appreciate if you can help me to get a solution in it.
Regards,
Kamlesh

Dear Gordon,
While executing the followings modified query it giving an error of
Incorrect Syntax near the keyword 'to' and incorrect Syntax near 'Series'
the query is as under :
{select OCRD.cardcode 'Supplier Code',OCRD.cardname 'Name',sysdeb 'Debit Amount',syscred 'Credit Amount',
case l.transtype
when '13' then 'INV'
when '14' then 'AR CN'
when '24' then 'INCOMING'
else 'Other'
end 'Type',
j.BaseRef'Trans #',
case l.transtype
when '13' then
(Select Comments from OINV where OINV.Transid=j.Transid)
else '-'
end 'Inv.Rem.',
(Select SeriesName From NNM1 Where Series=j.DocSeries and ObjectCode=l.TransType)'Series',
to
(Select Isnull(SeriesName, 'Manual') From NNM1 Where Series=j.DocSeries and ObjectCode=l.TransType)'Series',
l.Ref1,
fccurrency 'BP Currency',
CONVERT(VARCHAR(10), l.refdate, 103)'Posting Date' ,
CONVERT(VARCHAR(10), l.duedate, 103) 'Due Date',
CONVERT(VARCHAR(10), l.taxdate, 103) 'Doc Date' ,
CASE
when (DATEDIFF(dd,l.refdate,current_timestamp))+1 < 31
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "0-30 days",
case when ((datediff(dd,l.refdate,current_timestamp))+1 > 30
and (datediff(dd,l.refdate,current_timestamp))+1< 61)
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "31 to 60 days",
case when ((datediff(dd,l.refdate,current_timestamp))+1 > 60
and (datediff(dd,l.refdate,current_timestamp))+1< 91)
then
case
when syscred <> 0 then syscred * - 1
else sysdeb
end
end "61 to 90 days",
CASE
when (DATEDIFF(dd,l.refdate,current_timestamp))+1 > 90
then
case
when syscred= 0 then sysdeb
when sysdeb= 0 then syscred * - 1
end
end "90 + days"
from JDT1 l
Inner Join OJDT j On j.TransId=l.TransId
,OCRD where l.shortname = OCRD.cardcode and cardtype = 'c' and intrnmatch = '0'
ORDER BY OCRD.CARDCODE, l.taxdate}
Regards,
Kamlesh

Similar Messages

  • Query Help required

    HI Experts ,
    Could you please help me in getting below output ,
    My Input Table :
    Number
    Loc_A
    LOC_B
    PARENT_NUMBER
    A-01
    Ind
    Aus
    A
    A-02
    Fra
    NZ
    A
    A-03
    Ind
    SL
    A
    A-04
    USA
    Aus
    A
    A-05
    Pak
    WI
    A
    A-06
    Fra
    Ag
    A
    A-07
    Rus
    Ban
    A
    A-08
    SA
    Ind
    A
    A-09
    Ind
    Ind
    A
    My Required Output
    Number
    Loc_A
    LOC_B
    PARENT_NUMBER
    A-01
    Ind
    Aus
    A
    A-02
    Fra
    NZ
    A
    A-03
    Ind
    SL
    null
    A-04
    USA
    Aus
    null
    A-05
    Pak
    WI
    A
    A-06
    Fra
    Ag
    null
    A-07
    Rus
    Ban
    A
    A-08
    SA
    Ind
    A
    A-09
    Ind
    Ind
    null
    I am comparing each and every record with its previous rows values for column Loc_A and Loc_B and if they are getting matched i m inserting null .
    table structure
    with t as
    (select 'A-01' as Num,'Ind' as Loc_A,'Aus' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-02' as Num,'Fra' as Loc_A,'NZ' as Loc_B,'A' as Parent_Num from dual
    Union all
    select 'A-03' as Num,'Ind' as Loc_A,'SL' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-04' as Num,'USA' as Loc_A,'Aus' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-05' as Num,'Pak' as Loc_A,'WI' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-06' as Num,'Fra' as Loc_A,'Ag' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-07' as Num,'Rus' as Loc_A,'Ban' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-08' as Num,'SA' as Loc_A,'Ind' as Loc_B,'A' as Parent_Num from dual
    union all
    select 'A-09' as Num,'Ind' as Loc_A,'Ind' as Loc_B,'A' as Parent_Num from dual
    select * from t;
    Could you please help ,i have 1000's of rows with this kind of data

    Hi,
    I have tried to create a query, this might help you
    WITH t AS (SELECT 'A-01' AS Num,
                      'Ind' AS Loc_A,
                      'Aus' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-02' AS Num,
                      'Fra' AS Loc_A,
                      'NZ' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-03' AS Num,
                      'Ind' AS Loc_A,
                      'SL' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-04' AS Num,
                      'USA' AS Loc_A,
                      'Aus' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-05' AS Num,
                      'Pak' AS Loc_A,
                      'WI' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-06' AS Num,
                      'Ind' AS Loc_A,
                      'Ag' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-07' AS Num,
                      'Rus' AS Loc_A,
                      'Ban' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-08' AS Num,
                      'SA' AS Loc_A,
                      'Ind' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL
               UNION ALL
               SELECT 'A-09' AS Num,
                      'Ind' AS Loc_A,
                      'Ind' AS Loc_B,
                      'A' AS Parent_Num
                 FROM DUAL)
    SELECT t.num,
           t.loc_a,
           t.loc_b,
           CASE
              WHEN (FIRST_VALUE (LOC_A)
                       OVER (ORDER BY NUM RANGE UNBOUNDED PRECEDING)) IN
                         (LOC_A, LOC_B)
                    OR (FIRST_VALUE (LOC_B)
                         OVER (ORDER BY NUM RANGE UNBOUNDED PRECEDING)) IN
                         (LOC_A, LOC_B)
              THEN
              ELSE
                 t.parent_num
           END
              parent_num
      FROM t
    NUM
    LOC_A
    LOC_B
    PARENT_NUM
    A-01
    Ind
    Aus
    A-02
    Fra
    NZ
    A
    A-03
    Ind
    SL
    A-04
    USA
    Aus
    A-05
    Pak
    WI
    A
    A-06
    Ind
    Ag
    A-07
    Rus
    Ban
    A
    A-08
    SA
    Ind
    A-09
    Ind
    Ind
    Only error I have here is the First Value is showing '-'. I have not got enough time to remove it.
    Regards,
    Adarsh

  • Urgent Help Required for Connect Four Game

    Hi all,
    I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the internet which helped me little bit. But there are lot of problems I am facing developing the whole game. I have drawn the Board and the two players can play. The players numbers can fill the board, but I have problem implementing the winner for the game. I need to implement the hasWon() method for Horizontal win, Vertical win and Diagonal win. I also found some code examples on the net but I was unable to make it working. I have 5 classes and one interface which I m implementing. The main problem is how to implement the hasWon() method in the PlayGame class below with Horizontal, vertical and diagonal moves.
    Sorry there is so much code.
    This the interface I must implement, but now I am only implementing the int move() of this interface. I will implement the rest later after solving the winner problem with your help.
    Interface code..............
    interface Player {
    void init (Boolean color);
    String name ();
    int move ();
    void inform (int i);
    Player1 class......................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player1 implements Player
    public Player1()
    public int move()
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player1;
    System.out.println ("What is your Number, player 1?");
    player1 = scan.nextInt();
    System.out.println ("Hey number"+player1+" are you prepared to CONNECT FOUR");
    System.out.println();
    return player1;
    //Player.move();
    //return player1;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "Koonda";
    }//end player1 class
    Player2 class...........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player2 implements Player
    public int move()
    //int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    // cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    //int num1, num2;
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player2;
    System.out.println ("What is your Number, player 2?");
    player2 = scan.nextInt();
    System.out.println ("Hey "+player2+" are you prepared to CONNECT FOUR");
    System.out.println();
    //return player1;
    return player2;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "malook";
    }//end player1 class
    PlayGame class which contains all the functionality.........................................................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class PlayGame
    //Player player1;
    //Player player2;
    int [][]ConnectFourArray;
    boolean status;
    int winner;
         int player1;
         int player2;
         public PlayGame()
              //this.player1 = player1;
              //this.player2 = player2;
         public void StartGame()
         try{
         // int X = 0, Y = 0;
         //int value;
         int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
         int[][] ConnectFourArray = new int[6][7];
         int num1, num2;
         for(int limit=21;limit!=0;limit--)
    BufferedReader selecter = new BufferedReader (new InputStreamReader(System.in));
    String column1;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=1;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=1;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=1;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=1;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=1;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=1;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=1;
    cup6=cup6-1;
    System.out.println();
    BufferedReader selecter2 = new BufferedReader (new InputStreamReader(System.in));
    String column2;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=2;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=2;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=2;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=2;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=2;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=2;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=2;
    cup6=cup6-1;
    System.out.println();
    System.out.println();
    catch (Exception E){
    System.out.println("Error with input");
    System.out.println("Would you like to play again");
    try{
    String value;
    BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
    // Scanner scan = new Scanner(System.in);
    System.out.println("Enter yes to play or no to quit");
    // value = scan.nextLine();
    // String value2;
    value = reader.readLine();
    //value2 = reader.readLine();
    if (value.equals("yes"))
    System.out.println("Start again");
    StartGame(); // calling the StartGame method to play a game once more
    else if (value.equals("no"))
    System.out.println("No more games to play");
    // System.exit(0);
    else
    System.exit(0);
    System.out.println();
    catch (Exception e){
    System.out.println("Error with input");
    finally
    System.out.println(" playing done");
    //StartGame();
    //check for horizontal win
    public int hasWon()
    int status = 0;
    for (int row=0; row<6; row++)
    for (int col=0; col<4; col++)
    if (ConnectFourArray[col][row] != 0 &&
    ConnectFourArray[col][row] == ConnectFourArray[col+1][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+2][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+3][row])
    //status = true;//int winner;
    if(status == player1)
    System.out.println("Player 1 is the winner");
    else if(status == player2)
    System.out.println("Player 2 is the winner" );
    }//end inner for loop
    }// end outer for loop
    } // end method Winner
    return status;
    }//end class
    ClassConnectFour which designs the board........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class ClassConnectFour
         //Player player1;
         //Player player2;
         public ClassConnectFour()
              //this.player1 = player1;
    public void DrawBoard()
    int[][] ConnectFourArray = new int[6][7] ;
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    }//end class
    TestConnetFour class which uses most of the above class..................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class TestConnectFour
    public static void main(String[] args)
    ClassConnectFour cf = new ClassConnectFour();
    cf.DrawBoard();
    Player1 player1 = new Player1();
    Player2 player2 = new Player2();
    player1.move();
    player2.move();
    System.out.println("Number 1 belongs to player " + player1.name());
    System.out.println("Number 2 belongs to player " + player2.name());
    PlayGame pg = new PlayGame();
    pg.StartGame();
    pg.hasWon();
    //pg.Play();
    //System.out.println(player.name());
    //System.out.println(player2.name());
    }// end main
    }//end class
    I am sorry for all this junk code but I only understand it this way. Your urgent help is required. Looking forward to your reply.
    Thanks in advance.
    Koonda
    //

    Hi,
    Thanks for your help but I really don't understand the table lookup algorithm. Could you please send me some code to implement that.
    I will send you the formatted code as well
    Thanks for your help.
    looking forward to your reply.
    Koonda
    Hi all,
    I am a student and I have a project due 20th of this month, I mean May 20, 2007 after 8 days. The project is about creating a Connect Four Game. I have found some code examples on the internet which helped me little bit. But there are lot of problems I am facing developing the whole game. I have drawn the Board and the two players can play. The players numbers can fill the board, but I have problem implementing the winner for the game. I need to implement the hasWon() method for Horizontal win, Vertical win and Diagonal win. I also found some code examples on the net but I was unable to make it working. I have 5 classes and one interface which I m implementing. The main problem is how to implement the hasWon() method in the PlayGame class below with Horizontal, vertical and diagonal moves.
    Sorry there is so much code.
    This the interface I must implement, but now I am only implementing the int move() of this interface. I will implement the rest later after solving the winner problem with your help.
    Interface code..............
    interface Player {
    void init (Boolean color);
    String name ();
    int move ();
    void inform (int i);
    Player1 class......................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player1 implements Player
    public Player1()
    public int move()
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player1;
    System.out.println ("What is your Number, player 1?");
    player1 = scan.nextInt();
    System.out.println ("Hey number"+player1+" are you prepared to CONNECT FOUR");
    System.out.println();
    return player1;
    //Player.move();
    //return player1;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "Koonda";
    }//end player1 class
    Player2 class...........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class Player2 implements Player
    public int move()
    //int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    // cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    //int num1, num2;
    Scanner scan = new Scanner(System.in);
    // BufferedReader stdin = new BufferedReader (new InputStreamReader(System.in));
    int player2;
    System.out.println ("What is your Number, player 2?");
    player2 = scan.nextInt();
    System.out.println ("Hey "+player2+" are you prepared to CONNECT FOUR");
    System.out.println();
    //return player1;
    return player2;
    }//end move method
    public void init (Boolean color)
    public void inform (int i)
    public String name()
    return "malook";
    }//end player1 class
    PlayGame class which contains all the functionality.........................................................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class PlayGame
    //Player player1;
    //Player player2;
    int [][]ConnectFourArray;
    boolean status;
    int winner;
    int player1;
    int player2;
    public PlayGame()
    //this.player1 = player1;
    //this.player2 = player2;
    public void StartGame()
    try{
    // int X = 0, Y = 0;
    //int value;
    int cup0,cup1,cup2,cup3,cup4,cup5,cup6;
    cup0=5;cup1=5;cup2=5;cup3=5;cup4=5;cup5=5;cup6=5;
    int[][] ConnectFourArray = new int[6][7];
    int num1, num2;
    for(int limit=21;limit!=0;limit--)
    BufferedReader selecter = new BufferedReader (new InputStreamReader(System.in));
    String column1;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=1;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=1;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=1;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=1;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=1;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=1;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=1;
    cup6=cup6-1;
    System.out.println();
    BufferedReader selecter2 = new BufferedReader (new InputStreamReader(System.in));
    String column2;
    System.out.println();
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    System.out.println ("Please Select a column of 0 through 6 ");
    column1 = selecter.readLine();
    num1= Integer.parseInt(column1);
    System.out.println();
    if (num1==0){
    ConnectFourArray[cup0][0]=2;
    cup0=cup0-1;
    else if (num1==1){
    ConnectFourArray[cup1][1]=2;
    cup1=cup1-1;
    else if (num1==2){
    ConnectFourArray[cup2][2]=2;
    cup2=cup2-1;
    else if (num1==3){
    ConnectFourArray[cup3][3]=2;
    cup3=cup3-1;
    else if (num1==4){
    ConnectFourArray[cup4][4]=2;
    cup4=cup4-1;
    else if (num1==5){
    ConnectFourArray[cup5][5]=2;
    cup5=cup5-1;
    else if (num1==6){
    ConnectFourArray[cup6][6]=2;
    cup6=cup6-1;
    System.out.println();
    System.out.println();
    catch (Exception E){
    System.out.println("Error with input");
    System.out.println("Would you like to play again");
    try{
    String value;
    BufferedReader reader = new BufferedReader (new InputStreamReader(System.in));
    // Scanner scan = new Scanner(System.in);
    System.out.println("Enter yes to play or no to quit");
    // value = scan.nextLine();
    // String value2;
    value = reader.readLine();
    //value2 = reader.readLine();
    if (value.equals("yes"))
    System.out.println("Start again");
    StartGame(); // calling the StartGame method to play a game once more
    else if (value.equals("no"))
    System.out.println("No more games to play");
    // System.exit(0);
    else
    System.exit(0);
    System.out.println();
    catch (Exception e){
    System.out.println("Error with input");
    finally
    System.out.println(" playing done");
    //StartGame();
    //check for horizontal win
    public int hasWon()
    int status = 0;
    for (int row=0; row<6; row++)
    for (int col=0; col<4; col++)
    if (ConnectFourArray[col][row] != 0 &&
    ConnectFourArray[col][row] == ConnectFourArray[col+1][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+2][row] &&
    ConnectFourArray[col][row] == ConnectFourArray[col+3][row])
    //status = true;//int winner;
    if(status == player1)
    System.out.println("Player 1 is the winner");
    else if(status == player2)
    System.out.println("Player 2 is the winner" );
    }//end inner for loop
    }// end outer for loop
    } // end method Winner
    return status;
    }//end class
    ClassConnectFour which designs the board........................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class ClassConnectFour
    //Player player1;
    //Player player2;
    public ClassConnectFour()
    //this.player1 = player1;
    public void DrawBoard()
    int[][] ConnectFourArray = new int[6][7] ;
    for ( int row=0; row < ConnectFourArray.length; row++ ){
    System.out.print("Row " + row + ": ");
    for ( int col=0; col < ConnectFourArray[row].length; col++ )
    System.out.print( ConnectFourArray[row][col] + " ");
    System.out.println();
    System.out.println();
    }//end class
    TestConnetFour class which uses most of the above class..................
    import java.util.*;
    import java.io.*;
    import javax.swing.*;
    public class TestConnectFour
    public static void main(String[] args)
    ClassConnectFour cf = new ClassConnectFour();
    cf.DrawBoard();
    Player1 player1 = new Player1();
    Player2 player2 = new Player2();
    player1.move();
    player2.move();
    System.out.println("Number 1 belongs to player " + player1.name());
    System.out.println("Number 2 belongs to player " + player2.name());
    PlayGame pg = new PlayGame();
    pg.StartGame();
    pg.hasWon();
    //pg.Play();
    //System.out.println(player.name());
    //System.out.println(player2.name());
    }// end main
    }//end classI am sorry for all this junk code but I only understand it this way. Your urgent help is required. Looking forward to your reply.
    Thanks in advance.
    Koonda

  • Help required in connecting to Implicit SSL FTP server

    Hi,
    I am working on a scenario of File to Idoc.
    Here the File server (FTP server) is using the Implicit SSL protocol which is not supported by PI.
    Hence, we thought of using the scripts for this.
    Using Script we will move the file from the FTP server to the PI directory & then using NFS protocol in channel, PI will read the file.
    Here my query is, is it possible to go for such a design in case of Implicit SSL?
    If yes, please let me know how it can be achieved.
    I am referring the below blog of writing the scripts in case of SSH protocol:
    /people/daniel.graversen/blog/2008/12/11/sftp-with-pi-the-openssh-way
    Please let me know if any such blog/material is available for Implicit SSL protocol as well.
    Your help is highly appreciated.
    -Supriya.

    have you tried calling from ABAP ?
    Connect FTP Server through R/3
    There is something called SAP cryptographic kit which you need to install ,please check this link I am not sure
    File has to pass through FTPS connection.. Connection parameters?
    Port for Implicit SSL is 990
    regards
    Ninad

  • Help : very slow connection speed with AEBS and iMac

    I connect to the internet using my newly purchased AEBS. I have a MacBook and an 24" iMac ( purchased in Nov 2007). My iMac showed very slow connecting speed of <1 MB/s download; with my MacBook placed just 1 foot from my iMac, the MacBook showed an amazing download speed of 20MB/s. If i connect the iMac to the AEBS using ethernet cable, it can get a very high speed.
    So, where is the problem??
    I am new to wireless, please help. I use iMac more than my MacBook at home.
    Actually, i did not touch the any of the advance setting of the AEBS.

    You know, I am experiencing the same problem. My wife's PC and iPhone are blazing fast, but my MacBook is accessing the internet at about dial-up speeds. Very frustrating and I haven't yet found the culprit.
    Anyone???

  • Help required for PLSQL or with some Analytical Function.

    Hello All
    Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
    With the Partitioning, OLAP, Data Mining and Real Application Testing options
    I have couple of questions with following dataset and insert into a table
    With t As
    SELECT '2011' YR, FN1 File_name,1 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,2 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,3 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,4 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,5 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,6 rec_seq From Dual Union All
    SELECT '2012' YR, FN1 File_name,7 rec_seq From Dual Union All
    SELECT '2011' YR, FN1 File_name,8 rec_seq From Dual Union All
    SELECT '2010' YR, FN1 File_name,9 rec_seq From Dual
    SELECT C_CAND_ID,MAX(C_CAND_ID) OVER (PARTITION BY C_CAND_ID ORDER BY YR) FROM
    SELECT DISTINCT COUNT(*) OVER (PARTITION BY YR ORDER BY FILE_NAME) "C_CAND_ID",
    YR
    FROM
    (select YR, FIle_name
    from t
    How to find year which is not equal to count with maximum year (2011) and insert into errorlog table
    How to find all distinct years --- 2011, 2012 and 2010 and insert into error log table
    Target table is
    Create table errorlog
    (Error_code number,
    Errorheader varchar2(100),
    error_details varchar2(1000),
    rec_sequence     number
    output is
    errorcode     errorheader               errordetails                         rec_sequence
    1          Year not as maximum count     The year 2012 not equal to 2011 the max count          7
    1          Year not as maximum count     The year 2010 not equal to 2011 the max count          9
    2          distinct years are          the distinct years are 2010,2011,2012               0
    also I have couple of other questions like
    How to find YR with maximum number of records ----- the answer should be 2011.
    How to find count of distinct years ---- the answer should be 3
    Please give me some guidence or help
    Thanks

    How to find year which is not equal to count with maximum year (2011) and insert into errorlog table
    How to find all distinct years Maybe following query gives you a start to identify the necessary information:
    SQL> with t as
    select '2011' yr, 'fn1' file_name,1 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,2 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,3 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,4 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,5 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,6 rec_seq from dual union all
    select '2012' yr, 'fn1' file_name,7 rec_seq from dual union all
    select '2011' yr, 'fn1' file_name,8 rec_seq from dual union all
    select '2010' yr, 'fn1' file_name,9 rec_seq from dual
    select max (yr) keep (dense_rank last order by cnt_yr) over () max_cnt_yr, /* gives you the year with the most entries */
           t.*  /* rest of table */
      from (select count (yr) over (partition by yr) cnt_yr,   /*  counts of a particular year ? */
                   count (distinct yr) over () cnt_distinct_yr,  /*  how many distinct years ? */
                   t.*
              from t) t
    MAX_CNT_YR          CNT_YR CNT_DISTINCT_YR YR   FILE_NAME         REC_SEQ
    2011                     1               3 2010 fn1                     9
    2011                     7               3 2011 fn1                     2
    2011                     7               3 2011 fn1                     3
    2011                     7               3 2011 fn1                     4
    2011                     7               3 2011 fn1                     6
    2011                     7               3 2011 fn1                     1
    2011                     7               3 2011 fn1                     5
    2011                     7               3 2011 fn1                     8
    2011                     1               3 2012 fn1                     7
    9 rows selected.

  • (HELP PLEASE) ISL connection fails with a visibroker server

    Hi all,
    I developed a tuxedo-corba client to use a non-tuxedo orb, my test in Tuxedo were fine, because I was using a Tuxedo-Corba Server with a DUMMY corba method.
    I'm using Name Service and ISL who connected to a //localmachine:xxyy
    But, when I'm trying to connect to a external Corba Server, (//111.222.333.44:14000) non-tuxedo, it fails.
    Maybe I need something more, can you help me please...
    Thanks a head for your help.

    You need to explain a little more what you are doing and what configuration you are using TOBJADDR does not work with foreign ORBS, you have to use standard CORBA urls, e.g. corbaloc:iiop:host:port/NameService

  • Query help required to link two fields

    Hi all,
    I have made an query as under :
    SELECT T2.Period, T0.dept, T0.empID, T0.firstName, T0.lastName, T1.U_ebasic, T1.U_ehra, T1.U_etrspt, T1.U_ecola, T1.U_emeins, T1.U_education, T1.U_grosssal,T1.U_totduc, T1.U_oadd, T1.U_netsal, T1.U_bank, T1.U_branch, T1.U_accno FROM OHEM T0 , [dbo].[@PAYROLL_PR_DETAIL]  T1, [dbo].[@PAYROLL_PROLL_HEAD]  T2 where t2.docentry=t1.docentry and t1.U_ecode=t0.empid
    Now I want that the Department Full NAME as mentioned in the Human Resource screen for that employee should come. Apart from it I also want to link a new field in this query user_code from OUSR table for each employee.
    Can you please help me to make this query.
    Regards,
    kamlesh

    Dear Gordon,
    After rectifiying the spelling mistake I used the following query as under
    SELECT T2.Period, T0.dept, T3.Name, T0.empID, T0.firstName, T0.lastName, T4.USER_CODE,T1.U_ebasic, T1.U_ehra, T1.U_etrspt, T1.U_ecola, T1.U_emeins, T1.U_education, T1.U_grosssal,T1.U_totduc, T1.U_oadd, T1.U_netsal, T1.U_bank, T1.U_branch, T1.U_accno
    FROM dbo.OHEM T0
    INNER JOIN dbo.OUDP T3 ON T3.Code = T0.dept
    INNER JOIN dbo.OUSR T4 ON T4.INTERNAL_K = T0.userId
    INNER JOIN dbo.@PAYROLL_PR_DETAIL T1 ON t1.U_ecode=t0.empid
    INNER JOIN dbo.@PAYROLL_PROLL_HEAD T2 ON t2.docentry=t1.docentry
    but now the syntax error is coming as - 'Incorrect syntax near '@PAYROLL_PR_DETAIL'
    (SEWSY) (s) could not be prepared
    Please guide.
    Regards,
    Kamlesh

  • Help Required on Cross Referencing with Oracle Stored Procedure

    Hi Experts,
       I have a requirement which is having the requirements as follow,
    Web Application initially sends a request number to SAP ECC to fetch the response details through SAP PI (HTTP to RFC u2013 Synchronous). While fetching the response from SAP ECC system, SAP PI has to invoke a Oracle Stored Procedure based on some parameter from SAP ECC System and then composited data has to send back to Web Application by SAP PI.
    Request you to kindly suggest how to achieve the above.  JDBC lookup is not much extended to call stored procedure. It would be helpful if it will be a step by step as I am novice to SAP PI.
    Regards
    Archana

    you might very well have to use a BPM.
    open a sync/async bridge ->
    do a sync call to RFC ->
    Do a sync call to DB (use SP here) ->
    do a transformation from the response message of RFC and Response of DB (N:1) to for your response to original caller (http)
    Close the sync async bridge using the response message

  • Help Required For HF100 Used With FCE 4 ?

    No, it's not for me.
    A few days ago Tom Bigley tacked this question onto another HF100 thread but it seems to have gone unnoticed, so I am reprinting it here:-
    "Forgive me if I am going over old ground but I have just acquired a HF100 and want assurance I have understood the AVCHD/FCE relationship correctly.
    I must use High Quality XP at 12Mbps (1440 x 1080)
    I cannot use High Quality FXP (1920 x 1080)
    I cannot use Cine and 25Mbps or I get into interlacing complications
    I import using Easy SetUp set to Apple Intermediate Codec
    with the Use Tab set to HDV-Apple Intermediate Codec 1080i50
    Am I there or are there any other pitfalls I've overlooked?
    Tom."

    Hello Richy
    My first thought is, can't you just put the graphic elements in to the photo with your choice of editor?
    It looks like you are trying to position two yellowy-green lines in the page as well.  You could put one of those lines in to the image and one in the left panel as a background (I'm not absoulutely clear where they go but I think I've made a pretty good guess.)
    You could try adding a header div and using a slice of the image as a background and position your logo elements in that with float, margin, padding or whatever.
    Basically, you have a two column layout which is quite simple so there should be a solution.
    You could try putting the main image as a background image and position your graphic elements in the content panel (div)?
    If your main image is a background though, I think you might have a bit more difficulty with height so, you would have to perhaps use the left column content to determine height.
    These are just a few thoughts but given with the caveat of my novice status!  I've only just learned to tie my HTML shoe laces.
    Good luck
    Martin
    PS I remember a few years ago now, bing advised through these pages to only use absolutely positioned elements if you really have no other alternative and then if you do, to only use one!   Since then, I haven't ever used one.
    PPS I like your design very much but I am not sure about that bright yellow text?  The pink circle looks as though it should be crazy but it fits beautifully with your colour scheme.  That yellow hits off it a bit in my mind and jars a little.

  • Help required in connecting sql devloper to db 11g

    any please tell me how to connect to the database 11g using SQL developer
    What r the configuration settings to be used

    For a basic connection (using the jdbc thin driver) you need to specify the hostname of the database server, the database serveice name and the port number (probably 1521). You also need to provide a username and password.

  • Help required in ajp13 connector with  sun java system webserver7 - tomcat

    HI,
    I am trying to configure the tomcat ajp13 connector. It redirects perfectly and i can get the tomcat html page. But i am not able to access any jsp files.
    It says 404 always. Even i removed the html file, so i thought it will pickup index.jsp but it still says no html found.
    Any help on this would be appreciated.
    # Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
    # You can edit this file, but comments and formatting changes
    # might be lost when you use the administration GUI or CLI.
    <Object name="default">
    AuthTrans fn="match-browser" browser="*MSIE*" ssl-unclean-shutdown="true"
    NameTrans fn="ntrans-j2ee" name="j2ee"
    NameTrans fn="pfx2dir" from="/mc-icons" dir="C:/Program Files/Oracle/WebServer7/lib/icons" name="es-internal"
    NameTrans fn="assign-name" from="/*" name="jknsapi"
    NameTrans fn="assign-name" from="/*.jsp/" name="jknsapi"
    NameTrans fn="assign-name" from="/servlet/*" name="jknsapi"
    PathCheck fn="uri-clean"
    PathCheck fn="check-acl" acl="default"
    PathCheck fn="find-pathinfo"
    PathCheck fn="find-index-j2ee"
    PathCheck fn="find-index" index-names="index.html,index.jsp,home.html"
    PathCheck fn=validate_session_policy
    ObjectType fn="type-j2ee"
    ObjectType fn="type-by-extension"
    ObjectType fn="force-type" type="text/plain"
    Service method="(GET|HEAD)" type="magnus-internal/directory" fn="index-common"
    Service method="(GET|HEAD|POST)" type="*~magnus-internal/*" fn="send-file"
    Service method="TRACE" fn="service-trace"
    Error fn="error-j2ee"
    AddLog fn="flex-log"
    </Object>
    <Object name="j2ee">
    Service fn="service-j2ee" method="*"
    </Object>
    <Object name="es-internal">
    PathCheck fn="check-acl" acl="es-internal"
    </Object>
    <Object name="cgi">
    ObjectType fn="force-type" type="magnus-internal/cgi"
    Service fn="send-cgi"
    </Object>
    <Object name="jknsapi">
    ObjectType fn="force-type" type="text/plain"
    Service fn="jk_service" method="*" worker="worker1"
    </Object>
    <Object name="send-precompressed">
    PathCheck fn="find-compressed"
    </Object>
    <Object name="compress-on-demand">
    Output fn="insert-filter" filter="http-compression"
    </Object>
    <Object ppath="*/dummypost/sunpostpreserve*">
    Service type=text/* method=(GET|POST) fn=append_post_data
    </Object>
    <Object ppath="*/UpdateAgentCacheServlet*">
    Service type=text/* method=(POST) fn=process_notification
    </Object>

    remove
    NameTrans fn="ntrans-j2ee" name="j2ee"

  • Help required to unlock device with unlock code

    I have purchased A 2600 Clasic is the US. AT&T ahs provided me an unlock code so that it can be used in India, however I am not able to unlcok code as it gives a error as resiticted. Neen help

    Check the link below for phone unlocking guide.
    /discussions/board/message?board.id=topfaq&thread.id=55

  • Query help: Return mult. matching rows only, single table...

    I've done some searching - but no luck - I have a question that should be easy for an expert:
    I want to select only rows that have multiple occurences of matching fields - and I don't know (or really care) what their values are.
    Example table has 5 fields: field1 field2 field3 field4 field5
    If there is more than 1 record that share the same field1, field3, and field5 - then I want to return all of those records, and ignore the rest.
    Finally, I don't know what the matching values are or may be - they just match. I do, however, know it has to be those 3 fields (only fields 1, 3 and 5).
    field1 field2 field3 field4 field5
    1 ???? John ???? Seattle
    1 ???? John ???? Spokane
    2 ???? John ???? Seattle
    1 ???? John ???? Spokane
    So from the above, I would only want 2 rows - both:
    1 ???? John ???? Spokane
    Because those 3 fields matched up in multiple rows, it the ???? fields that I want to look at in both rows.
    I really appreciate any help in advance!

    Hi,
    An other solution :
    SQL> select * from tbl;
        FIELD1 FIELD2     FIELD3     FIELD4     FIELD5
             1 ????       John       ????       Spokane
             2 ????       John       ????       Seattle
             1 ????       John       ????       Spokane
             1 ????       John       ????       Seattle
    SQL> select distinct field1,field2,field3,field4,field5
      2  from (select tbl.*,count(*) over (partition by field1, field3,field5) ct from tbl)
      3  where ct >1;
        FIELD1 FIELD2     FIELD3     FIELD4     FIELD5
             1 ????       John       ????       Spokane
    SQL> Nicolas.
    Message was edited by:
    N. Gasparotto
    With a field3 value like this, it's necessary John which answered first ;-)

  • Query to calculate the Sales Analysis on OINV table

    Hi All,
    I have a requirements that will calculate the sales analysis based on A/R Invoice and also considered the Credit Memo applied to Invoice.
    thanks,
    vin

    Hi,
    Try this:
    SELECT T0.CardCode, T0.CardName,
         (SUM(T1.Debit) - sum(T1.Credit)) AS 'Total Sales 2010', ((SUM(T1.Debit) - sum(T1.Credit))/12) AS '2010 Monthly Avg',
         (SUM(T1.Debit) - sum(T1.Credit)) AS 'Total Sales 2011', ((SUM(T1.Debit) - sum(T1.Credit))/Month(GetDate())) AS '2011 Monthly Avg',
         ((sum(Case DATENAME(month,T1.DueDate) when 'January' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'January'
          then T1.Debit else 0 end))) Jan,
         (sum(Case DATENAME(month,T1.DueDate) when 'February' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'February'
          then T1.Debit else 0 end))[Feb],
         (sum(Case DATENAME(month,T1.DueDate) when 'March' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'March' then T1.Debit else 0 end))Mar,
         (sum(Case DATENAME(month,T1.DueDate) when 'April' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'April' then T1.Debit else 0 end))Apr,
         (sum(Case DATENAME(month,T1.DueDate) when 'May' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'May' then T1.Debit else 0 end))May,
         (sum(Case DATENAME(month,T1.DueDate) when 'June' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'June' then T1.Debit else 0 end))Jun,
         (sum(Case DATENAME(month,T1.DueDate) when 'July' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'July' then T1.Debit else 0 end))Jul,
         (sum(Case DATENAME(month,T1.DueDate) when 'August' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'August'
          then T1.Debit else 0 end))Aug,
         (sum(Case DATENAME(month,T1.DueDate) when 'September' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'September'
          then T1.Debit else 0 end))Sep,
         (sum(Case DATENAME(month,T1.DueDate) when 'October' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'October'
          then T1.Debit else 0 end))Oct,
         (sum(Case DATENAME(month,T1.DueDate) when 'November' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'November'
          then T1.Debit else 0 end))Nov,
         (sum(Case DATENAME(month,T1.DueDate) when 'December' then T1.Credit  else 0 end)-sum(Case DATENAME(month,T1.DueDate) when 'December'
          then T1.Debit else 0 end)) Dec
    FROM  OCRD T0
            LEFT JOIN JDT1 T1 ON T1.ShortName = T0.CardCode
            AND Year(T1.Duedate) = 2011   AND T1.TransType in ('13','14')
    WHERE T0.CardType = 'C'
    Group By DATENAME(month,T1.DueDate), T0.CardCode, T0.CardName
    Thanks,
    Neetu

Maybe you are looking for