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 |
|
sardinka
Posting Yak Master
142 Posts |
Posted - 2005-08-11 : 15:06:40
|
| 2 Questions about this SQl:insert into rules (RuleText)values (select RuleText from temp_groupRules )1. I am getting this errors:Server: Msg 156, Level 15, State 1, Line 2Incorrect syntax near the keyword 'select'.Server: Msg 170, Level 15, State 1, Line 2Line 2: Incorrect syntax near ')'.2.My select statement may return 2 or more records. How do I handle this? |
|
|
AjarnMark
SQL Slashing Gunting Master
3246 Posts |
Posted - 2005-08-11 : 15:14:05
|
| 1. If you're going to do an INSERT...SELECT, leave out the values key word.2. If it returns more than one record, then more than one record will be inserted. Is that a problem?---------------------------EmeraldCityDomains.com |
 |
|
|
X002548
Not Just a Number
15586 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2005-08-12 : 01:29:37
|
| and make sure data type of RuleText of both the tables is identicalMadhivananFailing to plan is Planning to fail |
 |
|
|
|
|
|