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 |
|
hubschrauber
Starting Member
16 Posts |
Posted - 2006-02-03 : 09:51:30
|
| Hi all,Is it possible to say something like INSERT INTO BookBook.* EXCEPT (a,c,d)Something like WITHOUT DESELECT EXCLUDING LESSThanks |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2006-02-03 : 10:05:39
|
| Did you mean this?Select * from Book where col not in('a','c','d')MadhivananFailing to plan is Planning to fail |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2006-02-03 : 10:07:14
|
| Please, please, please ......Get a bookhttp://www.sqlteam.com/store.asp |
 |
|
|
Srinika
Master Smack Fu Yak Hacker
1378 Posts |
Posted - 2006-02-03 : 10:07:48
|
| Is it something to do with columns or rows ?If it is columns u can use the following:DECLARE @s VARCHAR(8000)Set @s = ''SELECT @s=@s + Column_name + ','from INFORMATION_SCHEMA.Columnswhere table_name = 'MyTable' and Column_name not in ('a','b','c')set @s = left(@s, Datalength(@s)-1)set @s = 'Select ' + @s + ' from MyTable'INSERT INTO Bookexecute ( @s) |
 |
|
|
mr_mist
Grunnio
1870 Posts |
Posted - 2006-02-03 : 10:11:08
|
| upgrade to 2005 :)-------Moo. :) |
 |
|
|
|
|
|