[ORA]ORA-00917: Missing Comma when inserting into a table
I am trying to insert some data from a table into an empty table, and this is how far I have come:
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
Edit: With SELECT
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
SELECT
TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
sql oracle oracle11g
add a comment |
I am trying to insert some data from a table into an empty table, and this is how far I have come:
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
Edit: With SELECT
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
SELECT
TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
sql oracle oracle11g
1
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
2
The INSERT syntax isINSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.
– jarlh
Nov 16 '18 at 10:12
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15
add a comment |
I am trying to insert some data from a table into an empty table, and this is how far I have come:
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
Edit: With SELECT
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
SELECT
TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
sql oracle oracle11g
I am trying to insert some data from a table into an empty table, and this is how far I have come:
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
Edit: With SELECT
INSERT INTO T_TLF_KØ_KVARTER (TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
SELECT
TIDSPUNKT AS DATO,
TIDSRUM AS INTERVAL,
QUEUE AS KØ,
SUM(TOTAL_KALD_IALT) AS KALD_I_ALT,
SUM(ANTAL_KALD) AS KALD_INDGÅENDE,
SUM(ANTAL_DISTRIBUERET_KALD) AS KALD_DISTRIBUEREDE,
SUM(ANTAL_BESVARET) AS KALD_BESVAREDE,
SUM(IKKE_BESVARET_KALD) AS KALD_UBESVAREDE,
SUM(ANTAL_TABTE_KALD) AS KALD_TABTE,
SUM(BESVARET_25_SEK) AS KALD_BESVARET_U25,
SUM(CALLBACK) AS KALD_CALLBACKS,
SUM(BESVARET_I_KS) AS KALD_BESVARET_SC,
SUM(BESVARET_I_SC) AS KALD_BESVARET_DI,
SUM(BESVARET_PRI_SKILL) AS KALD_BESVARET_PRIMÆR_SKILL,
SUM(BESVARET_SEC_SKILL) AS KALD_BESVARET_SEKUNDÆR_SKILL
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
ORDER BY
QUEUE,
TIDSRUM
sql oracle oracle11g
sql oracle oracle11g
edited Nov 16 '18 at 10:12
Steve Hoff
asked Nov 16 '18 at 10:09
Steve HoffSteve Hoff
32
32
1
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
2
The INSERT syntax isINSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.
– jarlh
Nov 16 '18 at 10:12
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15
add a comment |
1
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
2
The INSERT syntax isINSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.
– jarlh
Nov 16 '18 at 10:12
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15
1
1
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
2
2
The INSERT syntax is
INSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.– jarlh
Nov 16 '18 at 10:12
The INSERT syntax is
INSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.– jarlh
Nov 16 '18 at 10:12
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15
add a comment |
2 Answers
2
active
oldest
votes
INSERT INTO T_TLF_KØ_KVARTER (DATO,
INTERVAL,
KØ,
KALD_I_ALT,
KALD_INDGÅENDE,
KALD_DISTRIBUEREDE,
KALD_BESVAREDE,
KALD_UBESVAREDE,
KALD_TABTE,
KALD_BESVARET_U25,
KALD_CALLBACKS,
KALD_BESVARET_SC,
KALD_BESVARET_DI,
KALD_BESVARET_PRIMÆR_SKILL,
KALD_BESVARET_SEKUNDÆR_SKILL)
SELECT
TIDSPUNKT,
TIDSRUM,
QUEUE,
SUM(TOTAL_KALD_IALT),
SUM(ANTAL_KALD),
SUM(ANTAL_DISTRIBUERET_KALD),
SUM(ANTAL_BESVARET),
SUM(IKKE_BESVARET_KALD),
SUM(ANTAL_TABTE_KALD),
SUM(BESVARET_25_SEK),
SUM(CALLBACK),
SUM(BESVARET_I_KS),
SUM(BESVARET_I_SC),
SUM(BESVARET_PRI_SKILL),
SUM(BESVARET_SEC_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
add a comment |
Correct syntax is
INSERT INTO destination_table (col1,col2--coln)
SELECT col1,col2---coln FROM source_table
WHERE condition; --if any
but you are using aggregation (SUM(TOTAL_KALD_IALT) AS KALD_I_ALT
) in place of column name in your query
add a comment |
Your Answer
StackExchange.ifUsing("editor", function () {
StackExchange.using("externalEditor", function () {
StackExchange.using("snippets", function () {
StackExchange.snippets.init();
});
});
}, "code-snippets");
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "1"
};
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: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
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
});
}
});
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%2fstackoverflow.com%2fquestions%2f53335585%2foraora-00917-missing-comma-when-inserting-into-a-table%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
2 Answers
2
active
oldest
votes
2 Answers
2
active
oldest
votes
active
oldest
votes
active
oldest
votes
INSERT INTO T_TLF_KØ_KVARTER (DATO,
INTERVAL,
KØ,
KALD_I_ALT,
KALD_INDGÅENDE,
KALD_DISTRIBUEREDE,
KALD_BESVAREDE,
KALD_UBESVAREDE,
KALD_TABTE,
KALD_BESVARET_U25,
KALD_CALLBACKS,
KALD_BESVARET_SC,
KALD_BESVARET_DI,
KALD_BESVARET_PRIMÆR_SKILL,
KALD_BESVARET_SEKUNDÆR_SKILL)
SELECT
TIDSPUNKT,
TIDSRUM,
QUEUE,
SUM(TOTAL_KALD_IALT),
SUM(ANTAL_KALD),
SUM(ANTAL_DISTRIBUERET_KALD),
SUM(ANTAL_BESVARET),
SUM(IKKE_BESVARET_KALD),
SUM(ANTAL_TABTE_KALD),
SUM(BESVARET_25_SEK),
SUM(CALLBACK),
SUM(BESVARET_I_KS),
SUM(BESVARET_I_SC),
SUM(BESVARET_PRI_SKILL),
SUM(BESVARET_SEC_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
add a comment |
INSERT INTO T_TLF_KØ_KVARTER (DATO,
INTERVAL,
KØ,
KALD_I_ALT,
KALD_INDGÅENDE,
KALD_DISTRIBUEREDE,
KALD_BESVAREDE,
KALD_UBESVAREDE,
KALD_TABTE,
KALD_BESVARET_U25,
KALD_CALLBACKS,
KALD_BESVARET_SC,
KALD_BESVARET_DI,
KALD_BESVARET_PRIMÆR_SKILL,
KALD_BESVARET_SEKUNDÆR_SKILL)
SELECT
TIDSPUNKT,
TIDSRUM,
QUEUE,
SUM(TOTAL_KALD_IALT),
SUM(ANTAL_KALD),
SUM(ANTAL_DISTRIBUERET_KALD),
SUM(ANTAL_BESVARET),
SUM(IKKE_BESVARET_KALD),
SUM(ANTAL_TABTE_KALD),
SUM(BESVARET_25_SEK),
SUM(CALLBACK),
SUM(BESVARET_I_KS),
SUM(BESVARET_I_SC),
SUM(BESVARET_PRI_SKILL),
SUM(BESVARET_SEC_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
add a comment |
INSERT INTO T_TLF_KØ_KVARTER (DATO,
INTERVAL,
KØ,
KALD_I_ALT,
KALD_INDGÅENDE,
KALD_DISTRIBUEREDE,
KALD_BESVAREDE,
KALD_UBESVAREDE,
KALD_TABTE,
KALD_BESVARET_U25,
KALD_CALLBACKS,
KALD_BESVARET_SC,
KALD_BESVARET_DI,
KALD_BESVARET_PRIMÆR_SKILL,
KALD_BESVARET_SEKUNDÆR_SKILL)
SELECT
TIDSPUNKT,
TIDSRUM,
QUEUE,
SUM(TOTAL_KALD_IALT),
SUM(ANTAL_KALD),
SUM(ANTAL_DISTRIBUERET_KALD),
SUM(ANTAL_BESVARET),
SUM(IKKE_BESVARET_KALD),
SUM(ANTAL_TABTE_KALD),
SUM(BESVARET_25_SEK),
SUM(CALLBACK),
SUM(BESVARET_I_KS),
SUM(BESVARET_I_SC),
SUM(BESVARET_PRI_SKILL),
SUM(BESVARET_SEC_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
INSERT INTO T_TLF_KØ_KVARTER (DATO,
INTERVAL,
KØ,
KALD_I_ALT,
KALD_INDGÅENDE,
KALD_DISTRIBUEREDE,
KALD_BESVAREDE,
KALD_UBESVAREDE,
KALD_TABTE,
KALD_BESVARET_U25,
KALD_CALLBACKS,
KALD_BESVARET_SC,
KALD_BESVARET_DI,
KALD_BESVARET_PRIMÆR_SKILL,
KALD_BESVARET_SEKUNDÆR_SKILL)
SELECT
TIDSPUNKT,
TIDSRUM,
QUEUE,
SUM(TOTAL_KALD_IALT),
SUM(ANTAL_KALD),
SUM(ANTAL_DISTRIBUERET_KALD),
SUM(ANTAL_BESVARET),
SUM(IKKE_BESVARET_KALD),
SUM(ANTAL_TABTE_KALD),
SUM(BESVARET_25_SEK),
SUM(CALLBACK),
SUM(BESVARET_I_KS),
SUM(BESVARET_I_SC),
SUM(BESVARET_PRI_SKILL),
SUM(BESVARET_SEC_SKILL)
FROM
GENESYS.NYK_SEAGATE_INTERVAL_QUEUE
GROUP BY
TIDSPUNKT,
TIDSRUM,
QUEUE
answered Nov 16 '18 at 10:19
Ted at ORCL.ProTed at ORCL.Pro
1,35028
1,35028
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
add a comment |
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Thank you alot, that fixed it!
– Steve Hoff
Nov 16 '18 at 10:34
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
Great @SteveHoff, don't forget to tick the answered option now :-)
– Ted at ORCL.Pro
Nov 16 '18 at 10:38
add a comment |
Correct syntax is
INSERT INTO destination_table (col1,col2--coln)
SELECT col1,col2---coln FROM source_table
WHERE condition; --if any
but you are using aggregation (SUM(TOTAL_KALD_IALT) AS KALD_I_ALT
) in place of column name in your query
add a comment |
Correct syntax is
INSERT INTO destination_table (col1,col2--coln)
SELECT col1,col2---coln FROM source_table
WHERE condition; --if any
but you are using aggregation (SUM(TOTAL_KALD_IALT) AS KALD_I_ALT
) in place of column name in your query
add a comment |
Correct syntax is
INSERT INTO destination_table (col1,col2--coln)
SELECT col1,col2---coln FROM source_table
WHERE condition; --if any
but you are using aggregation (SUM(TOTAL_KALD_IALT) AS KALD_I_ALT
) in place of column name in your query
Correct syntax is
INSERT INTO destination_table (col1,col2--coln)
SELECT col1,col2---coln FROM source_table
WHERE condition; --if any
but you are using aggregation (SUM(TOTAL_KALD_IALT) AS KALD_I_ALT
) in place of column name in your query
answered Nov 16 '18 at 10:18
Zaynul Abadin TuhinZaynul Abadin Tuhin
18.6k21134
18.6k21134
add a comment |
add a comment |
Thanks for contributing an answer to Stack Overflow!
- 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%2fstackoverflow.com%2fquestions%2f53335585%2foraora-00917-missing-comma-when-inserting-into-a-table%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
1
Where's the SELECT? Consider creating a view instead.
– jarlh
Nov 16 '18 at 10:10
That may be the problem
– Steve Hoff
Nov 16 '18 at 10:11
A view has already been created, but I need to insert the data into a table
– Steve Hoff
Nov 16 '18 at 10:12
2
The INSERT syntax is
INSERT INTO targettablename (tcol1, tcol2, ...) SELECT ... FROM sourcetablename ...
.– jarlh
Nov 16 '18 at 10:12
I have added it with SELECT, still saying missing comma
– Steve Hoff
Nov 16 '18 at 10:15