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 |
statix
Starting Member
12 Posts |
Posted - 2013-02-01 : 10:32:33
|
hi i try to do distinct and insert the data to new tableselect distinct statesfrom datazipinto states.state_name i tried select into states.state_namefrom datazip.state i keep geting errors ... :\ any suggestions ? |
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-01 : 12:22:35
|
should beinsert states(state_name)select distinct statesfrom datazip ------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
statix
Starting Member
12 Posts |
Posted - 2013-02-01 : 12:23:37
|
nevermind guys i found my mistake thx anywayselect distinct <column dest>into <table dest>from <table src> |
|
|
statix
Starting Member
12 Posts |
Posted - 2013-02-01 : 12:24:59
|
thx visakh16 i will try your sultion for the sport :) ! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-01 : 12:26:02
|
quote: Originally posted by statix thx visakh16 i will try your sultion for the sport :) !
mine will work if table already existyours will create a new table------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
statix
Starting Member
12 Posts |
Posted - 2013-02-01 : 13:32:55
|
Thx! yours much better! helped me alot! |
|
|
statix
Starting Member
12 Posts |
Posted - 2013-02-01 : 13:32:56
|
Thx! yours much better! helped me alot! |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2013-02-02 : 03:09:32
|
welcome------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
|
|
|
|
|