Can someone see what is wrong with this?  Im stumped

   public class Card {
     int suit;
     int value;
     static int isStraight = 0;
     static int isFlush = 0;
     static int handCounter = 0;
     static int cardCounter = 0;
     boolean inUse = false;
     public int getSuit() {
          return suit;
     public void setSuit(int suit) {
          this.suit = suit;
     public int getValue() {
          return value;
     public void setValue(int value) {
          this.value = value;
     public boolean isInUse() {
          return inUse;
     public void setInUse(boolean inUse) {
          this.inUse = inUse;
    public static int checkPairs(int[] handValues){
         for (int x = 0; x<5; x++ ){
              for (int y = 0; y<5; y++ ){
                   if(handValues[x]==handValues[y]){
                        cardCounter ++;
              handCounter = handCounter + (cardCounter - 1);
               cardCounter = 0;
         System.out.println(handCounter);
         return handCounter;
    public static int checkStraight(int[] handValues){
              if(handValues[0] == (handValues[1]-1)){
                   if (handValues[1] == (handValues[2]-1)){
                        if (handValues[2] == (handValues[3]-1)){
                             if (handValues[3] == (handValues[4]-1)){
                                  ///System.out.println("straight");
                                      isStraight = 1;
                                  if (handValues[4] == 12){
                                        isStraight = 2;
              return isStraight;
    public static int checkFlush(Card[]inputHand){
         if (inputHand[0].suit == inputHand[1].suit){
              if (inputHand[1].suit == inputHand[2].suit){
                   if (inputHand[2].suit == inputHand[3].suit){
                        if (inputHand[3].suit == inputHand[4].suit){
                             isFlush = 1;
         return isFlush;
//handCheckerApp ,
import tcdIO.*;
public class handCheckerApp {
     ///these string arrays just hold the names of the values
     static String[] suitsArray = {"hearts" , "spades" , "diamonds" , "clubs" };
     static String[] valuesArray = {"two" , "three" , "four" , "five" , "six" , "seven" , "eight" , "nine" , "ten" , "jack" , "queen" , "king" ,"ace" };
     public static void main (String arguments []) {
          Terminal terminal = new Terminal();
          Card[] inputHand = new Card[5];
          Card[] deck = new Card[52];
          Card currentCard = new Card();
          for(int number = 0 ; number <= 12 ; number++){
               deck[number]= new Card();
               deck[number].suit = 0;
               deck[number].value = number;
          for(int number = 13 ; number <= 25 ; number++){
               deck[number]= new Card();
               deck[number].suit = 1;
               deck[number].value = (number - 13);
          for(int number = 26 ; number <= 38 ; number++){
               deck[number]= new Card();
               deck[number].suit = 2;
               deck[number].value = (number - 26);
          for(int number = 39 ; number <= 51 ; number++){
               deck[number]= new Card();
               deck[number].suit = 3;
               deck[number].value = (number - 39);
          terminal.println("Poker Hand Checker");
          terminal.println("~~~~~~~~~~~~~~~~~~");
          terminal.println("Suits key:..Hearts = 1");
          terminal.println("...................Spades = 2");
          terminal.println("...................Diamonds = 3");
          terminal.println("...................Clubs = 4");
          terminal.println(".............................");
          terminal.println("Values key:.Twos = 2");
          terminal.println("......................Threes = 3");
          terminal.println("......................Fours = 4");
          terminal.println("......................Fives = 5");
          terminal.println("......................Sixes = 6");
          terminal.println("......................Sevens = 7");
          terminal.println("......................Eights = 8");
          terminal.println("......................Nines = 9");
          terminal.println("......................Tens = 10");
          terminal.println("......................Jacks = 11");
          terminal.println("......................Queens = 12");
          terminal.println("......................Kings = 13");
          terminal.println("......................Aces = 14");
      ///this block of code marks cards in the deck as in use and adds them to the hand 
      for(int i = 0; i < 5; i++){///for1
          currentCard.value = (terminal.readInt("please enter card " + (i+1) + " value: " )-2);
          currentCard.suit = (terminal.readInt("please enter card " + (i+1) + " suit: " )-1);
          for (int x = 0; x< 52; x++){///for2
               if (deck[x].value == currentCard.value){///if1
                    if (deck[x].suit == currentCard.suit){///if2
                        if (deck[x].inUse == true){///elseif1
                             terminal.println("you chose that card already");
                             i--;
                        }///if3
                        else if(deck[x].inUse == false){///if3
                             deck[x].inUse = true;
                             inputHand[i] = deck[x];
                             terminal.println("this card is the " + valuesArray[(inputHand.value)] + " of " + suitsArray[(inputHand[i].suit )]);
                    }///elseif1
               }///if2
          }///if1
     }///for2
     }///for1     
     int handValues[] = {inputHand[0].value, inputHand[1].value, inputHand[2].value, inputHand[3].value, inputHand[4].value};
     java.util.Arrays.sort(handValues);     
     ///this method checks for pairs, two pairs, three of a kind, full house & four of a kind
     Card.checkPairs(handValues);
     if (Card.handCounter == 2) {
               terminal.println("You have a pair");
          if (Card.handCounter == 4) {
               terminal.println("You have two pair");
          if (Card.handCounter == 6) {
               terminal.println("You three of a kind");
          if (Card.handCounter == 8) {
               terminal.println("You have a full house");
          if (Card.handCounter == 12) {
               terminal.println("You have four of a kind");
          } else {
               terminal.println("");
          Card.checkStraight(handValues);
          Card.checkFlush(inputHand);
               if (Card.isStraight == 1 && Card.isFlush == 0){
                    terminal.println("You have a straight");
               if (Card.isStraight == 1 && Card.isFlush == 1){
                    terminal.println("You have a straight flush");
               if (Card.isStraight == 2 && Card.isFlush == 0){
                    terminal.println("You have a royal straight");
               if (Card.isStraight == 2 && Card.isFlush == 1){
                    terminal.println("You have a royal straight flush");
               if (Card.isStraight == 0 && Card.isFlush == 1){
                    terminal.println("You have a flush");
               if (Card.isStraight == 0 && Card.isFlush == 0){
                    terminal.println("");
Okay it's not recognising deck.inUse....i can't see why.
Can someone possibly point out some suggestions. Thanks, much appreciated.

> if (deck[x].inUse == true){///elseif1
>
it's giving me an error on this If else statement...
sorry ....
How about going the extra mile and actually posting the error message you receive rather than expecting everyone to guess? The more pertinent information you can provide, the easier it is to answer your question. And you want your question answered easily and quickly, right?
~

Similar Messages

  • Can anybody see what is wrong with this SQL statement?

    Hey guys, just a quick question. Can anybody tell me what is wrong with this line of SQL? I keep getting a syntax error message. I've been trying for ages and I can't see any problem at all!"
    {code}prepStat = connection.prepareStatement("INSERT INTO WeatherHistory (Date, Location, Overview, Temperature, WindDirection, WindSpeed, Pressure) VALUES ('"+date+"','"+location+"','"+temp+"','"+windDir+"','"+windSpd+"','"+pressure+"')");{code}
    All the field names and variables definitely exist so I can't see what the problem is!

    DHD wrote:
    Thanks for the replies.
    I've matched the correct number of column names and variables, but still no luck.
    And how exactly am I misusing Prepared Statements here?As noted above, not according to the code you posted. I didn't just pluck something out of my @ss and throw it out there. There was a reason behind what I said. And, if you mean you changed it, and you still got an exception, then post that exception (completely), and your new code, which is, hopefully, using PreparedStatement, (properly).

  • After upgrade my Iphone 4 to iso5, I can't add contact and I can't access the settings for mail,contacts and calender. The moment I select the setting for Mails, Contact and Calender it will jump back to home. Can someone advice what's wrong with it?

    After upgrade my Iphone 4 to iso5, I can't add contact and I can't access the settings for mail,contacts and calender. The moment I select the setting for Mails, Contact and Calender it will jump back to home. Can someone advice what's wrong with it?Problr

    Dear All
    i have done the same activity ( buy a new iphone 4 -> upgrade to ios5 - > configure email) with success-
    than when i start to move the contacts from old mobile to iphone (using the microsim) i receive the same crash
    in disgnosis e use i saw 2 dump with this title 'latestCrash-Preferences.plist and LatestCrash.plist. in each file the date is the same and i read:
    Exception Tyle: EXC_CRASH (SIGABRT)
    Exception code: 0x00000000, 0x00000000
    Chrashed Thread: 6
    in thread 6: name: Dispatch queue:
    com.apple.addressBookUI.ContactsSettingPlugin
    and thaan a lot of data.
    Have you any idea?
    thank in advance
    Fabio

  • Could someone explain what is wrong with this refind expression?

    Hi, could someone explain what is wrong with this refind expression
    faultCode:Server.Processing faultString:'Unable to invoke CFC - Malformed regular expression "^[0-2][0-9][/][0-1][0-2][/][1-2][0-9]{3}+$".'
    thanks

    ^[0-2][0-9][/][0-1][0-2][/][1-2][0-9]{3}$ works,
    thanks
    dates 12/12/2007matching

  • Can you see what's wrong with my sql clause?

    Select afkogltri sum( afpowemng ) as yqty
        from   ( afpo inner join afko on afpoaufnr = afkoaufnr )
        into   ( d_gltri , d_wemng )
        where  afpo~matnr = wa_pir-matnr
               and year( afko~gltri ) = year( sy-datum )
        group by afko~gltri. 
    The above is my sql clause, when I do a syntax check, it said:"Comma without preceding colon (after SELECT ?)"
    Can you tell me what's wrong with this sql clause?
    Thank you very much!

    Hi,
    Select Bgltri sum( Awemng ) <b>as yqty</b> (????)
    into ( d_gltri , d_wemng )
    from afpo as A inner join afko as B
    on Aaufnr = Baufnr 
    where A~matnr = wa_pir-matnr
    and year( B~gltri ) = year( sy-datum )
    group by B~gltri.
    ENDSELECT.
    eg<b>:... INTO (f1, ..., fn</b>)
    Places the result set in the target area (f1, ..., fn). The fields of the result set are transported to the target fields fi from left to right. INTO (f1, ..., fn) is allowed only if a list with n elements is also specified in the SELECT clause.
    <b>If the result of a selection is a table, the data is retrieved in a processing loop introduced by SELECT and concluded by ENDSELECT. The processing passes through the loop once for each line read. If the result is a single record, the closing ENDSELECT is omitted.</b>
    Example
    Output a list of all airlines (with short description and name):
    TABLES SCARR.
    DATA:  CARRID   LIKE SCARR-CARRID,
           CARRNAME LIKE SCARR-CARRNAME,
    SELECT CARRID CARRNAME
           INTO (CARRID, CARRNAME)
           FROM SCARR.
      WRITE: / CARRID, CARRNAME.
    ENDSELECT
    Thanks & Regards,
    Judith.

  • Any see what is wrong with this query?

    Logs Record Set - query - Top 4 of 4 Rows
    ATTRIBUTES DATELASTMODIFIED DIRECTORY MODE NAME SIZE TYPE
    1 [empty string] 06/06/2007 10:59:17 AM
    G:\Tracker\wwwRoot\Data
    [empty string] ChargedOut_06Jun2007_ILS_105634322.txt 828
    File
    2 [empty string] 06/06/2007 10:57:00 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Error_06Jun2007_ ILS_105634322.txt 88 File
    3 [empty string] 06/06/2007 10:58:46 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Final_06Jun2007_ ILS_105634322.txt 27841 File
    4 [empty string] 06/06/2007 10:56:07 AM
    G:\Tracker\wwwRoot\Data
    [empty string] Upload_06Jun2007_ ILS_105634322.txt 94768 File
    ChargeOut Stats - struct
    CACHED false
    COLUMNLIST NAME
    EXECUTIONTIME 0
    RECORDCOUNT 0
    SQL SELECT Name FROM Logs WHERE Name = 'ChargedOut_06Jun2007_
    ILS_105634322.txt'
    chargeOut Record Set - query - Top 0 of 0 Rows
    NAME
    CODE
    <cfdirectory directory="#ExpandPath('data')#"
    action="list" name="Logs"
    sort="Name">
    <cfquery dbtype="query" name="ChargedOut"
    result="stats">
    SELECT Name
    FROM Logs
    WHERE Name = 'ChargedOut#Set#.txt'
    </cfquery>
    I can not see why SELECT Name FROM Logs WHERE Name =
    'ChargedOut_06Jun2007_ ILS_105634322.txt' is not returning
    the
    corresponding record from the logs record set.

    Thanks, I finally saw the errant white space character!

  • Pictrivia 6 - Can you identify what's wrong with this setup?

    What's Pictrivia?
    It's a trivia presented as a picture - more picture, less words. If you love  solving puzzles, racking your brains on brain teasers,you would love this one.
    Who can participate?
    It's open to all. You can participate on Facebook, Twitter or here. If you are subscribed to our Facebook or Twitter channels, you'll see the message posted on early Saturday mornings  pacific time.
    How often will you post a trivia?
    Once a week on Fridays.
    How do I answer?
    You  can answer by replying to this discussion. If you saw the post on our  Facebook page or Twitter, simply comment on the post or reply to our  tweet.
    What do I get?
    Intellectual stimulation, thrill and pleasure of solving a puzzle!
    What's the skill level required?
    Beginners
    When will I know the right answer?
    On the following Wednesday.

    Access layer switch will became bridge root。(default priority,lowest MAC address 1111.1111.1111)。And this L2 network will working at low efficiency。

  • Can i know what is wrong with this sql?

    i have an error of invalid character.
    SELECT SUM(counter),TO_DATE(logdatetime)
    FROM NYP_LIBPORTAL.PORTAL_HOME_NON_LOGIN_LOG
    WHERE logdatetime = logdatetime
    AND (TO_DATE(logdatetime, 'DD-MON-YYYY') BETWEEN
    TO_DATE('01-JAN-2007', 'DD-MON-YYYY') AND TO_DATE('31-JAN-2007', 'DD-MON-YYYY'))
    GROUP BY TO_DATE (logdatetime);
    May i know is there any way that i need to make the changes?

    your problem is likely to be the TO_DATE(logdatetime) - if logdatetime is a DATE datatype, then you should never, ever use TO_DATE on it.
    But I suspect this has been sorted in a later post of yours?

  • Crop Functio... what is wrong with this code???

    Hi all,
    I have created this method to crop my bufferedimage, but when i call it it does not seem to do anything. :(
    Can anyone see what is wrong with it please?
    Thank you for you help!
    Claire
    x
         public BufferedImage cropImage()
              mBufferedImageCrop = copy(mBufferedImage);
              Graphics grphc = mBufferedImageCrop.getGraphics();
              Rectangle desiredArea = new Rectangle(10,10,10,10);
              BufferedImage sub_bi = mBufferedImageCrop.getSubimage(desiredArea.x, desiredArea.y,
                                                                                 desiredArea.width, desiredArea.height);
              grphc = mBufferedImageCrop.getGraphics();
              grphc.drawImage(sub_bi, desiredArea.x, desiredArea.y, this);
              repaint();
              return sub_bi;
         }I call this method using:
    displayPanel.cropImage();
    displayPanel.validate();
    repaint();Thanx

    I worked out the problem!
    :)

  • Can someone tell me what's wrong with this LOV query please?

    This query works fine..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = 'ADAM'
    But this one..
    select FILTER_NAME display_value, FILTER_ID return_value
    from OTMGUI_FILTER where username = apex_application.g_user
    Gives the following error.
    1 error has occurred
    * LOV query is invalid, a display and a return value are needed, the column names need to be different. If your query contains an in-line query, the first FROM clause in the SQL statement must not belong to the in-line query.
    Thanks very much,
    -Adam vonNieda

    Ya know, I still don't know what's wrong with this.
    declare
    l_val varchar2(100) := nvl(apex_application.g_user,'ADAM');
    begin
    return 'select filter_name display_value, filter_id return_value
    from otmgui_filter where username = '''|| l_val || '''';
    end;
    Gets the same error as above. All I'm trying to do is create a dropdown LOV which selects based on the apex_application.g_user.
    What am I missing here?
    Thanks,
    -Adam

  • When on the phone to someone the phone crackles and hangs up so the other person can't hear what is wrong with it? :(

    When on the phone to someone the phone crackles and hangs up so the other person can't hear what is wrong with it? :(

    That iPhone needs to be tested by the techs at an Apple store genius bar to see what is faulty in the hardware.

  • It says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    I just got my new iPad Mini2, and when I choose "sign in with your apple ID", it says that "there was a problem connecting to the server". What's wrong with this, and how can I deal with this problem?

    1. Turn router off for 30 seconds and on again
    2. Settings>General>Reset>Reset Network Settings

  • I can't figure out what's wrong with this code

    First i want this program to allow me to enter a number with the EasyReader class and depending on the number entered it will show that specific line of this peom:
    One two buckle your shoe
    Three four shut the door
    Five six pick up sticks
    Seven eight lay them straight
    Nine ten this is the end.
    The error message i got was an illegal start of expression. I can't figure out why it is giving me this error because i have if (n = 1) || (n = 2) statements. My code is:
    public class PoemSeventeen
    public static void main(String[] args)
    EasyReader console = new EasyReader();
    System.out.println("Enter a number for the poem (0 to quit): ");
    int n = console.readInt();
    if (n = 1) || (n = 2)
    System.out.println("One, two, buckle your shoe");
    else if (n = 3) || (n = 4)
    System.out.println("Three, four, shut the door");
    else if (n = 5) || (n = 6)
    System.out.println("Five, six, pick up sticks");
    else if (n = 7) || (n = 8)
    System.out.println("Seven, eight, lay them straight");
    else if (n = 9) || (n = 10)
    System.out.println("Nine, ten, this is the end");
    else if (n = 0)
    System.out.println("You may exit now");
    else
    System.out.println("Put in a number between 0 and 10");
    I messed around with a few other thing because i had some weird errors before but now i have narrowed it down to just this 1 error.
    The EasyReader class code:
    // package com.skylit.io;
    import java.io.*;
    * @author Gary Litvin
    * @version 1.2, 5/30/02
    * Written as part of
    * <i>Java Methods: An Introduction to Object-Oriented Programming</i>
    * (Skylight Publishing 2001, ISBN 0-9654853-7-4)
    * and
    * <i>Java Methods AB: Data Structures</i>
    * (Skylight Publishing 2003, ISBN 0-9654853-1-5)
    * EasyReader provides simple methods for reading the console and
    * for opening and reading text files. All exceptions are handled
    * inside the class and are hidden from the user.
    * <xmp>
    * Example:
    * =======
    * EasyReader console = new EasyReader();
    * System.out.print("Enter input file name: ");
    * String fileName = console.readLine();
    * EasyReader inFile = new EasyReader(fileName);
    * if (inFile.bad())
    * System.err.println("Can't open " + fileName);
    * System.exit(1);
    * String firstLine = inFile.readLine();
    * if (!inFile.eof()) // or: if (firstLine != null)
    * System.out.println("The first line is : " + firstLine);
    * System.out.print("Enter the maximum number of integers to read: ");
    * int maxCount = console.readInt();
    * int k, count = 0;
    * while (count < maxCount && !inFile.eof())
    * k = inFile.readInt();
    * if (!inFile.eof())
    * // process or store this number
    * count++;
    * inFile.close(); // optional
    * System.out.println(count + " numbers read");
    * </xmp>
    public class EasyReader
    protected String myFileName;
    protected BufferedReader myInFile;
    protected int myErrorFlags = 0;
    protected static final int OPENERROR = 0x0001;
    protected static final int CLOSEERROR = 0x0002;
    protected static final int READERROR = 0x0004;
    protected static final int EOF = 0x0100;
    * Constructor. Prepares console (System.in) for reading
    public EasyReader()
    myFileName = null;
    myErrorFlags = 0;
    myInFile = new BufferedReader(
    new InputStreamReader(System.in), 128);
    * Constructor. opens a file for reading
    * @param fileName the name or pathname of the file
    public EasyReader(String fileName)
    myFileName = fileName;
    myErrorFlags = 0;
    try
    myInFile = new BufferedReader(new FileReader(fileName), 1024);
    catch (FileNotFoundException e)
    myErrorFlags |= OPENERROR;
    myFileName = null;
    * Closes the file
    public void close()
    if (myFileName == null)
    return;
    try
    myInFile.close();
    catch (IOException e)
    System.err.println("Error closing " + myFileName + "\n");
    myErrorFlags |= CLOSEERROR;
    * Checks the status of the file
    * @return true if en error occurred opening or reading the file,
    * false otherwise
    public boolean bad()
    return myErrorFlags != 0;
    * Checks the EOF status of the file
    * @return true if EOF was encountered in the previous read
    * operation, false otherwise
    public boolean eof()
    return (myErrorFlags & EOF) != 0;
    private boolean ready() throws IOException
    return myFileName == null || myInFile.ready();
    * Reads the next character from a file (any character including
    * a space or a newline character).
    * @return character read or <code>null</code> character
    * (Unicode 0) if trying to read beyond the EOF
    public char readChar()
    char ch = '\u0000';
    try
    if (ready())
    ch = (char)myInFile.read();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (ch == '\u0000')
    myErrorFlags |= EOF;
    return ch;
    * Reads from the current position in the file up to and including
    * the next newline character. The newline character is thrown away
    * @return the read string (excluding the newline character) or
    * null if trying to read beyond the EOF
    public String readLine()
    String s = null;
    try
    s = myInFile.readLine();
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    if (s == null)
    myErrorFlags |= EOF;
    return s;
    * Skips whitespace and reads the next word (a string of consecutive
    * non-whitespace characters (up to but excluding the next space,
    * newline, etc.)
    * @return the read string or null if trying to read beyond the EOF
    public String readWord()
    StringBuffer buffer = new StringBuffer(128);
    char ch = ' ';
    int count = 0;
    String s = null;
    try
    while (ready() && Character.isWhitespace(ch))
    ch = (char)myInFile.read();
    while (ready() && !Character.isWhitespace(ch))
    count++;
    buffer.append(ch);
    myInFile.mark(1);
    ch = (char)myInFile.read();
    if (count > 0)
    myInFile.reset();
    s = buffer.toString();
    else
    myErrorFlags |= EOF;
    catch (IOException e)
    if (myFileName != null)
    System.err.println("Error reading " + myFileName + "\n");
    myErrorFlags |= READERROR;
    return s;
    * Reads the next integer (without validating its format)
    * @return the integer read or 0 if trying to read beyond the EOF
    public int readInt()
    String s = readWord();
    if (s != null)
    return Integer.parseInt(s);
    else
    return 0;
    * Reads the next double (without validating its format)
    * @return the number read or 0 if trying to read beyond the EOF
    public double readDouble()
    String s = readWord();
    if (s != null)
    return Double.parseDouble(s);
    // in Java 1, use: return Double.valueOf(s).doubleValue();
    else
    return 0.0;
    Can anybody please tell me what's wrong with this code? Thanks

    String[] message = {
        "One, two, buckle your shoe",
        "One, two, buckle your shoe",
        "Three, four, shut the door",
        "Three, four, shut the door",
        "Five, six, pick up sticks",
        "Five, six, pick up sticks",
        "Seven, eight, lay them straight",
        "Seven, eight, lay them straight",
        "Nine, ten, this is the end",
        "Nine, ten, this is the end"
    if(n>0)
        System.out.println(message[n]);
    else
        System.exit(0);

  • What's wrong with this content type definition?

    Could someone tell me what's wrong with this content type definition? When I click "New Folder" in a custom list, it should bring two fields 1) Name 2) Custom Order. However in my case when I click new folder, I see 1) Member (which is totally
    weird) 2) custom order. Where is it getting that Member field from?
    <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
    <!-- Parent ContentType: Folder (0x0120) -->
    <ContentType ID="0x012000c0692689cafc4191b6283f72f2369cff"
    Name="Folder_OrderColumn"
    Group="Custom"
    Description="Folder with order column"
    Inherits="TRUE"
    Version="0">
    <FieldRefs>
    <FieldRef ID="{35788ED2-8569-48DC-B6DE-BA72A4F87B7A}" Name="Custom_x0020_Order" DisplayName="Custom Order" />
    </FieldRefs>
    </ContentType>
    </Elements>

    Hi,
    According to your post, my understanding is that you had an issue about the custom content type with custom column.
    I don’t think there is any issue in the content type definition, and it also worked well in my environment.
    Did you have the Member field in the project?
    I recommend you create a simple project only with one custom Order column and one custom Folder_OrderColumn, then you can add more fields one by one.
    By doing this, it will be easier to find out the root cause of this error.
    Thanks,
    Jason
    Forum Support
    Please remember to mark the replies as answers if they help and unmark them if they provide no help. If you have feedback for TechNet Subscriber Support, contact
    [email protected]
    Jason Guo
    TechNet Community Support

  • What's wrong with this SQL?

    what's wrong with this SQL?
    Posted: Jan 16, 2007 9:35 AM Reply
    Hi, everyone:
    when I insert into table, i use the fellowing SQL:
    INSERT INTO xhealthcall_script_data
    (XHC_CALL_ENDED, XHC_SWITCH_PORT, XHC_SCRIPT_ID, XHC_FAX_SPECIFIED)
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N'
    FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION
    SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT, HH_SCRIPT,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    I always got an error like;
    VALUES (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS'), HH_SWITCHPORT,
    ERROR at line 3:
    ORA-00936: missing expression
    but I can't find anything wrong, who can tell me why?
    thank you so much in advance
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:38 AM in response to: jerrygreat Reply
    For starters, an insert select does not have a values clause.
    HTH -- Mark D Powell --
    PP
    Posts: 41
    From: q
    Registered: 8/10/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:48 AM in response to: mpowel01 Reply
    Even I see "missing VALUES" as the only error
    Eric H
    Posts: 2,822
    Registered: 10/15/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:54 AM in response to: jerrygreat Reply
    ...and why are you doing a UNION on the exact same two queries?
    (SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE' UNION SELECT TO_DATE(HH_END_DATE||' '||HH_END_TIME,'MM/DD/YY HH24:MI:SS') ,HH_SWITCHPORT ,HH_SCRIPT ,'N' FROM tmp_healthhit_load WHERE HH_SCRIPT !='BROCHURE');
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:55 AM in response to: mpowel01 Reply
    Hi,
    thank you for your answer, but the problem is, if I deleted "values" as you pointed out, and then execute it again, I got error like "ERROR at line 3:
    ORA-03113: end-of-file on communication channel", and I was then disconnected with server, I have to relogin SQLplus, and do everything from beganing.
    so what 's wrong caused disconnection, I can't find any triggers related. it is so wired?
    I wonder if anyone can help me about this.
    thank you very much
    jerry
    yingkuan
    Posts: 1,801
    From: San Jose, CA
    Registered: 10/8/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 9:59 AM in response to: jerrygreat Reply
    Dup Post
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:00 AM in response to: Eric H Reply
    Hi,
    acturlly what I do is debugging a previous developer's scipt for data loading, this script was called by Cron work, but it never can be successfully executed.
    I think he use union for eliminating duplications of rows, I just guess.
    thank you
    jerry
    mpowel01
    Posts: 1,516
    Registered: 12/7/98
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:03 AM in response to: yingkuan Reply
    Scratch the VALUES keyword then make sure that the select list matches the column list in number and type.
    1 insert into marktest
    2 (fld1, fld2, fld3, fld4, fld5)
    3* select * from marktest
    UT1 > /
    16 rows created.
    HTH -- Mark D Powell --
    Jagan
    Posts: 41
    From: Hyderabad
    Registered: 7/21/06
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 10:07 AM in response to: jerrygreat Reply
    try this - just paste the code and give me the error- i mean past the entire error as it is if error occurs
    INSERT INTO xhealthcall_script_data
    (xhc_call_ended, xhc_switch_port, xhc_script_id,
    xhc_fax_specified)
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE'
    UNION
    SELECT TO_DATE (hh_end_date || ' ' || hh_end_time, 'MM/DD/YY HH24:MI:SS'),
    hh_switchport, hh_script, 'N'
    FROM tmp_healthhit_load
    WHERE hh_script != 'BROCHURE';
    Regards
    Jagan
    jerrygreat
    Posts: 8
    Registered: 1/3/07
    Re: what's wrong with this SQL?
    Posted: Jan 16, 2007 11:31 AM in response to: Jagan Reply
    Hi, Jagan:
    thank you very much for your answer.
    but when I execute it, I still can get error like:
    ERROR at line 1:
    ORA-03113: end-of-file on communication channel
    so wired, do you have any ideas?
    thank you very much

    And this one,
    Aother question about SQL?
    I thought I already told him to deal with
    ORA-03113: end-of-file on communication channel
    problem first.
    There's nothing wrong (syntax wise) with the query. (of course when no "value" in the insert)

Maybe you are looking for

  • My computer crashed, how do I get my songs on my new one?

    My computer crashed and I lost everything. How can I get my songs on to my new computer?

  • Converting the layout from OTF format into PDF

    Hi Experts, I am new to SMART FORMS,I don't have a clue about how to convert the layout from OTF format into PDF format and how to store it in Presentation server. Please send me a Model program or step by step approach of the same. Useful inputs wil

  • 23" cinema (clear) have an IPS panel?

    My aging 23" cinema display (purchased in 2000, if I recall) is having brightness problems and I'm looking to replace it and wondering if I'll be happy with an inexpensive monitor. The 23" cinema has an IPS panel in it, right? A newer inexpensive mon

  • Service Po with different currencies

    Hi Experts, As per the requirement i want to do the Service PO. The scenario of the service PO is the each item in the service must be of the different type of the currency. For Ex 1) the service type is Contract of a building. in which it consists o

  • Selecting or de-selecting multiple songs in check boxes in playlist

    What's the trick for selecting or de-selecting multiple songs via check boxes in playlists, etc.? Figured this would be an easy one to figure out on my own, but here i am a few years later... Be easy on me, now.