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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 insert tables into different server

Author  Topic 

nguyenl
Posting Yak Master

128 Posts

Posted - 2008-05-14 : 19:15:44
How would I use this Script:

SELECT 'ACRES', '2008', property_char.property_id, ROUND(property_char.value,0) into property_char;
FROM property_char, property_char pc2, property, prop_valuation, val_component
WHERE property_char.property_id < 81695 AND
property_char.property_id = property.id AND
property_char.prop_char_typ_code = 'SIZE' AND
property_char.tax_year = '2008' AND
pc2.prop_char_typ_code = 'USECD' AND
(pc2.value not in ('85','86','87','88','95') AND --( <=== Review list of Usecodes))
pc2.tax_year = '2008' AND
pc2.property_id = property.id AND
property.pact_code = 'REAL' AND
(property.eff_to_date is null OR property.eff_to_date >= getdate())AND
prop_valuation.property_id = property.id AND
prop_valuation.tax_year = '2008' AND
prop_valuation.local_assed_ind = 'Y' AND
val_component.value_type = 'MKLND' AND
val_component.property_id = property.id AND
val_component.tax_year = '2008' AND
val_component.modified_value > 0)AND
NOT EXISTS (Select 'z' from parcel_exclude where property.parcel_number = parcel_exclude.parcel_number AND special_assessment = 'CD')

to insert data into a table that is on another server?

I tried an ssis package but I can't get temporary tables to work. I was hoping to write a script in the object "Execute SQL TasK" in SSIS to perform this process.




   

- Advertisement -