473,418 Members | 2,121 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,418 software developers and data experts.

Incorrect syntax near ','.

I wanna to try BULK Insert from NEW_TUTOR to TUTOR and below are my sql statement :

Expand|Select|Wrap|Line Numbers
  1. CREATE Table TUTOR(
  2. TutorName    varChar(100)    NOT NULL,
  3. TutorContact    Numeric(8)    NOT NULL,
  4. TutorAddress    Text        NULL,
  5. Qualification    varChar(10)    NULL DEFAULT 'Degree',
  6. CONSTRAINT    TutorNamePK    PRIMARY KEY(TutorName)
  7. );
  8.  
  9. CREATE Table NEW_TUTOR(
  10. TutorName    varChar(100)    NOT NULL,
  11. TutorContact    Numeric(8)    NOT NULL,
  12. Qualification    varChar(10)    NULL DEFAULT 'Degree',
  13. CONSTRAINT  NewTutorNamePK  PRIMARY KEY(TutorName)
  14. );
Expand|Select|Wrap|Line Numbers
  1. Insert into NEW_TUTOR(TutorName,TutorContact,Qualification)
  2.     values('John',56433227,'‘A’Level);
  3. Insert into NEW_TUTOR(TutorName,TutorContact,Qualification)
  4.     values('Min Shen',65768765,'‘O’Level');
  5. Insert into NEW_TUTOR(TutorName,TutorContact,Qualification)
  6.     values('Micheal',65678989,'‘A’Level');
  7.  
  8. INSERT INTO TUTOR(TutorName,TutorContact,Qualification) 
  9. SELECT (TutorName,TutorContact,Qualification)
FROM NEW_TUTOR;

When I execute the BULK Insert, the SQL SERVER prompted me
Msg 102, Level 15, State 1, Line 2
Incorrect syntax near ','.


Any suggestion how to over come this.
Sep 26 '10 #1
2 3111
ck9663
2,878 Expert 2GB
Check out the value's you're inserting to Qualification column. What's with '‘ ??

~~ CK
Sep 27 '10 #2
Thanks I found my mistake..

INSERT INTO TUTOR(TutorName,TutorContact,Qualification)
SELECT TutorName,TutorContact,Qualification
FROM NEW_TUTOR;

*Remove the () under select statement
Sep 29 '10 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

1
by: Jeff Magouirk | last post by:
Dear Group, I am trying to create a view and keep getting the Incorrect syntax near the keyword 'Declare'" error. Here is the code I am writing. Create view fixed_airs (sid, fad_a2, fad_a3)...
4
by: Carl | last post by:
Can you tell me what is wrong with this syntax ? string select = "UPDATE .. " + "(,,,,,,, ,,,, ,,, , , , ) " + " VALUES (@id,@clientid,@total,@tps,@tvq,@gtotal,@datefac,@datepay,
1
by: Zoury | last post by:
Hi there! :O) I trying to use a COM DLL (made in VB 6.0) from C#... and it hasn't been working well for me this far.. :O/ I did a sample in VB 6.0 that used the DLL and it works great.. so now...
2
by: JMUApache | last post by:
Hi, I have got a error message while I run a sample OLEDB program. It says "Incorrect Syntax Near The Keyword Default Information". platform: Windows XP + Visual Studio 2005 Beta 2 + SQL...
1
by: Sandesh | last post by:
Hello All, Me saying " has any body come across such error would be underestimating". Well I am getting a very peculiar and unique error "Line 1: Incorrect syntax near 'Actions'." ...
1
by: iporter | last post by:
In the following code, the two Response.Write statements output exactly the same - I can copy and paste both into Query Analyzer, and run them fine. However, if I comment out line 3, the...
3
by: wallic | last post by:
Hello, This is my first post and I am a beginner with SQL code. The code below is supposed to update a new table (loctable) with a calculated value based on the original table (hra_data). ...
0
by: roamnet | last post by:
hi i created database file with .mdf extention ,sql server as a source and use grid view to display data there're no problem in data retrieve and display,but i want to edit it or insert new...
10
by: arial | last post by:
Hi, I am getting this error message: Incorrect syntax near the keyword 'where'. Description: An unhandled exception occurred during the execution of the current web request. Please review...
1
by: karenkksh | last post by:
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. ...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
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...
0
agi2029
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
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 using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.