TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Goran Bibic
458
2.9k
201.3k
Insert into select from two tables values an instert in anot
May 25 2019 8:26 AM
Some help?
Error in ms sql
Msg 147, Level 15, State 1, Line 2
An aggregate may not appear in the WHERE clause unless it is in a subquery contained in a HAVING clause or a select list, and the column being aggregated is an outer reference.
INSERT
INTO
dbo.trebovnica(redni_broj, datum, radni_nalog, sifra , naziv, proizvodjac ,jedinica_mjere, kolicina, magacin)
Select
redni_broj, (
select
datum_otvaranja
from
dbo.radni_nalog_lista
WHERE
id = (
select
max
(id)
from
dbo.radni_nalog_lista)), (
select
broj_rn
from
dbo.radni_nalog_lista
WHERE
id=
MAX
(id)),
sifra, naziv, proizvodjac, jedinica_mjere, kolicina,
'Magacin proizvodnja Celinac'
from
dbo.normativi_roba
where
id_fakture=(
select
id
from
normativi_lista
where
id=2)
Reply
Answers (
1
)
solve incorect syntax near )
How did you design your database to your application intervi