Ask Your Question
0

insert command when run this in SQL then error- too many identifier parts

asked 2016-10-10 08:19:53 +0200

koolninja gravatar image

updated 2016-10-10 08:20:33 +0200

i am using Two table "Issue" and "Total"

"Issue" - SlNo, ProductName, Quantity, Stock, Balance

"Total"- SlNo, ProductName, Balance

INSERT INTO "Issue" ("Issue"."Stock") values (SELECT "Total"."Balance" FROM

"Total","Issue" where "Issue"."Stock" is null and

"Issue"."ProductName"="Total"."ProductName")

when run this in SQL then error- too many identifier parts: Issue

I tried many ways but cant insert from "Total" to "Issue" Table

edit retag flag offensive close merge delete

1 Answer

Sort by » oldest newest most voted
0

answered 2016-10-10 09:52:40 +0200

Ratslinger gravatar image

I don't believe you want an INSERT statement but rather an UPDATE statement.

UPDATE "Issue" SET "Issue"."Stock" = (SELECT "Total"."Balance" FROM "Total" WHERE "Issue"."ProductName"="Total"."ProductName")  WHERE "Issue"."Stock" IS NULL
edit flag offensive delete link more

Comments

Thanks for correcting my approach and its satisfy my needs.

koolninja gravatar imagekoolninja ( 2016-10-10 19:43:02 +0200 )edit
Login/Signup to Answer

Question Tools

1 follower

Stats

Asked: 2016-10-10 08:19:53 +0200

Seen: 49 times

Last updated: Oct 10 '16