User Profile

Collapse

Profile Sidebar

Collapse
mmclancy
mmclancy
Last Activity: Feb 11 '13, 02:21 AM
Joined: Nov 13 '12
Location:
  •  
  • Time
  • Show
  • Source
Clear All
new posts

  • Aggregate function, count or max, on >2 joined tables where pk is composite

    How do I use an aggregate function, e.g. count or max of dvds where I have 4 tables & the table I want to get a count or max from (rental) has a composite key that is a combo of dvd and copy

    How do I use an aggregate function, e.g. count or max of dvds where I have 4 tables & the table I want to get a count or max from (rental) has a composite key that is a combo of dvd and copy. I want to know the number of dvds sold out/not...
    See more | Go to post
    Last edited by zmbd; Dec 4 '12, 03:13 PM. Reason: [Z{Please use the <CODE/> button to format posted programs, HTML, and SQL}{Stepped the posted SQL}]

  • mmclancy
    replied to Inserting date (mmyy) into table
    Thank you, Rabbit. I'm new to sql, it's true I had seen TO_CHAR when I looked at the documentation but always preceded by SELECT instead of INSERT. I only now figured out how to make it all work!! I really appreciate you pointing me in the right direction.
    See more | Go to post

    Leave a comment:


  • mmclancy
    started a topic Inserting date (mmyy) into table

    Inserting date (mmyy) into table

    I'm using Oracle's SQL Developer to do the following:
    Code:
    CREATE TABLE Account (
    AccountID INT NOT NULL,
    CreditID INT NOT NULL,
    CardType VARCHAR(15) NOT NULL,
    ExpiryDate DATE,
    PRIMARY KEY (AccountID),
    CONSTRAINT fk_credit_account FOREIGN KEY (CreditID) REFERENCES CreditCard
    )
    -- Table created
    -- ExpiryDate not returning as mm/yy 
    INSERT INTO Account (AccountID,CreditID,CardType,ExpiryDate);
    ...
    See more | Go to post
    Last edited by Rabbit; Nov 13 '12, 04:42 PM. Reason: Please use code tags when posting code.
No activity results to display
Show More
Working...