Solved

select into

Posted on 2006-10-27
3
269 Views
Last Modified: 2008-02-01
Hi,

I used below stmt, its giving error. Could any one let me know.

DECLARE @Pub CHAR(10);
SELECT RowPub into @Pub FROM DBO.XXX_SecurityRight WHERE RightID=0;

Whats wrong in the above stmt. I am using above line of code inside my After insert trigger.

Error is as:

Msg 170, Level 15, State 1, Server SYS_034, Procedure TI_SecurityRight, Line 14
Line 14: Incorrect syntax near '@Pub'.

Regds.
~ HNS ~
0
Comment
Question by:homnath_sharma
  • 2
3 Comments
 
LVL 142

Accepted Solution

by:
Guy Hengel [angelIII / a3] earned 50 total points
Comment Utility
DECLARE @Pub CHAR(10);
SELECT @Pub = RowPub FROM DBO.XXX_SecurityRight WHERE RightID=0;
0
 
LVL 75

Expert Comment

by:Aneesh Retnakaran
Comment Utility
SELECT @Pub = RowPub FROM DBO.XXX_SecurityRight WHERE RightID=0;

0
 
LVL 142

Expert Comment

by:Guy Hengel [angelIII / a3]
Comment Utility
the syntax SELECT INTO like you tried to use is Oracle Syntax, but you seem to be using SQL Server, looking at the error message.
0

Featured Post

Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

Join & Write a Comment

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
Shadow IT is coming out of the shadows as more businesses are choosing cloud-based applications. It is now a multi-cloud world for most organizations. Simultaneously, most businesses have yet to consolidate with one cloud provider or define an offic…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

10 Experts available now in Live!

Get 1:1 Help Now