Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 Transact-SQL (2000)
 Error 156: Incorrect syntax near the word 'INSERT'

Author  Topic 

rfan99
Starting Member

3 Posts

Posted - 2006-09-14 : 13:46:07
I tried to creat a VIEW in SQL 2000, after copy all rows from ICI1 table to PRODUCT view, I like to add "ALL" in the first row of my VIEW. However, I have the following error.

"Error 156: Incorrect syntax near the word 'INSERT' "

CREATE VIEW dbo.PRODUCT
AS
SELECT PRODCT, PRODCTDES
FROM dbo.ICI1
GO
INSERT INTO dbo.PRODUCT (PRODCT, PRODCTDES) VALUES ('ALL','ALL')
DROP VIEW dbo.PRODUCT

Can someone help me?

DonAtWork
Master Smack Fu Yak Hacker

2167 Posts

Posted - 2006-09-14 : 13:47:58
Add this "ALL" row in your front end and not on the back end (SQL).

[Signature]For fast help, follow this link:
http://weblogs.sqlteam.com/brettk/archive/2005/05/25.aspx
Learn SQL
http://www.sql-tutorial.net/
http://www.firstsql.com/tutor.htm
http://www.w3schools.com/sql/default.asp
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2006-09-14 : 14:20:54
Duplicate of http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=72028
Go to Top of Page
   

- Advertisement -