I am writing a dynamic query -
insert into Tablename select '1111',
-
name,address,phone,'1111', exec usp_storedProcedureName '1111', '1111', 'KA','EA'
-
from edi856Item
-
where autoid = '1111'
I dont know why I am getting this error i think there is some syntax error:
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'exec'.
Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'from'.
Can anyone help please
2 1486
Please enclose your posted code in [code] tags (See How to Ask a Question).
This makes it easier for our Experts to read and understand it. Failing to do so creates extra work for the moderators, thus wasting resources, otherwise available to answer the members' questions.
Please use [code] tags in future.
MODERATOR
I am writing a dynamic query -
insert into Tablename select '1111',
-
name,address,phone,'1111', exec usp_storedProcedureName '1111', '1111', 'KA','EA'
-
from edi856Item
-
where autoid = '1111'
I dont know why I am getting this error i think there is some syntax error:
Msg 156, Level 15, State 1, Line 3
Incorrect syntax near the keyword 'exec'.
Msg 156, Level 15, State 1, Line 5
Incorrect syntax near the keyword 'from'.
Can anyone help please
Hi,
Try with the following insert statement, in ur insert statement one comma(,) is missing.... -
-
INSERT INTO Tablename SELECT '1111',
-
name,address,phone,'1111','exec usp_storedProcedureName', '1111', '1111', 'KA','EA' FROM edi856Item
-
WHERE autoid = '1111'
Regards,
S.Ashokkumar
Sign in to post your reply or Sign up for a free account.
Similar topics |
by: Steve |
last post by:
I just spent waaaaaaaaaaaayy too much time trying to track down an error that was incorrectly reported just now, and I would like to see if someone
can explain to me why it was reported that way.
...
|
by: Donald Canton |
last post by:
Hi,
I'm using Bjarne's book to learn C++ and am stuck on the Calc program
in Section 6. Everything works fine except when I try to use
istringstream to parse a token from the command line. I...
|
by: r.nikhilk |
last post by:
Hi,
Currently, we are porting C++ applications from 32 bit to 64 bit on AIX
platform. (The current version of AIX is 5.3 and xlC verison is 8.0).
We are able to compile the applications by...
|
by: david |
last post by:
Anyone could give me a hand about this syntax error? Thank you.
David
Source Code:
Dim conn As New SqlConnection(strConn)
Dim daAngio As New SqlDataAdapter(strSelectStatement, conn)
'Create a...
|
by: Manuel |
last post by:
I'm trying to compile glut 3.7.6 (dowbloaded from official site)using
devc++.
So I've imported the glut32.dsp into devc++, included manually some
headers, and start to compile.
It return a very...
| |
by: Hari Sekhon |
last post by:
I've written an except hook into a script as shown below which works
well for the most part and catches exceptions.
import sys
def myexcepthook(type,value,tb):
do something
...
|
by: Josh |
last post by:
I have a lot of except Exception, e statements in my code, which poses some
problems. One of the biggest is whenever I refactor even the triviallest
thing in my code.
I would like python to...
|
by: bryant |
last post by:
Hi all.
I am new to ASP and working in Expression Web. The following query
displays the information I need in the gridview for a single record.
SELECT "OE_HDR"."ORD_NO", "OE_HDR"."CUST_NAM",...
|
by: muby |
last post by:
Hi everybody :)
I'm modifying a C++ code in VC++ 2005
my code snippet
void BandwidthAllocationScheduler::insert(
Message* msg,
BOOL* QueueIsFull,
|
by: Banfa |
last post by:
So I have a little problem, I have a template class and that class contains a template function; now what I want to do is declare that function in the class (or indeed the entire class) as a friend...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
| |
by: Hystou |
last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
|
by: Hystou |
last post by:
Overview:
Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The...
|
by: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence...
| |