SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 modify this procedure and help me
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

ramu143
Yak Posting Veteran

64 Posts

Posted - 09/27/2008 :  02:00:01  Show Profile  Reply with Quote
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

India
52317 Posts

Posted - 09/27/2008 :  02:02:38  Show Profile  Reply with Quote
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
Flowing Fount of Yak Knowledge

South Africa
4507 Posts

Posted - 09/27/2008 :  11:15:25  Show Profile  Visit GilaMonster's Homepage  Reply with Quote
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

Sweden
30265 Posts

Posted - 09/27/2008 :  12:54:10  Show Profile  Visit SwePeso's Homepage  Reply with Quote
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
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.23 seconds. Powered By: Snitz Forums 2000