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.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 modify this procedure and help me

Author  Topic 

ramu143
Yak Posting Veteran

64 Posts

Posted - 2008-09-27 : 02:00:01
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO

create procedure nocreport



as
begin
insert into noc

select *from BELGIUM.report.noc.destasrreport
select *from HOLLAND.noc.destasrreport
select *from SCANDINAVIA.noc.destasrreport


end


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

this my procedure i am inserting into one table belgium,holland those are linked servers
but thing is one table 5 column ,one table 6 columns but the noc table 6 columns any data disturpes ....



i can run this procedure it will works any updates please

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2008-09-27 : 02:02:38
Will you ever notice the solutions provided for a problem and understand it before posting again?

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=111516
Go to Top of Page

GilaMonster
Master Smack Fu Yak Hacker

4507 Posts

Posted - 2008-09-27 : 11:15:25
quote:
Originally posted by ramu143


this my procedure i am inserting into one table belgium,holland those are linked servers
but thing is one table 5 column ,one table 6 columns but the noc table 6 columns any data disturpes ....



don't use select * and specify an insert column list

--
Gail Shaw
SQL Server MVP
Go to Top of Page

SwePeso
Patron Saint of Lost Yaks

30421 Posts

Posted - 2008-09-27 : 12:54:10
and where are the other insert statements? or at least the unions between the selects.



E 12°55'05.63"
N 56°04'39.26"
Go to Top of Page
   

- Advertisement -