Yahoo Answers is shutting down on May 4th, 2021 (Eastern Time) and beginning April 20th, 2021 (Eastern Time) the Yahoo Answers website will be in read-only mode. There will be no changes to other Yahoo properties or services, or your Yahoo account. You can find more information about the Yahoo Answers shutdown and how to download your data on this help page.

Lv 31,634 points

Jonathan J

Favorite Answers37%
Answers244
  • selecting from database when rows are shared on another table?

    Hi,

    I'm having an issue trying to extract data from a table that is kinda shared. Here are the tables I've created:

    CREATE TABLE CUSTOMER

    (SSN CHAR(9) NOT NULL,

    FNAME VARCHAR(15) NOT NULL,

    LNAME VARCHAR(15) NOT NULL,

    PHONE CHAR(10),

    ADDRESS VARCHAR(30) ,

    PRIMARY KEY (SSN));

    CREATE TABLE ACCOUNT

    (ACC_NO CHAR(10) NOT NULL,

    BALANCE DECIMAL(10,2) NOT NULL,

    OPEN_DATE DATE,

    TYPE CHAR(10) ,

    PRIMARY KEY (ACC_NO));

    CREATE TABLE OWNS

    (SSN CHAR(9) NOT NULL,

    ACC_NO CHAR(10) NOT NULL,

    OWN_DATE DATE,

    TYPE CHAR(10) ,

    PRIMARY KEY (SSN,ACC_NO),

    FOREIGN KEY(SSN) REFERENCES CUSTOMER(SSN),

    FOREIGN KEY(ACC_NO) REFERENCES ACCOUNT(ACC_NO));

    Here is what is inserted into the database:

    INSERT INTO CUSTOMER

    VALUES ('123456789','John','Smith','7077777070','6000 J St Sacramento, CA 95815');

    INSERT INTO CUSTOMER

    VALUES ('234567890','Jane','Doe','7776541238','666 J St Sacramento, CA 95815');

    INSERT INTO ACCOUNT

    VALUES ('002','7500.99',TO_DATE('1999-11-18', 'YYYY-MM-DD'),'Checking');

    INSERT INTO OWNS

    VALUES ('123456789','002',TO_DATE('1999-11-15', 'YYYY-MM-DD'),'Checking');

    INSERT INTO ACCOUNT

    VALUES ('001','500.99',TO_DATE('1999-11-15', 'YYYY-MM-DD'),'Savings');

    INSERT INTO OWNS

    VALUES ('234567890','001',TO_DATE('1999-11-15', 'YYYY-MM-DD'),'Savings');

    INSERT INTO OWNS

    VALUES ('234567890','002',TO_DATE('1999-11-18', 'YYYY-MM-DD'),'Checking');

    Basically. I am trying to retrieve information regarding customer Jane Doe. I am trying to do:

    SELECT O.SSN,COUNT(A.ACC_NO),SUM(A.BALANCE)

    FROM ACCOUNT A, OWNS O

    WHERE O.ACC_NO=A.ACC_NO AND O.SSN=(SELECT O2.SSN

    FROM OWNS O2

    WHERE COUNT(O2.ACC_NO) >=2) ;

    However I know that this runs into a grouping issue. I don't know how to resolve it. I want to use a query that doesn't require a specific customer's data as the database will be updated in the future. I tried using natural joins but I'm not sure where to go from there. I tried:

    SELECT SSN,COUNT(ACC_NO),SUM(BALANCE)

    FROM ((CUSTOMER NATURAL JOIN OWNS) NATURAL JOIN ACCOUNT)

    WHERE COUNT(ACC_NO)>=2;

    But I realized that this runs into a similar issue. Can someone help me out?

    4 AnswersProgramming & Design1 decade ago
  • unable to insert date values into a database?

    Hi,

    I'm using sql for the first time and going through some examples but I'm having one issue I can't figure out. I'll create a table that requires a date value, but I have an error when I try to put in something for my date value. The following is my sql commands to create the associated tables:

    CREATE TABLE LOAN

    (LOAN_NO INT NOT NULL,

    AMOUNT DECIMAL(10,2) NOT NULL,

    TYPE CHAR(10) ,

    PRIMARY KEY (LOAN_NO));

    CREATE TABLE PAYMENT

    (LOAN_NO INT NOT NULL,

    PAYMENT_NO INT NOT NULL,

    AMOUNT DECIMAL(10,2) NOT NULL,

    METHOD CHAR(10) NOT NULL,

    STATUS CHAR(10) ,

    DUE_DATE DATE,

    PRIMARY KEY (LOAN_NO,PAYMENT_NO),

    FOREIGN KEY (LOAN_NO) REFERENCES LOAN(LOAN_NO));

    The following are my insert commands. Inserting into the payment table fails on both accounts...

    INSERT INTO LOAN

    VALUES ('100','35000.00','Car');

    INSERT INTO LOAN

    VALUES ('101','350000.00','House');

    INSERT INTO LOAN

    VALUES ('102','3500.00','TV');

    INSERT INTO PAYMENT

    VALUES ('100','1','700.25','cash','not paid','1999-12-15');

    INSERT INTO PAYMENT

    VALUES ('100','2','7.25','check','paid','1999-11-15');

    The error given in each case is:

    VALUES ('100','1','700.25','cash','not paid','1999-12-15')

    *

    ERROR at line 2:

    ORA-01861: literal does not match format string

    according to my book, the correct format for date should be YYYY-MM-DD, so I'm not sure what the error is. Could someone help me?

    3 AnswersProgramming & Design1 decade ago
  • little help with dr scheme issue?

    Hi. I'm really new to dr scheme and I'm in process of doing a hwk assignment. I have two questions. First off, where is a good place for a dr scheme reference?

    Second, I have a little assignment that I am having problems with the correct use of parenthesis and I was wondering if you can see what is causing my issue?

    (define (pMinMax L)

    (cond ((null? L) '())

    (let ((min (min-val(L)))(max (max-val(L))))

    display ("The min value of the list is: " min "/nThe max of the list is: " max))))

    There is something wrong with let, but so far from mimicking other code i see online and in my text, I can't figure out what my issue is.

    2 AnswersProgramming & Design1 decade ago
  • Do any of the current t-mobile smartphones allow the viewing of documents by default?

    I currently own the blackberry and I know by purchasing an app I will be able to open and view documents. By default, Blackberry phones only allow you to view documents if they are attached to an e-mail pushed to your phone. My older sister is looking into getting a new smartphone with T-Mobile. I know they have the blackberry Bold and I can give her a work around solution with that phone,but I was wondering if there were any current phones for the service that has that capability from default? I can't find much information on their Windows Mobile Phones and I can find no information about the application capability of the Sidekicks.

    4 AnswersCell Phones & Plans1 decade ago
  • What is Standard Deviation mean to Mean?

    I can't remember entirely, but I thought that the standard deviation gave the idea of the spread +/- numbers generally lay from the mean? Is this correct or do I have the wrong assumption?

    1 AnswerMathematics1 decade ago
  • Isn't the chances of earning two dollars from mega millions 1 in 46?

    I am really confused because I am currently doing probability homework for one of my classes. I have a set of questions based on the MEGA Millions lottery, but none of the probabilities I've created match what is listed on the wikipedia page or the official site when I compute the probabilities myself.

    For example, wikipedia currently lists that the probability of earning $2 (a net of $1) is 1 in 75. However, I computed it to be 1 in 46.

    I did this my the following equation:

    (nCr(56,5)*nCr(1,1))/(nCr(56,5)*nCr(46,1))

    The nCr(56,5)s should simplify to 1 leaving the answer to be 1/46. Am I missing something?

    2 AnswersGambling1 decade ago
  • (Fallout 2) Are the side-effects of healing powder permanent?

    I am paranoid about using the healing powder item in Fallout 2. I can't figure out from the manual or any FAQ if the loss to perception is permanent or not. Is it permanent? If not, how long does it last?

    2 AnswersVideo & Online Games1 decade ago
  • Sprint Customers: LG Rumor or Moto Q 9c?

    Ok this is a very linear question but hear me out. I am stuck between getting two phones for sprint one is the LG Rumor and the other is the Q 9c.

    The Q 9c seems to be a very nice smartphone for $100 after rebate. It supports EVDO (not sure about rev. A), full-keyboard, internet capabilities, micro-SD support, camera, sprint power vision support.

    The LG Rumor is half the price with less features. It is capable of WAP web browsing, but not using any version of EVDO so the speed is barely faster than dial-up. It however has a full fledged keyboard that slides out so it is great for text messages and has built in support for AIM,Yahoo, and MSN messengers.

    Another plus in my book for Rumor is that it doesn't use windows mobile while 9c does. Some see this as a minus, but I've had friends that had to hard reset their phones several times that had Windows Mobile 5 or 6.0 as an OS. 9c uses 6.1, but after trying Vista sp1 I'm not willing to use a simple point release.

    What do you think?

    1 AnswerCell Phones & Plans1 decade ago
  • smartphone users: How often do you use your phone for internet?

    I am currently a sprint customer and I am using their basic plan. I bought an upstage because i was considering to use it for music and for data, but the lack of a full keyboard made internet use horrid so I cut off the data plan and using it to play music killed my battery despite the phone having two batteries, so I ended up getting a separate MP3 player.

    Even though I've only had the phone for a year, Sprint neglected to extend my contract so I'm free to use their $150 rebate or just leave.

    Ok enough about me complaining, but I thought this would give you an idea of how I feel about using the cell phone for internet. Sure the upstage had the issue with two screens and no full keyboard, but to even with a full keyboard... i don't know how often I would use it.

    So I wanted to ask just how often any of you with smartphones use the internet. I wanted to gauge from other people and figure out what I really want to get.

    2 AnswersPDAs & Handhelds1 decade ago
  • Suikoden III: Can't find Viki?

    I'm in chapter 4 and I just got through a major tactical battle with a designated Flame Champion. I'm trying to recruit as many people as possible before I go on to chapter 5. I've heard that I am supposed to be able to recruit Viki during chapter 4 at mountian pass, but it doesn't seem to happen. Am I possibly missing something? or is some other scene supposed to occur before in chapter 4?

    5 AnswersVideo & Online Games1 decade ago
  • What is your honest opinion of this song? (FF X-2 with additional lyrics)?

    The lyrics were written by me and the vocals were added to the opening of FFX-2 thanks to Andrew of http://www.songstowearpantsto.com/

    The lyrics were based on the characters Yuna from FFX/FFX-2 and Yuri from Shadow Hearts 1 & 2.

    Please be critical of it as you listen to it.

    http://www.divshare.com/download/441406-299

    Also because I love the guy, check out more of his songs and request your own at http://www.songstowearpantsto.com/

    1 AnswerVideo & Online Games1 decade ago
  • Do you think the Sega CD will be added to VC for Wii?

    My favorite sonic game of all time was one hardly anyone played when it came out because it was on the Sega CD. However this system is the least successful of Sega's consoles and this game is probably the only game Nintendo would allow on VC. Because of that do you think VC will eventually include the Sega CD? Why or why not?

    2 AnswersVideo & Online Games1 decade ago
  • Is there a pop culture reference to Family Guy's 'whip' skits?

    There was a running gag within an episode of Family Guy in which the word whip is pronounced strangely by some people. Since most of the comedy in the series is based on pop culture, I was wondering if there was some cultural reference to this?

    The most remembered scene is probably between Stewie and Brian over the pronounciation of Cool Whip,

    3 AnswersComics & Animation1 decade ago