Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 921379
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T18:51:58+00:00 2026-05-15T18:51:58+00:00

Hey, I am new to Oracle SQL and I am trying to make a

  • 0

Hey, I am new to Oracle SQL and I am trying to make a trigger which has an insert dependent on columns received from a select query.

I have a basic fantasy baseball app and I am trying to update a table which correlates the player to the team he played on for a single day. The basic idea i want to do is to update the date for each team where the player played on when the batterStat table is changed. So for example (all the static variables are just :new values from the trigger on batterStat).

insert into onTeam(date, player, teamName) values ('newDate','Matt Holliday',(select teamName from onTeam where player = 'Matt Holliday'))

So this would be all fine if Matt Holliday didn’t play for more than one team, so is there a way to make it insert for each value returned from that nested select along with the two static variables?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T18:51:59+00:00Added an answer on May 15, 2026 at 6:51 pm

    Try something like this:

    insert into onTeam(date, player, teamName) 
    select 'newDate','Matt Holliday', teamName 
    from onTeam where player = 'Matt Holliday'
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Hey I am new to android development and most programing in general other then
Hey guys quite new to smarty and was wondering if i could load templates
Hey so I a new to C but a intermediate level programmer in general.
Hey All- I'm completely new to Django/python and am going through a tutorial for
Hey guys I'm new to rails, There's a lot of eye-opener for me, and
Hey I am very new to jquery using asp.net, and I was wondering how
Hey guys, I'm new to Java (well, 3/4 of a year spent on it).
Hey guys, I'm new to jQuery/js and having a hard time figuring this out.
In .NET reference type arrays are co-variant. This is considered a mistake. However, I
I have two classes. I created a JAR file using: jar cvf practice.jar class1.class

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.