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.
| Author |
Topic |
|
mentalabilities
Starting Member
2 Posts |
Posted - 2006-03-15 : 15:22:32
|
I tried to run a SQL script and i get the following message quote: Error Message = Native SQL Error Code[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ''.SELECT name, id, description FROM products WHERE id=4INSERT INTO ''admin_login'' (''login_id'', ''login_name'', ''password'', ''details'') VALUES (252,''neo2'',''newpas5'',''NA'')--Error Code : 350F:\Inetpub\Parexel\default.ihtmliSQL dbname="Parexel" ALIAS="prod" SQL="SELECT name, id, description FROM products WHERE id=4INSERT INTO 'admin_login' ('login_id', 'login_name', 'password', 'details') VALUES (252,'neo2','newpas5','NA')--"[Microsoft][ODBC SQL Server Driver][SQL Server]Line 1: Incorrect syntax near ''.SELECT name, id, description FROM products WHERE id=4INSERT INTO ''admin_login'' (''login_id'', ''login_name'', ''password'', ''details'') VALUES (252,''neo2'',''newpas5'',''NA'')--
Im new to SQL and i dont know what im doing Also what does this mean quote: iSQL dbname="admin" ALIAS="prod" SQL="SELECT name, id, description
What do SQL databases do and what would i need to do to enter data in to SQL such as a email address or cant that be done?I think dbname is the database name ALIAS is that the table name?im just trying to enter data in to my database database and i have no clue what im doing.Iv read guides online but i get the above error 350D |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-15 : 15:35:47
|
| U may not use " (double quote), instead use single quote ' |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-15 : 15:37:46
|
From which application r u running this ?V'd like to c ur source code.Also, if u don't know anything, howcome u do these things ?U may need a book or some reference on SQL Server if u need to know stuff like ALIAS quote: i dont know what im doing
So do I |
 |
|
|
mentalabilities
Starting Member
2 Posts |
Posted - 2006-03-15 : 15:58:23
|
| I think i need a bookWHERE id=4INSERT INTO 'admin_login' ('login_id', 'login_name', 'password', 'details') VALUES (252,'neo2','newpas5','NA')--"is the code.im running it on windows web serverD |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-03-15 : 17:00:13
|
| Go to Sitewww.w3schools.com |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2006-03-15 : 17:57:38
|
You don't have to enclose the table name & column in single quote.INSERT INTO admin_login (login_id, login_name, password, details) VALUES (252,'neo2','newpas5','NA') Use the bracket [] to enclose the object name if you are using reserved word as object name.INSERT INTO [admin_login] ([login_id], [login_name], [password], [details]) VALUES (252,'neo2','newpas5','NA') KH |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
|
|
|
|
|
|