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
 export

Author  Topic 

JJins
Yak Posting Veteran

81 Posts

Posted - 2011-02-22 : 11:38:19
I am trying to export a lot of data and am getting this error.


- Validating (Error)
Messages
Error 0xc00470fe: Data Flow Task: The product level is insufficient for component "Destination - Query" (34).
(SQL Server Import and Export Wizard)

Error 0xc00470fe: Data Flow Task: The product level is insufficient for component "Data Conversion 1" (55).
(SQL Server Import and Export Wizard)




The Querys I want to export to excel are. If anyone can explain what is going on it would be a huge help!

Best,
G

----AL---AL---AL


----***Territory Check***---
----Nothing will be correct if you do not have terr correct.

SELECT Territories.*
FROM Territories
where state = 'AL' and companyid = 2
order by territory
---Core Checks

---AOP 500---Builders risk has a minimum of 2500 and Secondary Seasonal cant have credit for 1000
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and DCmax != 100 and ratedata.limitmax = 500 and ratedata.coverageid = 11 and programs.policytype in (1,2,5,6)

---1000 ---Builders risk has a minimum of 2500 and Secondary Seasonal cant have credit for 1000
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and DCmax != 100 and ratedata.limitmax = 1000 and ratedata.coverageid = 11 and programs.occupancytypeID != 2 and programs.policytype in (1,2,5,6)


---2500 Builders risk has a minimum of 2500

SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and DCmax != 100 and programs.occupancyTypeID != 6 and ratedata.coverageid = 11 and ratedata.limitmax = 2500 and programs.policytype in (1,2,5,6)
order by limitmax




---SC Other Structures
--Frame territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 1 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---Frame territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 1 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--Frame territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 1 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)

---Brick Veneer ****
--BV territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 2 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---BV territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 2 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--BV territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 2 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)


---Masonry ****
--Masonry territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 3 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---Masonry territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 3 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--Masonry territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 2 and programs.constructiontype = 3 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)



----************************************



--- HO3 & HO8 ,Peronal Property

SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 1 and ratedata.territory in ('A') and programs.policytype in (1,6)


---Frame territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 1 and ratedata.territory in ('B') and programs.policytype in (1,6)

--Frame territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 1 and ratedata.territory in ('C') and programs.policytype in (1,6)

---Brick Veneer ****
--BV territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 2 and ratedata.territory in ('A') and programs.policytype in (1,6)


---BV territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 2 and ratedata.territory in ('B') and programs.policytype in (1,6)

--BV territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 2 and ratedata.territory in ('C') and programs.policytype in (1,6)


---Masonry ****
--Masonry territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 3 and ratedata.territory in ('A') and programs.policytype in (1,6)


---Masonry territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 3 and ratedata.territory in ('B') and programs.policytype in (1,6)

--Masonry territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 3 and programs.constructiontype = 3 and ratedata.territory in ('C') and programs.policytype in (1,6)

---****************************************

--- Loss of USE

--Frame territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 1 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---Frame territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 1 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--Frame territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 1 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)

---Brick Veneer ****
--BV territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 2 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---BV territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 2 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--BV territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 2 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)


---Masonry ****
--Masonry territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 3 and ratedata.territory in ('A') and programs.policytype in (1,2,5,6)


---Masonry territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 3 and ratedata.territory in ('B') and programs.policytype in (1,2,5,6)

--Masonry territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 4 and programs.constructiontype = 3 and ratedata.territory in ('C') and programs.policytype in (1,2,5,6)

-----****************************************

---unit ownersbuilding coverage NOTE only HO6


--Frame territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 1 and ratedata.territory in ('A') and programs.policytype in (2)


---Frame territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 1 and ratedata.territory in ('B') and programs.policytype in (2)

--Frame territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 1 and ratedata.territory in ('C') and programs.policytype in (2)

---Brick Veneer ****
--BV territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 2 and ratedata.territory in ('A') and programs.policytype in (2)


---BV territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 2 and ratedata.territory in ('B') and programs.policytype in (2)

--BV territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 2 and ratedata.territory in ('C') and programs.policytype in (2)


---Masonry ****
--Masonry territory A
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 3 and ratedata.territory in ('A') and programs.policytype in (2)


---Masonry territory B
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 3 and ratedata.territory in ('B') and programs.policytype in (2)

--Masonry territory C
SELECT RateData.*, Programs.*
FROM RateData INNER JOIN
Programs ON RateData.ProgramID = Programs.ProgramID
where programs.state = 'AL' and programs.companyid = 2 and programs.DCmax != 100 and ratedata.coverageid = 1 and programs.constructiontype = 3 and ratedata.territory in ('C') and programs.policytype in (2)





michael.appleton
Posting Yak Master

160 Posts

Posted - 2011-02-22 : 12:09:22
MUCH easier to make a connection in excel for each query I think. Have a look at data connection in excel and connect to the database from there.
Go to Top of Page

MIK_2008
Master Smack Fu Yak Hacker

1054 Posts

Posted - 2011-02-22 : 12:32:14
I don't see any code Related to excel export in your SQL code. It would be better if you go read the following where you will find good information on this topic

http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=49926

Cheers
MIK
Go to Top of Page
   

- Advertisement -