![]() |
Admin 12/16/2019 |
I would like to insert a record from Table(1) into table(2) based on field that is unique to Table(3) and Table(1) and in which Table(3) is right outer joined by field called class_id joined with Table(2) . Table 3 has for example 3 records with matching field in one record in Table(1).
|
![]() |
lefty author 12/16/2019 |
This just gives me vertigo. You cannot insert multiple records with a single command. SQL's INSERT insert one record at the time unless you copy data as is from one table to another using INSERT INTO ... SELECT FROM syntax. Try to narrow your question down to something more specific someone can understand and help.
|
![]() |
jadachDevClub member 12/16/2019 |
In cases like this, I execute a stored procedure. I find it much easier. |
![]() |
lefty author 12/17/2019 |
In cases like this, I execute a stored procedure. I find it much easier.
|
![]() |
Admin 12/18/2019 |
It didn't make things any clearer. |
![]() |
HJB 12/18/2019 |
@John - https://xlinesoft.com/phprunner/docs/db_insert.htm - manual content is very straight on the syntax to be used. If you are experimenting, if not to say, to provoke that you own a NEWER database API (with of course keeping us in the dark of what it is all about), I'm sorry to tell you this: You try to mix FIRE and WATER here to get a HOT solution for your Alumni client who not only stopped brainstorming decades ago (after Excel grids came alive), but as well totally REFUSE to go NEW paths which such university buddies had been trampling to be their very own eternal PATHS in regard to so called SPREADSHEET usage where students and classes and else are listed in rows and columns. My personal advice to you is this: Please try to shun to even listen to such clients at all as they are not only totally unwilling to go NEW paths, but, worst, are at least trying to somehow force you (monetarily speaking before their well known little budgets to go) to quickly please bring an "Excel like grid" solution at nearly ZERO cost to avoid "learning curves" and so, I fear, you are trying this forum to somehow create a WHITE ELEPHANT solution for such "antique" users who shall never ever change their data flow minds until the rest of their life. So, what you try is this: You got "mouse-trapped" by the requirements of the "antiques" and now you want to use this forum (which is by the way NOT a support forum for third party oriented NEW database API at all, not to talk even a support forum for PHPR at all) to somehow get you out of the jam. It's pity to see you as years old PHPR user to currently stay in a total "fall back" in the aim to somehow help out "WalkingDeads" on something called "spreadsheet= database" movie which even NETFLIX would be willing to buy "offhand" in regard to the public press- and movie-rights straightaway once the "mission impossible" bullet had been finally hitting the reality while PHPR usage and its overwhelming innovative upgrading schedule on averaged minimum twice a year (now on three months basis) is UNIQUE = too shiny for "antiques" anyway. |
![]() |
lefty author 12/18/2019 |
It didn't make things any clearer. I think you need to figure out for yourself if this is a SQL question or a PHPRunner question. If you can handle whatever you trying to achieve using plain SQL then you can just run the same query in PHPRunner using either of options available be that new Database API or old Database API. A SQL query is just a SQL query.
|