In my Sql server there is one database Employee which has table parish. and another one database with customer which has table clients and fips.There is one stored procedure which take data from this two tables clients and fips . now i want to revert the operation. Take data from parish table and insert into clients and fips. Below is the stored procedure which take data from clients and fips.
ALTER PROCEDURE [dbo].[Rpt_getexportparish] @clientID AS INT,
@assessment_type AS NVARCHAR(10),
@political_subDivision AS NVARCHAR(10),
@district AS NVARCHAR(10),
@acct_status AS NVARCHAR(10),
@millage_type AS NVARCHAR(10),
@tax_year AS NVARCHAR(10)
AS
BEGIN
SELECT FIPScode AS fips_code,
f.cnty_name AS gov_name,
c.NAME AS gov_agency,
PhysicalAddress1 AS address2,
PhysicalAddress2 AS address1,
TaxYear AS tax_year,
PhysicalAddressCity AS city,
PhysicalAddressState AS state,
PhysicalAddressZip AS zip,
AssessorName AS assr_name
FROM Clients c
JOIN fips f
ON c.FIPScode = f.cnty_fips
WHERE id = @clientID
AND place_fips = @political_subDivision
END
i want reverse of above. select data from parish and insert into clients and fips table. then what is the sql query for that.
There is no relation in both table clients and fips.