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 |
|
mikebird
Aged Yak Warrior
529 Posts |
Posted - 2011-07-05 : 08:29:38
|
| I want to break down data from a flat file into separate normalised tables, starting with a bare, empty table: Agency with just columns agencyID smallint unique not null identity(1,1), Name varchar(20)I want to just retrieve a list of values from the existing table and select them into therewhat syntax do I need. It's so simple. I don't want to use a new table. I want to keep the table config above, and just put text from the base table in thereMsg 156, Level 15, State 1, Line 1Incorrect syntax near the keyword 'into'. |
|
|
nigelrivett
Master Smack Fu Yak Hacker
3385 Posts |
Posted - 2011-07-05 : 08:49:21
|
| select .. into ... from ... This creates a new table - is that what you want?Without knowing what you'veexecuted it's difficult to correct it.maybeinsert Agency (Name)select distinct Namefrom SourceTable==========================================Cursors are useful if you don't know sql.SSIS can be used in a similar way.Beer is not cold and it isn't fizzy. |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|
|