Three tables with some matching data and some not - want to data from all threeExport/import data from Excel...
How to transport 10,000 terrestrial trolls across ocean fast?
Why is it that Bernie Sanders always called a "socialist"?
70s or 80s B-movie about aliens in a family's television, fry the house cat and trap the son inside the TV
What sort of grammatical construct is ‘Quod per sortem sternit fortem’?
Will the duration of traveling to Ceres using the same tech developed for going to Mars be proportional to the distance to go to Mars or not?
Including proofs of known theorems in master's thesis
Identify non-coding regions from a genome annotation
Graphical modeler calculator missing in QGIS3
Do the speed limit reductions due to pollution also apply to electric cars in France?
What is this mysterious *green square* on my Content Editor?
How do I make my single-minded character more interested in the main story?
Partial derivative with respect to three variables
Buying a "Used" Router
Is the tritone (A4 / d5) still banned in Roman Catholic music?
Crack the bank account's password!
Are one-line email responses considered disrespectful?
How do I narratively explain how in-game circumstances do not mechanically allow a PC to instantly kill an NPC?
Are all power cords made equal?
How bad is a Computer Science course that doesn't teach Design Patterns?
Why do single electrical receptacles exist?
What does @ mean in a hostname in DNS configuration?
What is formjacking?
In the Lost in Space intro why was Dr. Smith actor listed as a special guest star?
I am a loser when it comes to jobs, what possibilities do I have?
Three tables with some matching data and some not - want to data from all three
Export/import data from Excel into a table with queriesQuery using joinsMatching table (with sub-tables) to another table(with sub-tables) efficientlySQL Join Query to missing Some records from first tableHow to calculate required ressources from a baseline and what should be measured at all?Temporary Tables With Nonclustered Indexes Including All ColumnsSingle Row Table for Storing an Additional Unique IdentifierConsolidating multiple related queries, each using different window and/or criteria for counting recordsHow to display data from table 1 separately, and combined with matching rows from table 2Why don't we prefer SubQueries instead of JOINs
I have three tables
Costs (47 rows)
Budgets (60 rows)
Committed Costs (12 rows)
All three have the same 2 fields and than a number
JobNumber, CostCode, (either costs, budget, commitedcosts)
They all have the same JobNumber and they all CostCode in common. However they also each have unique CostCodes. I need to run a query that would get me results from all three tables like this:
JobNumber, CostCode, Costs, Budgets, CommitedCosts
Currently I am using outer joins on the three tables and only getting 47 results since the Costs table is the first table selected from.
sql-server-2014
New contributor
add a comment |
I have three tables
Costs (47 rows)
Budgets (60 rows)
Committed Costs (12 rows)
All three have the same 2 fields and than a number
JobNumber, CostCode, (either costs, budget, commitedcosts)
They all have the same JobNumber and they all CostCode in common. However they also each have unique CostCodes. I need to run a query that would get me results from all three tables like this:
JobNumber, CostCode, Costs, Budgets, CommitedCosts
Currently I am using outer joins on the three tables and only getting 47 results since the Costs table is the first table selected from.
sql-server-2014
New contributor
add a comment |
I have three tables
Costs (47 rows)
Budgets (60 rows)
Committed Costs (12 rows)
All three have the same 2 fields and than a number
JobNumber, CostCode, (either costs, budget, commitedcosts)
They all have the same JobNumber and they all CostCode in common. However they also each have unique CostCodes. I need to run a query that would get me results from all three tables like this:
JobNumber, CostCode, Costs, Budgets, CommitedCosts
Currently I am using outer joins on the three tables and only getting 47 results since the Costs table is the first table selected from.
sql-server-2014
New contributor
I have three tables
Costs (47 rows)
Budgets (60 rows)
Committed Costs (12 rows)
All three have the same 2 fields and than a number
JobNumber, CostCode, (either costs, budget, commitedcosts)
They all have the same JobNumber and they all CostCode in common. However they also each have unique CostCodes. I need to run a query that would get me results from all three tables like this:
JobNumber, CostCode, Costs, Budgets, CommitedCosts
Currently I am using outer joins on the three tables and only getting 47 results since the Costs table is the first table selected from.
sql-server-2014
sql-server-2014
New contributor
New contributor
New contributor
asked 6 mins ago
Patrick BergmannPatrick Bergmann
1
1
New contributor
New contributor
add a comment |
add a comment |
0
active
oldest
votes
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "182"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: false,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: null,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
Patrick Bergmann is a new contributor. Be nice, and check out our Code of Conduct.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230520%2fthree-tables-with-some-matching-data-and-some-not-want-to-data-from-all-three%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
0
active
oldest
votes
0
active
oldest
votes
active
oldest
votes
active
oldest
votes
Patrick Bergmann is a new contributor. Be nice, and check out our Code of Conduct.
Patrick Bergmann is a new contributor. Be nice, and check out our Code of Conduct.
Patrick Bergmann is a new contributor. Be nice, and check out our Code of Conduct.
Patrick Bergmann is a new contributor. Be nice, and check out our Code of Conduct.
Thanks for contributing an answer to Database Administrators Stack Exchange!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2fdba.stackexchange.com%2fquestions%2f230520%2fthree-tables-with-some-matching-data-and-some-not-want-to-data-from-all-three%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown