Friday, March 30, 2012
Partially Bold text and Justify?
="My name is " + First(Fields!Brok_Name.Value, "myDataset")
I just want to Bold the Field value and not the word "My name is ".
I also want to justify the text Alignment, how can I ?
I am using Sql Server Reporting Service 2005.
Any idea please ?
Best Regards,
LuqmanLuqman,
I don't think multiple formatting within a single text box is supported. You
might be able to embed an html character in the string like this ...>="My
name is <B>" + First(Fields!Brok_Name.Value, "myDataset") + "</B>" ...never
tried it but maybe it will work?
I have always used 2 text boxes. One for the label "My name is " and another
for the field value. Then I right align the label and left align the field
value. As far as justifying the complete string "My name is " + Field ...not
sure if it is possible with different bold values?
luqman wrote:
>I have put following expression in a textbox.
>="My name is " + First(Fields!Brok_Name.Value, "myDataset")
>I just want to Bold the Field value and not the word "My name is ".
>I also want to justify the text Alignment, how can I ?
>I am using Sql Server Reporting Service 2005.
>Any idea please ?
>Best Regards,
>Luqman
--
Message posted via http://www.sqlmonster.com|||Hi,
The Html character <B> within the text is showing as text.
My expression is :
="My name is <B>" + First(Fields!Brok_Name.Value, "myDataset") + "</B>"
Output is :
My name is <B> luqman </B>
Am I missing something ?
Best Regards,
Luqman
"wnichols via SQLMonster.com" <u3357@.uwe> wrote in message
news:7829016629ac6@.uwe...
> Luqman,
> I don't think multiple formatting within a single text box is supported.
You
> might be able to embed an html character in the string like this ...>="My
> name is <B>" + First(Fields!Brok_Name.Value, "myDataset") + "</B>"
...never
> tried it but maybe it will work?
> I have always used 2 text boxes. One for the label "My name is " and
another
> for the field value. Then I right align the label and left align the
field
> value. As far as justifying the complete string "My name is " + Field
...not
> sure if it is possible with different bold values?
>
> luqman wrote:
> >I have put following expression in a textbox.
> >
> >="My name is " + First(Fields!Brok_Name.Value, "myDataset")
> >
> >I just want to Bold the Field value and not the word "My name is ".
> >
> >I also want to justify the text Alignment, how can I ?
> >
> >I am using Sql Server Reporting Service 2005.
> >
> >Any idea please ?
> >
> >Best Regards,
> >
> >Luqman
> --
> Message posted via http://www.sqlmonster.com
>|||Luqman,
It was just a shot in the dark...guess it did not work. I don't think it is
possible to have multiple formats within the same textbox.
luqman wrote:
>Hi,
>The Html character <B> within the text is showing as text.
>My expression is :
>="My name is <B>" + First(Fields!Brok_Name.Value, "myDataset") + "</B>"
>Output is :
>My name is <B> luqman </B>
>Am I missing something ?
>Best Regards,
>Luqman
>> Luqman,
>[quoted text clipped - 26 lines]
>> --
>> Message posted via http://www.sqlmonster.com
--
Message posted via http://www.sqlmonster.com|||Hi,
In case, the textbox does not support multiple formats, can we display RTF
Text inside a textbox, saved in a database.
Best Regards,
Luqman
"wnichols via SQLMonster.com" <u3357@.uwe> wrote in message
news:7834e5fdfd74f@.uwe...
> Luqman,
> It was just a shot in the dark...guess it did not work. I don't think it
is
> possible to have multiple formats within the same textbox.
>
> luqman wrote:
> >Hi,
> >
> >The Html character <B> within the text is showing as text.
> >
> >My expression is :
> >="My name is <B>" + First(Fields!Brok_Name.Value, "myDataset") + "</B>"
> >
> >Output is :
> >My name is <B> luqman </B>
> >
> >Am I missing something ?
> >
> >Best Regards,
> >
> >Luqman
> >
> >> Luqman,
> >>
> >[quoted text clipped - 26 lines]
> >> --
> >> Message posted via http://www.sqlmonster.com
> --
> Message posted via http://www.sqlmonster.com
>|||Luqman,
That's my extent of the knowledge on the subject...Sorry.
luqman wrote:
>Hi,
>In case, the textbox does not support multiple formats, can we display RTF
>Text inside a textbox, saved in a database.
>Best Regards,
>Luqman
>> Luqman,
>[quoted text clipped - 25 lines]
>> --
>> Message posted via http://www.sqlmonster.com
--
Message posted via SQLMonster.com
http://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200709/1|||On Sep 17, 10:55 am, "wnichols via SQLMonster.com" <u3357@.uwe> wrote:
> Luqman,
> That's my extent of the knowledge on the subject...Sorry.
> luqman wrote:
> >Hi,
> >In case, the textbox does not support multiple formats, can we display RTF
> >Text inside a textbox, saved in a database.
> >Best Regards,
> >Luqman
> >> Luqman,
> >[quoted text clipped - 25 lines]
> >> --
> >> Message posted viahttp://www.sqlmonster.com
> --
> Message posted via SQLMonster.comhttp://www.sqlmonster.com/Uwe/Forums.aspx/sql-server-reporting/200709/1
You can't do it in 2005. I saw a video on reporting services 2008,
and it's a new feature microsoft is adding. Below is some links on
it:
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=2122612&SiteID=1
http://sqljunkies.com/WebLog/sqlbi/archive/2007/06/07/35631.aspx
Partial searches over a lot of fields
I have the following scenario. I have a table called Invoice. This
has around 30 columns of which i have to do a retrieval based on
filter conditions on 10 columns. These filters need to be partial
searches i.e. for e.g the Customer name could be 'Arun', 'Parthiv',
'Aaron', now i should be able to search the customer as 'ar' and it
should return 'Arun' and 'Parthiv'. My concern is there are 10 columns
on which this like '%x%' search has to be done and there will
practically be hudreds of thousands of rows. can anybody suggest me to
improve the performance of such a query. Currently what i am thinkin
of is
select Id, Memo, .. FROM Invoice where CustomerName like '%' + @.Name +
'%' and etc.
P.S. am using ASP.Net as the front end.ArunPrakash (arunprakashb@.yahoo.com) writes:
> I have the following scenario. I have a table called Invoice. This
> has around 30 columns of which i have to do a retrieval based on
> filter conditions on 10 columns. These filters need to be partial
> searches i.e. for e.g the Customer name could be 'Arun', 'Parthiv',
> 'Aaron', now i should be able to search the customer as 'ar' and it
> should return 'Arun' and 'Parthiv'. My concern is there are 10 columns
> on which this like '%x%' search has to be done and there will
> practically be hudreds of thousands of rows. can anybody suggest me to
> improve the performance of such a query. Currently what i am thinkin
> of is
> select Id, Memo, .. FROM Invoice where CustomerName like '%' + @.Name +
> '%' and etc.
You can use SELECT TOP or SET ROWCOUNT to restrict the number of rows
returned. A good value is probably 2000. If you get 2000 rows, you tell
the user to refine his conditions.
Also keep in mind, that there could be a great difference in performance
when searching for names that start with 'Ar', or have 'ar' anywhere in
the name. If the search column is indexed, that index can be used
for the case "starts with", but not "contains".
There are also a couple of considerations of how to compose the query
to make the search effective. You may be interested in the article
http://www.sommarskog.se/dyn-search.html on my web site.
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp
Part
I posted this somewhere else here, excuse me,,,
I have the following challenge
When I create a stored procedure the selects data from the portioned view,
the execution plan shows that SQL server scans all base tables, while the
select statement after replacing the variable with an actual value scans onl
y
the required table.
Here is a full script:
Execute the commented out statements at the end of the script with show
graphical execution plan option and see the difference.
SET NOCOUNT ON
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[EMPLOYEES]') and OBJECTPROPERTY(id, N'IsView') = 1)
drop view [dbo].[EMPLOYEES]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Employees_1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Employees_1]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Employees_2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Employees_2]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[Employees_3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
drop table [dbo].[Employees_3]
GO
CREATE TABLE [Employees_1] (
[EmpID] [int] NOT NULL ,
[EmpName] [char] (5) NULL ,
[FirstChar] [int] NOT NULL ,
CONSTRAINT [PK_Employees_1] PRIMARY KEY CLUSTERED
(
[EmpID],
[FirstChar]
) ON [PRIMARY] ,
CONSTRAINT [CK_Employees_1] CHECK ([FirstChar] = 1)
) ON [PRIMARY]
CREATE TABLE [Employees_2] (
[EmpID] [int] NOT NULL ,
[EmpName] [char] (5) NULL ,
[FirstChar] [int] NOT NULL ,
CONSTRAINT [PK_Employees_2] PRIMARY KEY CLUSTERED
(
[EmpID],
[FirstChar]
) ON [PRIMARY] ,
CONSTRAINT [CK_Employees_2] CHECK ([FirstChar] = 2)
) ON [PRIMARY]
CREATE TABLE [Employees_3] (
[EmpID] [int] NOT NULL ,
[EmpName] [char] (5) NULL ,
[FirstChar] [int] NOT NULL ,
CONSTRAINT [PK_Employees_3] PRIMARY KEY CLUSTERED
(
[EmpID],
[FirstChar]
) ON [PRIMARY] ,
CONSTRAINT [CK_Employees_3] CHECK ([FirstChar] = 3)
) ON [PRIMARY]
GO
--
CREATE VIEW EMPLOYEES
AS
SELECT *
FROM EMPLOYEES_1
UNION ALL
SELECT *
FROM EMPLOYEES_2
UNION ALL
SELECT *
FROM EMPLOYEES_3
GO
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (1,'aaaaa',1)
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (2,'aaaab',1)
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (3,'baaaa',2)
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (4,'baaab',2)
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (5,'caaaa',3)
INSERT INTO EMPLOYEES
(EmpID, EmpName, FirstChar)
VALUES (6,'caaab',3)
go
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[GetEmp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[GetEmp]
GO
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[GetEmp2]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[GetEmp2]
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
create proc GetEmp
@.firstchar int
as
select * from employees
where (EMPNAME IS NOT NULL)
and firstchar = @.firstchar
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE proc GetEmp2
@.firstchar int
as
declare @.sql varchar(8000)
set @.sql ='
select * from employees
where (EMPNAME IS NOT NULL)
and firstchar = ' + convert(varchar,@.firstchar)
exec (@.sql)
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
/*
select * from employees
where (EMPNAME IS NOT NULL)
and firstchar = 2
exec GetEmp 2
exec GetEmp2 2
*/Use STATISTICS IO and you will see that SQL Server will only access one of t
he table for the GetEmp
procedure. But the plan doesn't show that because the same plan should work
for whatever value you
send in the parameter. So elimination of the other views are deferred until
run-time.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"RATA" <RATA@.discussions.microsoft.com> wrote in message
news:B68CA9C0-02B9-4A55-8904-B7DC3EBE727C@.microsoft.com...
> Hi folks,
> I posted this somewhere else here, excuse me,,,
> I have the following challenge
> When I create a stored procedure the selects data from the portioned view,
> the execution plan shows that SQL server scans all base tables, while the
> select statement after replacing the variable with an actual value scans o
nly
> the required table.
> Here is a full script:
> Execute the commented out statements at the end of the script with show
> graphical execution plan option and see the difference.
>
> SET NOCOUNT ON
> GO
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[EMPLOYEES]') and OBJECTPROPERTY(id, N'IsView') = 1)
> drop view [dbo].[EMPLOYEES]
> GO
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[Employees_1]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> drop table [dbo].[Employees_1]
> GO
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[Employees_2]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> drop table [dbo].[Employees_2]
> GO
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[Employees_3]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
> drop table [dbo].[Employees_3]
> GO
> CREATE TABLE [Employees_1] (
> [EmpID] [int] NOT NULL ,
> [EmpName] [char] (5) NULL ,
> [FirstChar] [int] NOT NULL ,
> CONSTRAINT [PK_Employees_1] PRIMARY KEY CLUSTERED
> (
> [EmpID],
> [FirstChar]
> ) ON [PRIMARY] ,
> CONSTRAINT [CK_Employees_1] CHECK ([FirstChar] = 1)
> ) ON [PRIMARY]
> CREATE TABLE [Employees_2] (
> [EmpID] [int] NOT NULL ,
> [EmpName] [char] (5) NULL ,
> [FirstChar] [int] NOT NULL ,
> CONSTRAINT [PK_Employees_2] PRIMARY KEY CLUSTERED
> (
> [EmpID],
> [FirstChar]
> ) ON [PRIMARY] ,
> CONSTRAINT [CK_Employees_2] CHECK ([FirstChar] = 2)
> ) ON [PRIMARY]
> CREATE TABLE [Employees_3] (
> [EmpID] [int] NOT NULL ,
> [EmpName] [char] (5) NULL ,
> [FirstChar] [int] NOT NULL ,
> CONSTRAINT [PK_Employees_3] PRIMARY KEY CLUSTERED
> (
> [EmpID],
> [FirstChar]
> ) ON [PRIMARY] ,
> CONSTRAINT [CK_Employees_3] CHECK ([FirstChar] = 3)
> ) ON [PRIMARY]
> GO
> --
> CREATE VIEW EMPLOYEES
> AS
> SELECT *
> FROM EMPLOYEES_1
> UNION ALL
> SELECT *
> FROM EMPLOYEES_2
> UNION ALL
> SELECT *
> FROM EMPLOYEES_3
> GO
>
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (1,'aaaaa',1)
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (2,'aaaab',1)
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (3,'baaaa',2)
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (4,'baaab',2)
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (5,'caaaa',3)
> INSERT INTO EMPLOYEES
> (EmpID, EmpName, FirstChar)
> VALUES (6,'caaab',3)
> go
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[GetEmp]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
> drop procedure [dbo].[GetEmp]
> GO
> if exists (select * from dbo.sysobjects where id =
> object_id(N'[dbo].[GetEmp2]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
> drop procedure [dbo].[GetEmp2]
> GO
> SET QUOTED_IDENTIFIER ON
> GO
> SET ANSI_NULLS ON
> GO
> create proc GetEmp
> @.firstchar int
> as
> select * from employees
> where (EMPNAME IS NOT NULL)
> and firstchar = @.firstchar
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER ON
> GO
> SET ANSI_NULLS ON
> GO
> CREATE proc GetEmp2
> @.firstchar int
> as
> declare @.sql varchar(8000)
> set @.sql ='
> select * from employees
> where (EMPNAME IS NOT NULL)
> and firstchar = ' + convert(varchar,@.firstchar)
> exec (@.sql)
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> SET ANSI_NULLS ON
> GO
>
> /*
> select * from employees
> where (EMPNAME IS NOT NULL)
> and firstchar = 2
> exec GetEmp 2
> exec GetEmp2 2
> */
>|||Karaszi,
the SP takes time much more than the select stmt, this is why i analyzed the
execution plan.
"Tibor Karaszi" wrote:
> Use STATISTICS IO and you will see that SQL Server will only access one of
the table for the GetEmp
> procedure. But the plan doesn't show that because the same plan should wor
k for whatever value you
> send in the parameter. So elimination of the other views are deferred unti
l run-time.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
>
> "RATA" <RATA@.discussions.microsoft.com> wrote in message
> news:B68CA9C0-02B9-4A55-8904-B7DC3EBE727C@.microsoft.com...
>
>|||What does statistics IO say when you execute it? I assume that you have more
data in your tables
than the test script?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"RATA" <RATA@.discussions.microsoft.com> wrote in message
news:CD107B8F-9B5B-4788-8FC1-5E25B321292D@.microsoft.com...
> Karaszi,
> the SP takes time much more than the select stmt, this is why i analyzed t
he
> execution plan.
> "Tibor Karaszi" wrote:
>|||I am sorry; there was a bug in my SP that was enforcing the engine to scan
all queries. My issue is closed now.
This posting was useful; you don’t have to rely on the graphical execution
plan always, some time you have to examine other thinks like the SET
STATISTICS IO.
Thanks all
"Tibor Karaszi" wrote:
> What does statistics IO say when you execute it? I assume that you have mo
re data in your tables
> than the test script?
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "RATA" <RATA@.discussions.microsoft.com> wrote in message
> news:CD107B8F-9B5B-4788-8FC1-5E25B321292D@.microsoft.com...
>
Wednesday, March 28, 2012
Parse the field
Customer Service...Jam...Jam 5...Planned
Technical Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting
New Drive
Sale Made
I need to separate this "Problem" field into separate fields the issue1,
issue2, issue3, issue4 and issue5 (Customer Service, Jam, Jam 5,Planned
) .
What would be the easiest way to do so within the SELECT statement ?here's a quick and dirty way of parsing out the data:::
declare @.myString varchar(2000) --Set to max length of field
declare @.Issue1 varchar(100) --Set to max length of any single entry
set @.myString = 'Customer Service...Jam...Jam 5...Planned '
set @.myString = 'Technical
Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting '
--set @.myString = 'New Drive'
declare @.Index int -- Holds the next position of delimeter
declare @.delimiter char(1) -- holds delimeter character
set @.delimiter = '.' -- set the delimer value
set @.Index = patindex( '%'+@.delimiter+'%',@.myString) -- get first instance
of delimeter
-- run a loop while we still have delimeters in the string
while @.Index>0
begin
-- get the next value
set @.Issue1 = substring(@.myString,1,@.Index-1)
-- do whatever you wish with the value print, save to table, array, etc)
print @.Issue1
-- parse the latest value from the current string
set @.myString = substring(@.myString,@.Index+3,len(@.myString))
-- get the next instance of the delimeter
set @.Index = patindex( '%'+@.delimiter+'%',@.myString)
end
-- Get the last value from what's left
set @.Issue1 = ltrim(rtrim(@.myString))
-- do whatever you wish with the value print, save to table, array, etc)
print @.Issue1
Copy and paste it into QA and you can see how it works for you
Tony
"agenda9533" wrote:
> I have a table that has a "Problem" field with the following data
> Customer Service...Jam...Jam 5...Planned
> Technical Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting
> New Drive
> Sale Made
> I need to separate this "Problem" field into separate fields the issue1,
> issue2, issue3, issue4 and issue5 (Customer Service, Jam, Jam 5,Planned
> ) .
> What would be the easiest way to do so within the SELECT statement ?|||This is awesome!
Only thing, Ijust don't know how to run/call this script within RS.
As far as I know RS only recognize T-Sql SELECT statements (in order to
create a dataset).
Am I wrong?
"Logicalman" wrote:
> here's a quick and dirty way of parsing out the data:::
>
> declare @.myString varchar(2000) --Set to max length of field
> declare @.Issue1 varchar(100) --Set to max length of any single entry
> set @.myString = 'Customer Service...Jam...Jam 5...Planned '
> set @.myString = 'Technical
> Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting '
> --set @.myString = 'New Drive'
> declare @.Index int -- Holds the next position of delimeter
> declare @.delimiter char(1) -- holds delimeter character
> set @.delimiter = '.' -- set the delimer value
> set @.Index = patindex( '%'+@.delimiter+'%',@.myString) -- get first instance
> of delimeter
> -- run a loop while we still have delimeters in the string
> while @.Index>0
> begin
> -- get the next value
> set @.Issue1 = substring(@.myString,1,@.Index-1)
> -- do whatever you wish with the value print, save to table, array, etc)
> print @.Issue1
> -- parse the latest value from the current string
> set @.myString = substring(@.myString,@.Index+3,len(@.myString))
> -- get the next instance of the delimeter
> set @.Index = patindex( '%'+@.delimiter+'%',@.myString)
> end
> -- Get the last value from what's left
> set @.Issue1 = ltrim(rtrim(@.myString))
> -- do whatever you wish with the value print, save to table, array, etc)
> print @.Issue1
>
> Copy and paste it into QA and you can see how it works for you
> Tony
> "agenda9533" wrote:
> > I have a table that has a "Problem" field with the following data
> >
> > Customer Service...Jam...Jam 5...Planned
> >
> > Technical Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting
> > New Drive
> >
> > Sale Made
> >
> > I need to separate this "Problem" field into separate fields the issue1,
> > issue2, issue3, issue4 and issue5 (Customer Service, Jam, Jam 5,Planned
> > ) .
> >
> > What would be the easiest way to do so within the SELECT statement ?|||My first suggestion would be to place this in a Stored Procedure, and call
the SProc as the dataset for the RS report.
"agenda9533" wrote:
> This is awesome!
> Only thing, Ijust don't know how to run/call this script within RS.
> As far as I know RS only recognize T-Sql SELECT statements (in order to
> create a dataset).
> Am I wrong?
> "Logicalman" wrote:
> > here's a quick and dirty way of parsing out the data:::
> >
> >
> > declare @.myString varchar(2000) --Set to max length of field
> > declare @.Issue1 varchar(100) --Set to max length of any single entry
> >
> > set @.myString = 'Customer Service...Jam...Jam 5...Planned '
> > set @.myString = 'Technical
> > Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting '
> > --set @.myString = 'New Drive'
> >
> > declare @.Index int -- Holds the next position of delimeter
> > declare @.delimiter char(1) -- holds delimeter character
> > set @.delimiter = '.' -- set the delimer value
> >
> > set @.Index = patindex( '%'+@.delimiter+'%',@.myString) -- get first instance
> > of delimeter
> > -- run a loop while we still have delimeters in the string
> > while @.Index>0
> > begin
> > -- get the next value
> > set @.Issue1 = substring(@.myString,1,@.Index-1)
> > -- do whatever you wish with the value print, save to table, array, etc)
> > print @.Issue1
> > -- parse the latest value from the current string
> > set @.myString = substring(@.myString,@.Index+3,len(@.myString))
> > -- get the next instance of the delimeter
> > set @.Index = patindex( '%'+@.delimiter+'%',@.myString)
> >
> > end
> > -- Get the last value from what's left
> > set @.Issue1 = ltrim(rtrim(@.myString))
> > -- do whatever you wish with the value print, save to table, array, etc)
> > print @.Issue1
> >
> >
> > Copy and paste it into QA and you can see how it works for you
> >
> > Tony
> >
> > "agenda9533" wrote:
> >
> > > I have a table that has a "Problem" field with the following data
> > >
> > > Customer Service...Jam...Jam 5...Planned
> > >
> > > Technical Support...WinOnCD...WinOnCD6PowerEdition...Request...Reporting
> > > New Drive
> > >
> > > Sale Made
> > >
> > > I need to separate this "Problem" field into separate fields the issue1,
> > > issue2, issue3, issue4 and issue5 (Customer Service, Jam, Jam 5,Planned
> > > ) .
> > >
> > > What would be the easiest way to do so within the SELECT statement ?
Parms
I created a proc which looked liked the following:
ALTER proc dbo.Proc_QuerySkaters
@.ClubID uniqueidentifier =null,
@.msg nvarchar(220) out
as
declare @.cnt int
if @.ClubID = null
begin
select ClubID, FirstName, MiddleName, LastName
from dbo.Skater
set @.cnt = @.@.ROWCOUNT
end
else
begin
select ClubID, FirstName, MiddleName, LastName
from dbo.Skater
where @.clubID = ClubID
set @.cnt = @.@.ROWCOUNT
end
if @.@.ERROR > 0
begin
set @.msg = 'Unexpected error occurred executing Proc_QuerySkaters
- Error code: ' + cast( @.@.ERROR as char(4) )
return -1
end
set @.msg=''
return 0
This compiles, but it does not run correctly. If I change the
declaration of @.ClubID and removed the '=null' - then it compiles, but
it requires the @.ClubID to be populated (will not accept nulls).
How do I define an input parm which is not required to be populated
(accepts nulls and is defaulted to null)?Hi Jim.
The parameter is defined correctly - you should check for null by using IS
NULL rather then = null in the body of the proc:
ALTER proc dbo.Proc_QuerySkaters
@.ClubID uniqueidentifier =null,
@.msg nvarchar(220) out
as
declare @.cnt int
if @.ClubID is null
begin
select ClubID, FirstName, MiddleName, LastName
from dbo.Skater
set @.cnt = @.@.ROWCOUNT
end
else
begin
select ClubID, FirstName, MiddleName, LastName
from dbo.Skater
where @.clubID = ClubID
set @.cnt = @.@.ROWCOUNT
end
if @.@.ERROR > 0
begin
set @.msg = 'Unexpected error occurred executing Proc_QuerySkaters
- Error code: ' + cast( @.@.ERROR as char(4) )
return -1
end
set @.msg=''
return 0
Regards,
Greg Linwood
SQL Server MVP
"Jim Heavey" <JimHeavey@.nospam.com> wrote in message
news:Xns9458D9954D842JimHeaveyhotmailcom@.207.46.248.16...
> I was wondering how to default an input parm to nulls.
> I created a proc which looked liked the following:
> ALTER proc dbo.Proc_QuerySkaters
> @.ClubID uniqueidentifier =null,
> @.msg nvarchar(220) out
> as
> declare @.cnt int
> if @.ClubID = null
> begin
> select ClubID, FirstName, MiddleName, LastName
> from dbo.Skater
> set @.cnt = @.@.ROWCOUNT
> end
> else
> begin
> select ClubID, FirstName, MiddleName, LastName
> from dbo.Skater
> where @.clubID = ClubID
> set @.cnt = @.@.ROWCOUNT
> end
> if @.@.ERROR > 0
> begin
> set @.msg = 'Unexpected error occurred executing Proc_QuerySkaters
> - Error code: ' + cast( @.@.ERROR as char(4) )
> return -1
> end
> set @.msg=''
> return 0
> This compiles, but it does not run correctly. If I change the
> declaration of @.ClubID and removed the '=null' - then it compiles, but
> it requires the @.ClubID to be populated (will not accept nulls).
> How do I define an input parm which is not required to be populated
> (accepts nulls and is defaulted to null)?
Monday, March 26, 2012
parentheses in a check constraint
e.g. I'm having a problem with the following statement:
ALTER TABLE [dbo].[MyTable] ADD CONSTRAINT [CK_MyTable_TimesDataOK]
CHECK (([TimeOn] IS NULL AND [TimeOff] IS NULL)
OR
([ShiftCode] IS NOT NULL AND [TimeOn] IS NOT NULL AND [TimeOff] IS NOT
NULL));
The statement appears to run fine, but when I look at my table
definition afterwards, it appears that SQL-server ignored the
parentheses in my constraint; it shows the constraint expression as:
(([TimeOn] IS NULL AND [TimeOff] IS NULL OR [ShiftCode] IS NOT NULL AND
[TimeOn] IS NOT NULL AND [TimeOff] IS NOT NULL))
My intention is that if there's (non null) data in either of the columns
TimeOn or TimeOff is not null, all three of the columns TimeOn, TimeOff
and ShiftCode must have non null data.
OK, I realise I could enforce this by altering my table setup in other
ways. Right now I'm just trying to figure out if this I'm just up
against a difference between dialects of SQL in check constraints here.
Am I missing something obvious with parentheses?
BTW the DDL for the table I'm testing on:
CREATE TABLE [dbo].[MyTable](
[FNname] [nvarchar](50) NOT NULL,
[ShiftDate] [datetime] NOT NULL,
[ShiftCode] [nchar](2) NULL,
[TimeOn] [nchar](4) NULL,
[TimeOff] [nchar](4) NULL);Helen Wheels <helenwheelss@.yahoo.com.auwrote in
news:136mli9pi74bs63@.corp.supernews.com:
Quote:
Originally Posted by
Can we use parentheses in a check constraint in MS-SQL-server DDL?
>
e.g. I'm having a problem with the following statement:
>
ALTER TABLE [dbo].[MyTable] ADD CONSTRAINT [CK_MyTable_TimesDataOK]
CHECK (([TimeOn] IS NULL AND [TimeOff] IS NULL)
OR
([ShiftCode] IS NOT NULL AND [TimeOn] IS NOT NULL AND [TimeOff]
IS NOT
NULL));
>
The statement appears to run fine, but when I look at my table
definition afterwards, it appears that SQL-server ignored the
parentheses in my constraint; it shows the constraint expression as:
(([TimeOn] IS NULL AND [TimeOff] IS NULL OR [ShiftCode] IS NOT NULL
AND [TimeOn] IS NOT NULL AND [TimeOff] IS NOT NULL))
>
My intention is that if there's (non null) data in either of the
columns TimeOn or TimeOff is not null, all three of the columns
TimeOn, TimeOff and ShiftCode must have non null data.
>
OK, I realise I could enforce this by altering my table setup in other
ways. Right now I'm just trying to figure out if this I'm just up
against a difference between dialects of SQL in check constraints
here. Am I missing something obvious with parentheses?
>
BTW the DDL for the table I'm testing on:
CREATE TABLE [dbo].[MyTable](
[FNname] [nvarchar](50) NOT NULL,
[ShiftDate] [datetime] NOT NULL,
[ShiftCode] [nchar](2) NULL,
[TimeOn] [nchar](4) NULL,
[TimeOff] [nchar](4) NULL);
>
"When more than one logical operator is used in a statement, the AND
operators are evaluated first ..." (BOL) - your inner parentheses are
therefore unnecessary.|||Chris.Cheney wrote:
Quote:
Originally Posted by
Helen Wheels <helenwheelss@.yahoo.com.auwrote in
news:136mli9pi74bs63@.corp.supernews.com:
>
>
Quote:
Originally Posted by
>>Can we use parentheses in a check constraint in MS-SQL-server DDL?
>>
>>e.g. I'm having a problem with the following statement:
>>
>>ALTER TABLE [dbo].[MyTable] ADD CONSTRAINT [CK_MyTable_TimesDataOK]
>>CHECK (([TimeOn] IS NULL AND [TimeOff] IS NULL)
> OR
> ([ShiftCode] IS NOT NULL AND [TimeOn] IS NOT NULL AND [TimeOff]
> IS NOT
>>NULL));
>>
>>The statement appears to run fine, but when I look at my table
>>definition afterwards, it appears that SQL-server ignored the
>>parentheses in my constraint; it shows the constraint expression as:
>>(([TimeOn] IS NULL AND [TimeOff] IS NULL OR [ShiftCode] IS NOT NULL
>>AND [TimeOn] IS NOT NULL AND [TimeOff] IS NOT NULL))
>>
>>My intention is that if there's (non null) data in either of the
>>columns TimeOn or TimeOff is not null, all three of the columns
>>TimeOn, TimeOff and ShiftCode must have non null data.
>>
>>OK, I realise I could enforce this by altering my table setup in other
>>ways. Right now I'm just trying to figure out if this I'm just up
>>against a difference between dialects of SQL in check constraints
>>here. Am I missing something obvious with parentheses?
>>
>>BTW the DDL for the table I'm testing on:
>>CREATE TABLE [dbo].[MyTable](
> [FNname] [nvarchar](50) NOT NULL,
> [ShiftDate] [datetime] NOT NULL,
> [ShiftCode] [nchar](2) NULL,
> [TimeOn] [nchar](4) NULL,
> [TimeOff] [nchar](4) NULL);
>>
>
>
"When more than one logical operator is used in a statement, the AND
operators are evaluated first ..." (BOL) - your inner parentheses are
therefore unnecessary.
So they are. The constraint is working as expected, it just doesn't look
quite the way I'm used to reading it. Thanks.|||Helen Wheels (helenwheelss@.yahoo.com.au) writes:
Quote:
Originally Posted by
Can we use parentheses in a check constraint in MS-SQL-server DDL?
>
e.g. I'm having a problem with the following statement:
>
ALTER TABLE [dbo].[MyTable] ADD CONSTRAINT [CK_MyTable_TimesDataOK]
CHECK (([TimeOn] IS NULL AND [TimeOff] IS NULL)
OR
([ShiftCode] IS NOT NULL AND [TimeOn] IS NOT NULL AND [TimeOff] IS
NOT NULL));
>
The statement appears to run fine, but when I look at my table
definition afterwards, it appears that SQL-server ignored the
parentheses in my constraint; it shows the constraint expression as:
(([TimeOn] IS NULL AND [TimeOff] IS NULL OR [ShiftCode] IS NOT NULL AND
[TimeOn] IS NOT NULL AND [TimeOff] IS NOT NULL))
SQL Server does not store the constraint text as provided, but performs
some normalisations on it. One such normalisation is apparently to
remove superfluous parantheses. Your original constraint text and what
SQL Server saved, are equivalent. AND binds tighter than OR, so these
two are the same:
x AND y OR a AND b
(x ANY y) OR (a AND b)
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx
parent/child table error in sqlxml
e
relationship that has a composite key (all none composite key relationships
work).
Schema: the parent/child table of the relationship on
'ProductMetricsBreakDown' does not match.
The xsd is included that is causing the error is included
It is the AnnualBusinessModel_ProductMetricsBreakD
own that is giving me the
error.
Any help would be greatly appreciated.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:annotation>
<xs:appinfo>
<sql:relationship name=" MicrosoftPartnerProfile_AnnualBusinessMo
del"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="AnnualBusinessModel" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_Branch"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Branch"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_BusinessFocus"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="BusinessFocus
"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_FormUI"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="FormUI"
child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_LinksToOtherDocu
ments"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="LinksToOtherDocuments" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_NotesAndConditio
ns"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="NotesAndConditions" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_PartnerAssessmen
t"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerAssessment" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_PartnerCompetenc
y"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerCompetency" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerGTM"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="PartnerGTM"
child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_PartnerIndustryV
ertical"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerIndustryVertical" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_PartnerSalesVert
ical"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerSalesVertical" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_PartnerSpecializ
ation"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerSpecialization" child-key="AccountID" />
<sql:relationship name=" MicrosoftPartnerProfile_RevenueBreakdown
"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="RevenueBreakdown" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_Contact"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Contact"
child-key="AccountID" />
<sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own"
parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
<!--<sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own"
parent="AnnualBusinessModel" parent-key="CalendarYear"
child="ProductMetricsBreakDown" child-key="CalendarYear" /> -->
<!--
<sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own"
parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
<sql:relationship name="RevenueBreakdown_RevenueBreakdownDetail"
parent="RevenueBreakdown" parent-key="AccountID BusinessSectionID
CalendarYear" child="RevenueBreakdownDetail" child-key="AccountID
BusinessSectionID CalendarYear" />
-->
</xs:appinfo>
</xs:annotation>
<xs:element name="MicrosoftPartnerProfile"
sql:relation="MicrosoftPartnerProfile">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="NativeID" sql:field="NativeID" sql:datatype="int" />
<xs:element name="CertificationTierLevelID"
sql:field="CertificationTierLevelID" sql:datatype="varchar" />
<xs:element name="CompanyName" sql:field="CompanyName"
sql:datatype="varchar" />
<xs:element name="DoingBusinessAsName" sql:field="DoingBusinessAsName"
sql:datatype="varchar" />
<xs:element name="GeographicAreaID" sql:field="GeographicAreaID"
sql:datatype="int" />
<xs:element name="Region" sql:field="Region" sql:datatype="varchar" />
<xs:element name="District" sql:field="District" sql:datatype="varchar" />
<xs:element name="MatrixID" sql:field="MatrixID" sql:datatype="int" />
<xs:element name="NumberOfEmployees" sql:field="NumberOfEmployees"
sql:datatype="int" />
<xs:element name="NumberOfSalesProfessionals"
sql:field="NumberOfSalesProfessionals" sql:datatype="int" />
<xs:element name="NumberOfEmployeesPerUPP"
sql:field="NumberOfEmployeesPerUPP" sql:datatype="varchar" />
<xs:element name="NumberOfTechProfessionals"
sql:field="NumberOfTechProfessionals" sql:datatype="int" />
<xs:element name="OrgHQLocationIndicator"
sql:field="OrgHQLocationIndicator" sql:datatype="varchar" />
<xs:element name="NumberOfSalesProfessionalsPerUPP"
sql:field="NumberOfSalesProfessionalsPerUPP" sql:datatype="varchar" />
<xs:element name="GlobalPartner" sql:field="GlobalPartner"
sql:datatype="varchar" />
<xs:element name="ActiveFlag" sql:field="ActiveFlag"
sql:datatype="varchar" />
<xs:element name="NumberOfTechProfessionalsPerUPP"
sql:field="NumberOfTechProfessionalsPerUPP" sql:datatype="varchar" />
<xs:element name="MSOrganizationID" sql:field="MSOrganizationID"
sql:datatype="int" />
<xs:element name="Seg_1_49_Percent" sql:field="Seg_1_49_Percent"
sql:datatype="decimal" />
<xs:element name="Seg_50_999_Percent" sql:field="Seg_50_999_Percent"
sql:datatype="decimal" />
<xs:element name="Seg_1000_14999_Percent"
sql:field="Seg_1000_14999_Percent" sql:datatype="decimal" />
<xs:element name="Seg_15000_Percent" sql:field="Seg_15000_Percent"
sql:datatype="decimal" />
<xs:element name="AddressLine1" sql:field="AddressLine1"
sql:datatype="varchar" />
<xs:element name="AddressLine2" sql:field="AddressLine2"
sql:datatype="varchar" />
<xs:element name="City" sql:field="City" sql:datatype="varchar" />
<xs:element name="PostalCode" sql:field="PostalCode"
sql:datatype="varchar" />
<xs:element name="StateProvinceId" sql:field="StateProvinceId"
sql:datatype="varchar" />
<xs:element name="Phone" sql:field="Phone" sql:datatype="varchar" />
<xs:element name="SiebelID" sql:field="SiebelID" sql:datatype="int" />
<xs:element name="StatusID" sql:field="StatusID" sql:datatype="varchar" />
<xs:element name="ProfileDueDate" sql:field="ProfileDueDate"
sql:datatype="datetime" />
<xs:element name="ManagedBy" sql:field="ManagedBy"
sql:datatype="varchar" />
<xs:element name="ParentAccountID" sql:field="ParentAccountID"
sql:datatype="int" />
<xs:element name="UPPID" sql:field="UPPID" sql:datatype="int" />
<xs:element name="LastModifiedBy" sql:field="LastModifiedBy"
sql:datatype="varchar" />
<xs:element name="LastModifiedDate" sql:field="LastModifiedDate"
sql:datatype="datetime" />
<xs:element name="ParentUPPId" sql:field="ParentUPPId"
sql:datatype="int" />
<xs:element name="CustomCampaign" sql:field="CustomCampaign"
sql:datatype="varchar" />
<xs:element name="PartnerSalesVertical"
sql:relation="PartnerSalesVertical"
sql:relationship=" MicrosoftPartnerProfile_PartnerSalesVert
ical"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="SalesVerticalID" sql:field="SalesVerticalID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerIndustryVertical"
sql:relation="PartnerIndustryVertical"
sql:relationship=" MicrosoftPartnerProfile_PartnerIndustryV
ertical"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="IndustryVerticalID" sql:field="IndustryVerticalID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerGTM" sql:relation="PartnerGTM"
sql:relationship="MicrosoftPartnerProfile_PartnerGTM" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="GTMFocusID" sql:field="GTMFocusID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerCompetency" sql:relation="PartnerCompetency"
sql:relationship=" MicrosoftPartnerProfile_PartnerCompetenc
y"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CompetencyID" sql:field="CompetencyID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FormUI" sql:relation="FormUI"
sql:relationship="MicrosoftPartnerProfile_FormUI" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CompetencyCheckMode"
sql:field="CompetencyCheckMode" sql:datatype="varchar" />
<xs:element name="SpecializationCheckModel"
sql:field="SpecializationCheckModel" sql:datatype="varchar" />
<xs:element name="ProductsCheckMode" sql:field="ProductsCheckMode"
sql:datatype="varchar" />
<xs:element name="IndustryVerticalsCheckMode"
sql:field="IndustryVerticalsCheckMode" sql:datatype="varchar" />
<xs:element name="MBSVerticalsCheckMode"
sql:field="MBSVerticalsCheckMode" sql:datatype="varchar" />
<xs:element name="GTMSCheckMode" sql:field="GTMSCheckMode"
sql:datatype="varchar" />
<xs:element name="AssessmentsCheckMode"
sql:field="AssessmentsCheckMode" sql:datatype="varchar" />
<xs:element name="AnnualBusinessCurrentMode"
sql:field="AnnualBusinessCurrentMode" sql:datatype="varchar" />
<xs:element name="BusinessPlanCurrentMode"
sql:field="BusinessPlanCurrentMode" sql:datatype="varchar" />
<xs:element name="NavProfileStatus" sql:field="NavProfileStatus"
sql:datatype="varchar" />
<xs:element name="NavCoreInformation" sql:field="NavCoreInformation"
sql:datatype="varchar" />
<xs:element name="NavBusinessFocus" sql:field="NavBusinessFocus"
sql:datatype="varchar" />
<xs:element name="NavContact" sql:field="NavContact"
sql:datatype="varchar" />
<xs:element name="NavBranch" sql:field="NavBranch"
sql:datatype="varchar" />
<xs:element name="NavCompetency" sql:field="NavCompetency"
sql:datatype="varchar" />
<xs:element name="NavSpecialization" sql:field="NavSpecialization"
sql:datatype="varchar" />
<xs:element name="NavIndustryVert" sql:field="NavIndustryVert"
sql:datatype="varchar" />
<xs:element name="NavMBSVert" sql:field="NavMBSVert"
sql:datatype="varchar" />
<xs:element name="NavRevSummary" sql:field="NavRevSummary"
sql:datatype="varchar" />
<xs:element name="NavConditions" sql:field="NavConditions"
sql:datatype="varchar" />
<xs:element name="NavRhythm" sql:field="NavRhythm"
sql:datatype="varchar" />
<xs:element name="NavCampaigns" sql:field="NavCampaigns"
sql:datatype="varchar" />
<xs:element name="NavAssessments" sql:field="NavAssessments"
sql:datatype="varchar" />
<xs:element name="NavLinks" sql:field="NavLinks"
sql:datatype="varchar" />
<xs:element name="NavProducts" sql:field="NavProducts"
sql:datatype="varchar" />
<xs:element name="NavPlanStatus" sql:field="NavPlanStatus"
sql:datatype="varchar" />
<xs:element name="NavGoalSummary" sql:field="NavGoalSummary"
sql:datatype="varchar" />
<xs:element name="NavInvestments" sql:field="NavInvestments"
sql:datatype="varchar" />
<xs:element name="NavSolutionPlan" sql:field="NavSolutionPlan"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LinksToOtherDocuments"
sql:relation="LinksToOtherDocuments"
sql:relationship=" MicrosoftPartnerProfile_LinksToOtherDocu
ments">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="DocumentUrl" sql:field="DocumentUrl"
sql:datatype="varchar" />
<xs:element name="DocumentTitle" sql:field="DocumentTitle"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NotesAndConditions" sql:relation="NotesAndConditions"
sql:relationship=" MicrosoftPartnerProfile_NotesAndConditio
ns">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="MeetingFrequencyID" sql:field="MeetingFrequencyID"
sql:datatype="int" />
<xs:element name="ConditionsOfSatisfaction"
sql:field="ConditionsOfSatisfaction" sql:datatype="varchar" />
<xs:element name="Notes" sql:field="Notes" sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerAssessment" sql:relation="PartnerAssessment"
sql:relationship=" MicrosoftPartnerProfile_PartnerAssessmen
t">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="AssessmentTypeID" sql:field="AssessmentTypeID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnnualBusinessModel"
sql:relation="AnnualBusinessModel"
sql:relationship=" MicrosoftPartnerProfile_AnnualBusinessMo
del">
<xs:complexType>
<xs:sequence>
<xs:element name="PartnerFiscalYearEndDate"
sql:field="PartnerFiscalYearEndDate" sql:datatype="datetime" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="AnnualRevenueInMillions"
sql:field="AnnualRevenueInMillions" sql:datatype="decimal" />
<xs:element name="RevenueGrowthPercentYOY"
sql:field="RevenueGrowthPercentYOY" sql:datatype="decimal" />
<xs:element name="AnnualRevenuePerUPP"
sql:field="AnnualRevenuePerUPP" sql:datatype="decimal" />
<xs:element name="AnnualMSRevenueInMillions"
sql:field="AnnualMSRevenueInMillions" sql:datatype="decimal" />
<xs:element name="AnnualSoftMSRevenuePerUPP"
sql:field="AnnualSoftMSRevenuePerUPP" sql:datatype="decimal" />
<xs:element name="MSRevenueGrowthPercentYOY"
sql:field="MSRevenueGrowthPercentYOY" sql:datatype="decimal" />
<xs:element name="PercentCRM" sql:field="PercentCRM"
sql:datatype="decimal" />
<xs:element name="PercentERP" sql:field="PercentERP"
sql:datatype="decimal" />
<xs:element name="HighlightedProductSubcategoryID"
sql:field="HighlightedProductSubcategoryID" sql:datatype="int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusinessFocus" sql:relation="BusinessFocus"
sql:relationship="MicrosoftPartnerProfile_BusinessFocus">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BluePrintQuadrantID"
sql:field="BluePrintQuadrantID" sql:datatype="int" />
<xs:element name="PartnerTypeID" sql:field="PartnerTypeID"
sql:datatype="varchar" />
<xs:element name="DistrictPref1" sql:field="DistrictPref1"
sql:datatype="int" />
<xs:element name="DistrictPref2" sql:field="DistrictPref2"
sql:datatype="int" />
<xs:element name="DistrictPref3" sql:field="DistrictPref3"
sql:datatype="int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerSpecialization"
sql:relation="PartnerSpecialization"
sql:relationship=" MicrosoftPartnerProfile_PartnerSpecializ
ation">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="SpecializationID" sql:field="SpecializationID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ProductMetricsBreakDown"
sql:relation="ProductMetricsBreakDown"
sql:relationship=" AnnualBusinessModel_ProductMetricsBreakD
own" >
<xs:complexType>
<xs:sequence>
<xs:element name="MetricId" sql:field="MetricId" sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="ProductSubCategoryID"
sql:field="ProductSubCategoryID" sql:datatype="int" />
<xs:element name="MetricName" sql:field="MetricName"
sql:datatype="varchar" />
<xs:element name="ProductSubcategoryName"
sql:field="ProductSubcategoryName" sql:datatype="varchar" />
<xs:element name="Half1MSGoal" sql:field="Half1MSGoal"
sql:datatype="decimal" />
<xs:element name="Half1NonMSGoal" sql:field="Half1NonMSGoal"
sql:datatype="decimal" />
<xs:element name="Half1MSActual" sql:field="Half1MSActual"
sql:datatype="decimal" />
<xs:element name="Half1NonMSActual" sql:field="Half1NonMSActual"
sql:datatype="decimal" />
<xs:element name="Half2MSGoal" sql:field="Half2MSGoal"
sql:datatype="decimal" />
<xs:element name="Half2NonMSGoal" sql:field="Half2NonMSGoal"
sql:datatype="decimal" />
<xs:element name="Half2MSActual" sql:field="Half2MSActual"
sql:datatype="decimal" />
<xs:element name="Half2NonMSActual" sql:field="Half2NonMSActual"
sql:datatype="decimal" />
<xs:element name="Total" sql:field="Total" sql:datatype="decimal" />
<xs:element name="TotalPercentage" sql:field="TotalPercentage"
sql:datatype="decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Branch" sql:relation="Branch"
sql:relationship="MicrosoftPartnerProfile_Branch">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BranchAccountID" sql:field="BranchAccountID"
sql:datatype="nvarchar" />
<xs:element name="ExecuteOnLocalMarketingCampaigns"
sql:field="ExecuteOnLocalMarketingCampaigns" sql:datatype="varchar" />
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="BusinessSectionID1" sql:field="BusinessSectionID1"
sql:datatype="int" />
<xs:element name="BusinessSectionID2" sql:field="BusinessSectionID2"
sql:datatype="int" />
<xs:element name="EngagementTypeID" sql:field="EngagementTypeID"
sql:datatype="int" />
<xs:element name="EngagementTypeID1" sql:field="EngagementTypeID1"
sql:datatype="int" />
<xs:element name="EngagementTypeID2" sql:field="EngagementTypeID2"
sql:datatype="int" />
<xs:element name="ExecuteOnMSOpportunityForecasting"
sql:field="ExecuteOnMSOpportunityForecasting" sql:datatype="varchar" />
<xs:element name="AddressLine1" sql:field="AddressLine1"
sql:datatype="varchar" />
<xs:element name="SubDistrictID" sql:field="SubDistrictID"
sql:datatype="int" />
<xs:element name="City" sql:field="City" sql:datatype="varchar" />
<xs:element name="StateProvinceID" sql:field="StateProvinceID"
sql:datatype="varchar" />
<xs:element name="PostalCode" sql:field="PostalCode"
sql:datatype="varchar" />
<xs:element name="NumberOfLocalSalesProfessionals"
sql:field="NumberOfLocalSalesProfessionals" sql:datatype="int" />
<xs:element name="NumberOfLocalTechProfessionals"
sql:field="NumberOfLocalTechProfessionals" sql:datatype="int" />
<xs:element name="BranchName" sql:field="BranchName"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
<xs:element name="RevenueBreakdown" sql:relation="RevenueBreakdown">
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="PercentMS" sql:field="PercentMS"
sql:datatype="decimal" />
<xs:element name="PercentNonMS" sql:field="PercentNonMS"
sql:datatype="decimal" />
<xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
sql:datatype="decimal" />
<xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
sql:datatype="varchar" />
<xs:element name="RevenueBreakdownDetail"
sql:relation="RevenueBreakdownDetail"
sql:relationship="RevenueBreakdown_RevenueBreakdownDetail"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessSubsectionID"
sql:field="BusinessSubsectionID" sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="PercentMS" sql:field="PercentMS"
sql:datatype="decimal" />
<xs:element name="PercentNonMS" sql:field="PercentNonMS"
sql:datatype="decimal" />
<xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
sql:datatype="decimal" />
<xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
-->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>I resolved the problem. Since this productmetrics table was a child of the
annualbusinessmodel table, it had to be nested in the schema.
:>
"jb" wrote:
> When I try to select with sqlxml I recevie the following error related to
one
> relationship that has a composite key (all none composite key relationship
s
> work).
> Schema: the parent/child table of the relationship on
> 'ProductMetricsBreakDown' does not match.
> The xsd is included that is causing the error is included
> It is the AnnualBusinessModel_ProductMetricsBreakD
own that is giving me th
e
> error.
> Any help would be greatly appreciated.
> <?xml version="1.0" encoding="utf-8"?>
> <xs:schema elementFormDefault="qualified"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xs:annotation>
> <xs:appinfo>
> <sql:relationship name=" MicrosoftPartnerProfile_AnnualBusinessMo
del"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="AnnualBusinessModel" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Branch"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Branch"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_BusinessFocus"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="BusinessFoc
us"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_FormUI"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="FormUI"
> child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_LinksToOtherDocu
ments"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="LinksToOtherDocuments" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_NotesAndConditio
ns"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="NotesAndConditions" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_PartnerAssessmen
t"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerAssessment" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_PartnerCompetenc
y"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerCompetency" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerGTM"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="PartnerGTM"
> child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_PartnerIndustryV
ertical
"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerIndustryVertical" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_PartnerSalesVert
ical"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSalesVertical" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_PartnerSpecializ
ation"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSpecialization" child-key="AccountID" />
> <sql:relationship name=" MicrosoftPartnerProfile_RevenueBreakdown
"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="RevenueBreakdown" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Contact"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Contact"
> child-key="AccountID" />
> <sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <!--<sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own
"
> parent="AnnualBusinessModel" parent-key="CalendarYear"
> child="ProductMetricsBreakDown" child-key="CalendarYear" /> -->
> <!--
> <sql:relationship name=" AnnualBusinessModel_ProductMetricsBreakD
own"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <sql:relationship name="RevenueBreakdown_RevenueBreakdownDetail"
> parent="RevenueBreakdown" parent-key="AccountID BusinessSectionID
> CalendarYear" child="RevenueBreakdownDetail" child-key="AccountID
> BusinessSectionID CalendarYear" />
> -->
> </xs:appinfo>
> </xs:annotation>
> <xs:element name="MicrosoftPartnerProfile"
> sql:relation="MicrosoftPartnerProfile">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="NativeID" sql:field="NativeID" sql:datatype="int" />
> <xs:element name="CertificationTierLevelID"
> sql:field="CertificationTierLevelID" sql:datatype="varchar" />
> <xs:element name="CompanyName" sql:field="CompanyName"
> sql:datatype="varchar" />
> <xs:element name="DoingBusinessAsName" sql:field="DoingBusinessAsName"
> sql:datatype="varchar" />
> <xs:element name="GeographicAreaID" sql:field="GeographicAreaID"
> sql:datatype="int" />
> <xs:element name="Region" sql:field="Region" sql:datatype="varchar" />
> <xs:element name="District" sql:field="District" sql:datatype="varchar
" />
> <xs:element name="MatrixID" sql:field="MatrixID" sql:datatype="int" />
> <xs:element name="NumberOfEmployees" sql:field="NumberOfEmployees"
> sql:datatype="int" />
> <xs:element name="NumberOfSalesProfessionals"
> sql:field="NumberOfSalesProfessionals" sql:datatype="int" />
> <xs:element name="NumberOfEmployeesPerUPP"
> sql:field="NumberOfEmployeesPerUPP" sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionals"
> sql:field="NumberOfTechProfessionals" sql:datatype="int" />
> <xs:element name="OrgHQLocationIndicator"
> sql:field="OrgHQLocationIndicator" sql:datatype="varchar" />
> <xs:element name="NumberOfSalesProfessionalsPerUPP"
> sql:field="NumberOfSalesProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="GlobalPartner" sql:field="GlobalPartner"
> sql:datatype="varchar" />
> <xs:element name="ActiveFlag" sql:field="ActiveFlag"
> sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionalsPerUPP"
> sql:field="NumberOfTechProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="MSOrganizationID" sql:field="MSOrganizationID"
> sql:datatype="int" />
> <xs:element name="Seg_1_49_Percent" sql:field="Seg_1_49_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_50_999_Percent" sql:field="Seg_50_999_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_1000_14999_Percent"
> sql:field="Seg_1000_14999_Percent" sql:datatype="decimal" />
> <xs:element name="Seg_15000_Percent" sql:field="Seg_15000_Percent"
> sql:datatype="decimal" />
> <xs:element name="AddressLine1" sql:field="AddressLine1"
> sql:datatype="varchar" />
> <xs:element name="AddressLine2" sql:field="AddressLine2"
> sql:datatype="varchar" />
> <xs:element name="City" sql:field="City" sql:datatype="varchar" />
> <xs:element name="PostalCode" sql:field="PostalCode"
> sql:datatype="varchar" />
> <xs:element name="StateProvinceId" sql:field="StateProvinceId"
> sql:datatype="varchar" />
> <xs:element name="Phone" sql:field="Phone" sql:datatype="varchar" />
> <xs:element name="SiebelID" sql:field="SiebelID" sql:datatype="int" />
> <xs:element name="StatusID" sql:field="StatusID" sql:datatype="varchar
" />
> <xs:element name="ProfileDueDate" sql:field="ProfileDueDate"
> sql:datatype="datetime" />
> <xs:element name="ManagedBy" sql:field="ManagedBy"
> sql:datatype="varchar" />
> <xs:element name="ParentAccountID" sql:field="ParentAccountID"
> sql:datatype="int" />
> <xs:element name="UPPID" sql:field="UPPID" sql:datatype="int" />
> <xs:element name="LastModifiedBy" sql:field="LastModifiedBy"
> sql:datatype="varchar" />
> <xs:element name="LastModifiedDate" sql:field="LastModifiedDate"
> sql:datatype="datetime" />
> <xs:element name="ParentUPPId" sql:field="ParentUPPId"
> sql:datatype="int" />
> <xs:element name="CustomCampaign" sql:field="CustomCampaign"
> sql:datatype="varchar" />
> <xs:element name="PartnerSalesVertical"
> sql:relation="PartnerSalesVertical"
> sql:relationship=" MicrosoftPartnerProfile_PartnerSalesVert
ical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="SalesVerticalID" sql:field="SalesVerticalID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varcha
r"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerIndustryVertical"
> sql:relation="PartnerIndustryVertical"
> sql:relationship=" MicrosoftPartnerProfile_PartnerIndustryV
ertical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="IndustryVerticalID" sql:field="IndustryVerticalID
"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varcha
r"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerGTM" sql:relation="PartnerGTM"
> sql:relationship="MicrosoftPartnerProfile_PartnerGTM" maxOccurs="unbounded
">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="GTMFocusID" sql:field="GTMFocusID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varcha
r"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerCompetency" sql:relation="PartnerCompetency"
> sql:relationship=" MicrosoftPartnerProfile_PartnerCompetenc
y"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyID" sql:field="CompetencyID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varcha
r"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="FormUI" sql:relation="FormUI"
> sql:relationship="MicrosoftPartnerProfile_FormUI" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyCheckMode"
> sql:field="CompetencyCheckMode" sql:datatype="varchar" />
> <xs:element name="SpecializationCheckModel"
> sql:field="SpecializationCheckModel" sql:datatype="varchar" />
> <xs:element name="ProductsCheckMode" sql:field="ProductsCheckMode"
> sql:datatype="varchar" />
> <xs:element name="IndustryVerticalsCheckMode"
> sql:field="IndustryVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="MBSVerticalsCheckMode"
> sql:field="MBSVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="GTMSCheckMode" sql:field="GTMSCheckMode"
> sql:datatype="varchar" />
> <xs:element name="AssessmentsCheckMode"
> sql:field="AssessmentsCheckMode" sql:datatype="varchar" />
> <xs:element name="AnnualBusinessCurrentMode"
> sql:field="AnnualBusinessCurrentMode" sql:datatype="varchar" />
> <xs:element name="BusinessPlanCurrentMode"
> sql:field="BusinessPlanCurrentMode" sql:datatype="varchar" />
> <xs:element name="NavProfileStatus" sql:field="NavProfileStatus"
> sql:datatype="varchar" />
> <xs:element name="NavCoreInformation" sql:field="NavCoreInformation
"
> sql:datatype="varchar" />
> <xs:element name="NavBusinessFocus" sql:field="NavBusinessFocus"
> sql:datatype="varchar" />
> <xs:element name="NavContact" sql:field="NavContact"
> sql:datatype="varchar" />
> <xs:element name="NavBranch" sql:field="NavBranch"
> sql:datatype="varchar" />
> <xs:element name="NavCompetency" sql:field="NavCompetency"
> sql:datatype="varchar" />
> <xs:element name="NavSpecialization" sql:field="NavSpecialization"
> sql:datatype="varchar" />
> <xs:element name="NavIndustryVert" sql:field="NavIndustryVert"
> sql:datatype="varchar" />
> <xs:element name="NavMBSVert" sql:field="NavMBSVert"
> sql:datatype="varchar" />
> <xs:element name="NavRevSummary" sql:field="NavRevSummary"
> sql:datatype="varchar" />
> <xs:element name="NavConditions" sql:field="NavConditions"
> sql:datatype="varchar" />
> <xs:element name="NavRhythm" sql:field="NavRhythm"
> sql:datatype="varchar" />
> <xs:element name="NavCampaigns" sql:field="NavCampaigns"
> sql:datatype="varchar" />
> <xs:element name="NavAssessments" sql:field="NavAssessments"
> sql:datatype="varchar" />
> <xs:element name="NavLinks" sql:field="NavLinks"
> sql:datatype="varchar" />
> <xs:element name="NavProducts" sql:field="NavProducts"
> sql:datatype="varchar" />
> <xs:element name="NavPlanStatus" sql:field="NavPlanStatus"
> sql:datatype="varchar" />
> <xs:element name="NavGoalSummary" sql:field="NavGoalSummary"
> sql:datatype="varchar" />
> <xs:element name="NavInvestments" sql:field="NavInvestments"
> sql:datatype="varchar" />
> <xs:element name="NavSolutionPlan" sql:field="NavSolutionPlan"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="LinksToOtherDocuments"
> sql:relation="LinksToOtherDocuments"
> sql:relationship=" MicrosoftPartnerProfile_LinksToOtherDocu
ments">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="DocumentUrl" sql:field="DocumentUrl"
> sql:datatype="varchar" />
> <xs:element name="DocumentTitle" sql:field="DocumentTitle"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="NotesAndConditions" sql:relation="NotesAndConditions
"
> sql:relationship=" MicrosoftPartnerProfile_NotesAndConditio
ns">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="MeetingFrequencyID" sql:field="MeetingFrequencyID"[/color
]
parent/child table error in sqlxml
relationship that has a composite key (all none composite key relationships
work).
Schema: the parent/child table of the relationship on
'ProductMetricsBreakDown' does not match.
The xsd is included that is causing the error is included
It is the AnnualBusinessModel_ProductMetricsBreakDown that is giving me the
error.
Any help would be greatly appreciated.
<?xml version="1.0" encoding="utf-8"?>
<xs:schema elementFormDefault="qualified"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
<xs:annotation>
<xs:appinfo>
<sql:relationship name="MicrosoftPartnerProfile_AnnualBusinessModel"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="AnnualBusinessModel" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_Branch"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Branch"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_BusinessFocus"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="BusinessFocus"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_FormUI"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="FormUI"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_LinksToOtherDocument s"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="LinksToOtherDocuments" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_NotesAndConditions"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="NotesAndConditions" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerAssessment"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerAssessment" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerCompetency"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerCompetency" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerGTM"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="PartnerGTM"
child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerIndustryVerti cal"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerIndustryVertical" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerSalesVertical "
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerSalesVertical" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_PartnerSpecializatio n"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="PartnerSpecialization" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_RevenueBreakdown"
parent="MicrosoftPartnerProfile" parent-key="AccountID"
child="RevenueBreakdown" child-key="AccountID" />
<sql:relationship name="MicrosoftPartnerProfile_Contact"
parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Contact"
child-key="AccountID" />
<sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
<!--<sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
parent="AnnualBusinessModel" parent-key="CalendarYear"
child="ProductMetricsBreakDown" child-key="CalendarYear" /> -->
<!--
<sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
<sql:relationship name="RevenueBreakdown_RevenueBreakdownDetail"
parent="RevenueBreakdown" parent-key="AccountID BusinessSectionID
CalendarYear" child="RevenueBreakdownDetail" child-key="AccountID
BusinessSectionID CalendarYear" />
-->
</xs:appinfo>
</xs:annotation>
<xs:element name="MicrosoftPartnerProfile"
sql:relation="MicrosoftPartnerProfile">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="NativeID" sql:field="NativeID" sql:datatype="int" />
<xs:element name="CertificationTierLevelID"
sql:field="CertificationTierLevelID" sql:datatype="varchar" />
<xs:element name="CompanyName" sql:field="CompanyName"
sql:datatype="varchar" />
<xs:element name="DoingBusinessAsName" sql:field="DoingBusinessAsName"
sql:datatype="varchar" />
<xs:element name="GeographicAreaID" sql:field="GeographicAreaID"
sql:datatype="int" />
<xs:element name="Region" sql:field="Region" sql:datatype="varchar" />
<xs:element name="District" sql:field="District" sql:datatype="varchar" />
<xs:element name="MatrixID" sql:field="MatrixID" sql:datatype="int" />
<xs:element name="NumberOfEmployees" sql:field="NumberOfEmployees"
sql:datatype="int" />
<xs:element name="NumberOfSalesProfessionals"
sql:field="NumberOfSalesProfessionals" sql:datatype="int" />
<xs:element name="NumberOfEmployeesPerUPP"
sql:field="NumberOfEmployeesPerUPP" sql:datatype="varchar" />
<xs:element name="NumberOfTechProfessionals"
sql:field="NumberOfTechProfessionals" sql:datatype="int" />
<xs:element name="OrgHQLocationIndicator"
sql:field="OrgHQLocationIndicator" sql:datatype="varchar" />
<xs:element name="NumberOfSalesProfessionalsPerUPP"
sql:field="NumberOfSalesProfessionalsPerUPP" sql:datatype="varchar" />
<xs:element name="GlobalPartner" sql:field="GlobalPartner"
sql:datatype="varchar" />
<xs:element name="ActiveFlag" sql:field="ActiveFlag"
sql:datatype="varchar" />
<xs:element name="NumberOfTechProfessionalsPerUPP"
sql:field="NumberOfTechProfessionalsPerUPP" sql:datatype="varchar" />
<xs:element name="MSOrganizationID" sql:field="MSOrganizationID"
sql:datatype="int" />
<xs:element name="Seg_1_49_Percent" sql:field="Seg_1_49_Percent"
sql:datatype="decimal" />
<xs:element name="Seg_50_999_Percent" sql:field="Seg_50_999_Percent"
sql:datatype="decimal" />
<xs:element name="Seg_1000_14999_Percent"
sql:field="Seg_1000_14999_Percent" sql:datatype="decimal" />
<xs:element name="Seg_15000_Percent" sql:field="Seg_15000_Percent"
sql:datatype="decimal" />
<xs:element name="AddressLine1" sql:field="AddressLine1"
sql:datatype="varchar" />
<xs:element name="AddressLine2" sql:field="AddressLine2"
sql:datatype="varchar" />
<xs:element name="City" sql:field="City" sql:datatype="varchar" />
<xs:element name="PostalCode" sql:field="PostalCode"
sql:datatype="varchar" />
<xs:element name="StateProvinceId" sql:field="StateProvinceId"
sql:datatype="varchar" />
<xs:element name="Phone" sql:field="Phone" sql:datatype="varchar" />
<xs:element name="SiebelID" sql:field="SiebelID" sql:datatype="int" />
<xs:element name="StatusID" sql:field="StatusID" sql:datatype="varchar" />
<xs:element name="ProfileDueDate" sql:field="ProfileDueDate"
sql:datatype="datetime" />
<xs:element name="ManagedBy" sql:field="ManagedBy"
sql:datatype="varchar" />
<xs:element name="ParentAccountID" sql:field="ParentAccountID"
sql:datatype="int" />
<xs:element name="UPPID" sql:field="UPPID" sql:datatype="int" />
<xs:element name="LastModifiedBy" sql:field="LastModifiedBy"
sql:datatype="varchar" />
<xs:element name="LastModifiedDate" sql:field="LastModifiedDate"
sql:datatype="datetime" />
<xs:element name="ParentUPPId" sql:field="ParentUPPId"
sql:datatype="int" />
<xs:element name="CustomCampaign" sql:field="CustomCampaign"
sql:datatype="varchar" />
<xs:element name="PartnerSalesVertical"
sql:relation="PartnerSalesVertical"
sql:relationship="MicrosoftPartnerProfile_PartnerS alesVertical"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="SalesVerticalID" sql:field="SalesVerticalID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerIndustryVertical"
sql:relation="PartnerIndustryVertical"
sql:relationship="MicrosoftPartnerProfile_PartnerI ndustryVertical"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="IndustryVerticalID" sql:field="IndustryVerticalID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerGTM" sql:relation="PartnerGTM"
sql:relationship="MicrosoftPartnerProfile_PartnerG TM" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="GTMFocusID" sql:field="GTMFocusID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerCompetency" sql:relation="PartnerCompetency"
sql:relationship="MicrosoftPartnerProfile_PartnerC ompetency"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CompetencyID" sql:field="CompetencyID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="FormUI" sql:relation="FormUI"
sql:relationship="MicrosoftPartnerProfile_FormUI" maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CompetencyCheckMode"
sql:field="CompetencyCheckMode" sql:datatype="varchar" />
<xs:element name="SpecializationCheckModel"
sql:field="SpecializationCheckModel" sql:datatype="varchar" />
<xs:element name="ProductsCheckMode" sql:field="ProductsCheckMode"
sql:datatype="varchar" />
<xs:element name="IndustryVerticalsCheckMode"
sql:field="IndustryVerticalsCheckMode" sql:datatype="varchar" />
<xs:element name="MBSVerticalsCheckMode"
sql:field="MBSVerticalsCheckMode" sql:datatype="varchar" />
<xs:element name="GTMSCheckMode" sql:field="GTMSCheckMode"
sql:datatype="varchar" />
<xs:element name="AssessmentsCheckMode"
sql:field="AssessmentsCheckMode" sql:datatype="varchar" />
<xs:element name="AnnualBusinessCurrentMode"
sql:field="AnnualBusinessCurrentMode" sql:datatype="varchar" />
<xs:element name="BusinessPlanCurrentMode"
sql:field="BusinessPlanCurrentMode" sql:datatype="varchar" />
<xs:element name="NavProfileStatus" sql:field="NavProfileStatus"
sql:datatype="varchar" />
<xs:element name="NavCoreInformation" sql:field="NavCoreInformation"
sql:datatype="varchar" />
<xs:element name="NavBusinessFocus" sql:field="NavBusinessFocus"
sql:datatype="varchar" />
<xs:element name="NavContact" sql:field="NavContact"
sql:datatype="varchar" />
<xs:element name="NavBranch" sql:field="NavBranch"
sql:datatype="varchar" />
<xs:element name="NavCompetency" sql:field="NavCompetency"
sql:datatype="varchar" />
<xs:element name="NavSpecialization" sql:field="NavSpecialization"
sql:datatype="varchar" />
<xs:element name="NavIndustryVert" sql:field="NavIndustryVert"
sql:datatype="varchar" />
<xs:element name="NavMBSVert" sql:field="NavMBSVert"
sql:datatype="varchar" />
<xs:element name="NavRevSummary" sql:field="NavRevSummary"
sql:datatype="varchar" />
<xs:element name="NavConditions" sql:field="NavConditions"
sql:datatype="varchar" />
<xs:element name="NavRhythm" sql:field="NavRhythm"
sql:datatype="varchar" />
<xs:element name="NavCampaigns" sql:field="NavCampaigns"
sql:datatype="varchar" />
<xs:element name="NavAssessments" sql:field="NavAssessments"
sql:datatype="varchar" />
<xs:element name="NavLinks" sql:field="NavLinks"
sql:datatype="varchar" />
<xs:element name="NavProducts" sql:field="NavProducts"
sql:datatype="varchar" />
<xs:element name="NavPlanStatus" sql:field="NavPlanStatus"
sql:datatype="varchar" />
<xs:element name="NavGoalSummary" sql:field="NavGoalSummary"
sql:datatype="varchar" />
<xs:element name="NavInvestments" sql:field="NavInvestments"
sql:datatype="varchar" />
<xs:element name="NavSolutionPlan" sql:field="NavSolutionPlan"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="LinksToOtherDocuments"
sql:relation="LinksToOtherDocuments"
sql:relationship="MicrosoftPartnerProfile_LinksToO therDocuments">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="DocumentUrl" sql:field="DocumentUrl"
sql:datatype="varchar" />
<xs:element name="DocumentTitle" sql:field="DocumentTitle"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="NotesAndConditions" sql:relation="NotesAndConditions"
sql:relationship="MicrosoftPartnerProfile_NotesAnd Conditions">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="MeetingFrequencyID" sql:field="MeetingFrequencyID"
sql:datatype="int" />
<xs:element name="ConditionsOfSatisfaction"
sql:field="ConditionsOfSatisfaction" sql:datatype="varchar" />
<xs:element name="Notes" sql:field="Notes" sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerAssessment" sql:relation="PartnerAssessment"
sql:relationship="MicrosoftPartnerProfile_PartnerA ssessment">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="AssessmentTypeID" sql:field="AssessmentTypeID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="AnnualBusinessModel"
sql:relation="AnnualBusinessModel"
sql:relationship="MicrosoftPartnerProfile_AnnualBu sinessModel">
<xs:complexType>
<xs:sequence>
<xs:element name="PartnerFiscalYearEndDate"
sql:field="PartnerFiscalYearEndDate" sql:datatype="datetime" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="AnnualRevenueInMillions"
sql:field="AnnualRevenueInMillions" sql:datatype="decimal" />
<xs:element name="RevenueGrowthPercentYOY"
sql:field="RevenueGrowthPercentYOY" sql:datatype="decimal" />
<xs:element name="AnnualRevenuePerUPP"
sql:field="AnnualRevenuePerUPP" sql:datatype="decimal" />
<xs:element name="AnnualMSRevenueInMillions"
sql:field="AnnualMSRevenueInMillions" sql:datatype="decimal" />
<xs:element name="AnnualSoftMSRevenuePerUPP"
sql:field="AnnualSoftMSRevenuePerUPP" sql:datatype="decimal" />
<xs:element name="MSRevenueGrowthPercentYOY"
sql:field="MSRevenueGrowthPercentYOY" sql:datatype="decimal" />
<xs:element name="PercentCRM" sql:field="PercentCRM"
sql:datatype="decimal" />
<xs:element name="PercentERP" sql:field="PercentERP"
sql:datatype="decimal" />
<xs:element name="HighlightedProductSubcategoryID"
sql:field="HighlightedProductSubcategoryID" sql:datatype="int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="BusinessFocus" sql:relation="BusinessFocus"
sql:relationship="MicrosoftPartnerProfile_Business Focus">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BluePrintQuadrantID"
sql:field="BluePrintQuadrantID" sql:datatype="int" />
<xs:element name="PartnerTypeID" sql:field="PartnerTypeID"
sql:datatype="varchar" />
<xs:element name="DistrictPref1" sql:field="DistrictPref1"
sql:datatype="int" />
<xs:element name="DistrictPref2" sql:field="DistrictPref2"
sql:datatype="int" />
<xs:element name="DistrictPref3" sql:field="DistrictPref3"
sql:datatype="int" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="PartnerSpecialization"
sql:relation="PartnerSpecialization"
sql:relationship="MicrosoftPartnerProfile_PartnerS pecialization">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="SpecializationID" sql:field="SpecializationID"
sql:datatype="int" />
<xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
/>
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="ProductMetricsBreakDown"
sql:relation="ProductMetricsBreakDown"
sql:relationship="AnnualBusinessModel_ProductMetri csBreakDown" >
<xs:complexType>
<xs:sequence>
<xs:element name="MetricId" sql:field="MetricId" sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="ProductSubCategoryID"
sql:field="ProductSubCategoryID" sql:datatype="int" />
<xs:element name="MetricName" sql:field="MetricName"
sql:datatype="varchar" />
<xs:element name="ProductSubcategoryName"
sql:field="ProductSubcategoryName" sql:datatype="varchar" />
<xs:element name="Half1MSGoal" sql:field="Half1MSGoal"
sql:datatype="decimal" />
<xs:element name="Half1NonMSGoal" sql:field="Half1NonMSGoal"
sql:datatype="decimal" />
<xs:element name="Half1MSActual" sql:field="Half1MSActual"
sql:datatype="decimal" />
<xs:element name="Half1NonMSActual" sql:field="Half1NonMSActual"
sql:datatype="decimal" />
<xs:element name="Half2MSGoal" sql:field="Half2MSGoal"
sql:datatype="decimal" />
<xs:element name="Half2NonMSGoal" sql:field="Half2NonMSGoal"
sql:datatype="decimal" />
<xs:element name="Half2MSActual" sql:field="Half2MSActual"
sql:datatype="decimal" />
<xs:element name="Half2NonMSActual" sql:field="Half2NonMSActual"
sql:datatype="decimal" />
<xs:element name="Total" sql:field="Total" sql:datatype="decimal" />
<xs:element name="TotalPercentage" sql:field="TotalPercentage"
sql:datatype="decimal" />
</xs:sequence>
</xs:complexType>
</xs:element>
<xs:element name="Branch" sql:relation="Branch"
sql:relationship="MicrosoftPartnerProfile_Branch">
<xs:complexType>
<xs:sequence>
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BranchAccountID" sql:field="BranchAccountID"
sql:datatype="nvarchar" />
<xs:element name="ExecuteOnLocalMarketingCampaigns"
sql:field="ExecuteOnLocalMarketingCampaigns" sql:datatype="varchar" />
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="BusinessSectionID1" sql:field="BusinessSectionID1"
sql:datatype="int" />
<xs:element name="BusinessSectionID2" sql:field="BusinessSectionID2"
sql:datatype="int" />
<xs:element name="EngagementTypeID" sql:field="EngagementTypeID"
sql:datatype="int" />
<xs:element name="EngagementTypeID1" sql:field="EngagementTypeID1"
sql:datatype="int" />
<xs:element name="EngagementTypeID2" sql:field="EngagementTypeID2"
sql:datatype="int" />
<xs:element name="ExecuteOnMSOpportunityForecasting"
sql:field="ExecuteOnMSOpportunityForecasting" sql:datatype="varchar" />
<xs:element name="AddressLine1" sql:field="AddressLine1"
sql:datatype="varchar" />
<xs:element name="SubDistrictID" sql:field="SubDistrictID"
sql:datatype="int" />
<xs:element name="City" sql:field="City" sql:datatype="varchar" />
<xs:element name="StateProvinceID" sql:field="StateProvinceID"
sql:datatype="varchar" />
<xs:element name="PostalCode" sql:field="PostalCode"
sql:datatype="varchar" />
<xs:element name="NumberOfLocalSalesProfessionals"
sql:field="NumberOfLocalSalesProfessionals" sql:datatype="int" />
<xs:element name="NumberOfLocalTechProfessionals"
sql:field="NumberOfLocalTechProfessionals" sql:datatype="int" />
<xs:element name="BranchName" sql:field="BranchName"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
<!--
<xs:element name="RevenueBreakdown" sql:relation="RevenueBreakdown">
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="PercentMS" sql:field="PercentMS"
sql:datatype="decimal" />
<xs:element name="PercentNonMS" sql:field="PercentNonMS"
sql:datatype="decimal" />
<xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
sql:datatype="decimal" />
<xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
sql:datatype="varchar" />
<xs:element name="RevenueBreakdownDetail"
sql:relation="RevenueBreakdownDetail"
sql:relationship="RevenueBreakdown_RevenueBreakdow nDetail"
maxOccurs="unbounded">
<xs:complexType>
<xs:sequence>
<xs:element name="BusinessSubsectionID"
sql:field="BusinessSubsectionID" sql:datatype="int" />
<xs:element name="AccountID" sql:field="AccountID"
sql:datatype="nvarchar" />
<xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
sql:datatype="int" />
<xs:element name="CalendarYear" sql:field="CalendarYear"
sql:datatype="int" />
<xs:element name="PercentMS" sql:field="PercentMS"
sql:datatype="decimal" />
<xs:element name="PercentNonMS" sql:field="PercentNonMS"
sql:datatype="decimal" />
<xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
sql:datatype="decimal" />
<xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
sql:datatype="varchar" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
-->
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>
I resolved the problem. Since this productmetrics table was a child of the
annualbusinessmodel table, it had to be nested in the schema.
:>
"jb" wrote:
> When I try to select with sqlxml I recevie the following error related to one
> relationship that has a composite key (all none composite key relationships
> work).
> Schema: the parent/child table of the relationship on
> 'ProductMetricsBreakDown' does not match.
> The xsd is included that is causing the error is included
> It is the AnnualBusinessModel_ProductMetricsBreakDown that is giving me the
> error.
> Any help would be greatly appreciated.
> <?xml version="1.0" encoding="utf-8"?>
> <xs:schema elementFormDefault="qualified"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xs:annotation>
> <xs:appinfo>
> <sql:relationship name="MicrosoftPartnerProfile_AnnualBusinessModel"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="AnnualBusinessModel" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Branch"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Branch"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_BusinessFocus"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="BusinessFocus"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_FormUI"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="FormUI"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_LinksToOtherDocument s"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="LinksToOtherDocuments" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_NotesAndConditions"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="NotesAndConditions" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerAssessment"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerAssessment" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerCompetency"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerCompetency" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerGTM"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="PartnerGTM"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerIndustryVerti cal"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerIndustryVertical" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerSalesVertical "
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSalesVertical" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerSpecializatio n"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSpecialization" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_RevenueBreakdown"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="RevenueBreakdown" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Contact"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Contact"
> child-key="AccountID" />
> <sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <!--<sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="CalendarYear"
> child="ProductMetricsBreakDown" child-key="CalendarYear" /> -->
> <!--
> <sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <sql:relationship name="RevenueBreakdown_RevenueBreakdownDetail"
> parent="RevenueBreakdown" parent-key="AccountID BusinessSectionID
> CalendarYear" child="RevenueBreakdownDetail" child-key="AccountID
> BusinessSectionID CalendarYear" />
> -->
> </xs:appinfo>
> </xs:annotation>
> <xs:element name="MicrosoftPartnerProfile"
> sql:relation="MicrosoftPartnerProfile">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="NativeID" sql:field="NativeID" sql:datatype="int" />
> <xs:element name="CertificationTierLevelID"
> sql:field="CertificationTierLevelID" sql:datatype="varchar" />
> <xs:element name="CompanyName" sql:field="CompanyName"
> sql:datatype="varchar" />
> <xs:element name="DoingBusinessAsName" sql:field="DoingBusinessAsName"
> sql:datatype="varchar" />
> <xs:element name="GeographicAreaID" sql:field="GeographicAreaID"
> sql:datatype="int" />
> <xs:element name="Region" sql:field="Region" sql:datatype="varchar" />
> <xs:element name="District" sql:field="District" sql:datatype="varchar" />
> <xs:element name="MatrixID" sql:field="MatrixID" sql:datatype="int" />
> <xs:element name="NumberOfEmployees" sql:field="NumberOfEmployees"
> sql:datatype="int" />
> <xs:element name="NumberOfSalesProfessionals"
> sql:field="NumberOfSalesProfessionals" sql:datatype="int" />
> <xs:element name="NumberOfEmployeesPerUPP"
> sql:field="NumberOfEmployeesPerUPP" sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionals"
> sql:field="NumberOfTechProfessionals" sql:datatype="int" />
> <xs:element name="OrgHQLocationIndicator"
> sql:field="OrgHQLocationIndicator" sql:datatype="varchar" />
> <xs:element name="NumberOfSalesProfessionalsPerUPP"
> sql:field="NumberOfSalesProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="GlobalPartner" sql:field="GlobalPartner"
> sql:datatype="varchar" />
> <xs:element name="ActiveFlag" sql:field="ActiveFlag"
> sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionalsPerUPP"
> sql:field="NumberOfTechProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="MSOrganizationID" sql:field="MSOrganizationID"
> sql:datatype="int" />
> <xs:element name="Seg_1_49_Percent" sql:field="Seg_1_49_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_50_999_Percent" sql:field="Seg_50_999_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_1000_14999_Percent"
> sql:field="Seg_1000_14999_Percent" sql:datatype="decimal" />
> <xs:element name="Seg_15000_Percent" sql:field="Seg_15000_Percent"
> sql:datatype="decimal" />
> <xs:element name="AddressLine1" sql:field="AddressLine1"
> sql:datatype="varchar" />
> <xs:element name="AddressLine2" sql:field="AddressLine2"
> sql:datatype="varchar" />
> <xs:element name="City" sql:field="City" sql:datatype="varchar" />
> <xs:element name="PostalCode" sql:field="PostalCode"
> sql:datatype="varchar" />
> <xs:element name="StateProvinceId" sql:field="StateProvinceId"
> sql:datatype="varchar" />
> <xs:element name="Phone" sql:field="Phone" sql:datatype="varchar" />
> <xs:element name="SiebelID" sql:field="SiebelID" sql:datatype="int" />
> <xs:element name="StatusID" sql:field="StatusID" sql:datatype="varchar" />
> <xs:element name="ProfileDueDate" sql:field="ProfileDueDate"
> sql:datatype="datetime" />
> <xs:element name="ManagedBy" sql:field="ManagedBy"
> sql:datatype="varchar" />
> <xs:element name="ParentAccountID" sql:field="ParentAccountID"
> sql:datatype="int" />
> <xs:element name="UPPID" sql:field="UPPID" sql:datatype="int" />
> <xs:element name="LastModifiedBy" sql:field="LastModifiedBy"
> sql:datatype="varchar" />
> <xs:element name="LastModifiedDate" sql:field="LastModifiedDate"
> sql:datatype="datetime" />
> <xs:element name="ParentUPPId" sql:field="ParentUPPId"
> sql:datatype="int" />
> <xs:element name="CustomCampaign" sql:field="CustomCampaign"
> sql:datatype="varchar" />
> <xs:element name="PartnerSalesVertical"
> sql:relation="PartnerSalesVertical"
> sql:relationship="MicrosoftPartnerProfile_PartnerS alesVertical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="SalesVerticalID" sql:field="SalesVerticalID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerIndustryVertical"
> sql:relation="PartnerIndustryVertical"
> sql:relationship="MicrosoftPartnerProfile_PartnerI ndustryVertical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="IndustryVerticalID" sql:field="IndustryVerticalID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerGTM" sql:relation="PartnerGTM"
> sql:relationship="MicrosoftPartnerProfile_PartnerG TM" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="GTMFocusID" sql:field="GTMFocusID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerCompetency" sql:relation="PartnerCompetency"
> sql:relationship="MicrosoftPartnerProfile_PartnerC ompetency"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyID" sql:field="CompetencyID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="FormUI" sql:relation="FormUI"
> sql:relationship="MicrosoftPartnerProfile_FormUI" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyCheckMode"
> sql:field="CompetencyCheckMode" sql:datatype="varchar" />
> <xs:element name="SpecializationCheckModel"
> sql:field="SpecializationCheckModel" sql:datatype="varchar" />
> <xs:element name="ProductsCheckMode" sql:field="ProductsCheckMode"
> sql:datatype="varchar" />
> <xs:element name="IndustryVerticalsCheckMode"
> sql:field="IndustryVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="MBSVerticalsCheckMode"
> sql:field="MBSVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="GTMSCheckMode" sql:field="GTMSCheckMode"
> sql:datatype="varchar" />
> <xs:element name="AssessmentsCheckMode"
> sql:field="AssessmentsCheckMode" sql:datatype="varchar" />
> <xs:element name="AnnualBusinessCurrentMode"
> sql:field="AnnualBusinessCurrentMode" sql:datatype="varchar" />
> <xs:element name="BusinessPlanCurrentMode"
> sql:field="BusinessPlanCurrentMode" sql:datatype="varchar" />
> <xs:element name="NavProfileStatus" sql:field="NavProfileStatus"
> sql:datatype="varchar" />
> <xs:element name="NavCoreInformation" sql:field="NavCoreInformation"
> sql:datatype="varchar" />
> <xs:element name="NavBusinessFocus" sql:field="NavBusinessFocus"
> sql:datatype="varchar" />
> <xs:element name="NavContact" sql:field="NavContact"
> sql:datatype="varchar" />
> <xs:element name="NavBranch" sql:field="NavBranch"
> sql:datatype="varchar" />
> <xs:element name="NavCompetency" sql:field="NavCompetency"
> sql:datatype="varchar" />
> <xs:element name="NavSpecialization" sql:field="NavSpecialization"
> sql:datatype="varchar" />
> <xs:element name="NavIndustryVert" sql:field="NavIndustryVert"
> sql:datatype="varchar" />
> <xs:element name="NavMBSVert" sql:field="NavMBSVert"
> sql:datatype="varchar" />
> <xs:element name="NavRevSummary" sql:field="NavRevSummary"
> sql:datatype="varchar" />
> <xs:element name="NavConditions" sql:field="NavConditions"
> sql:datatype="varchar" />
> <xs:element name="NavRhythm" sql:field="NavRhythm"
> sql:datatype="varchar" />
> <xs:element name="NavCampaigns" sql:field="NavCampaigns"
> sql:datatype="varchar" />
> <xs:element name="NavAssessments" sql:field="NavAssessments"
> sql:datatype="varchar" />
> <xs:element name="NavLinks" sql:field="NavLinks"
> sql:datatype="varchar" />
> <xs:element name="NavProducts" sql:field="NavProducts"
> sql:datatype="varchar" />
> <xs:element name="NavPlanStatus" sql:field="NavPlanStatus"
> sql:datatype="varchar" />
> <xs:element name="NavGoalSummary" sql:field="NavGoalSummary"
> sql:datatype="varchar" />
> <xs:element name="NavInvestments" sql:field="NavInvestments"
> sql:datatype="varchar" />
> <xs:element name="NavSolutionPlan" sql:field="NavSolutionPlan"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="LinksToOtherDocuments"
> sql:relation="LinksToOtherDocuments"
> sql:relationship="MicrosoftPartnerProfile_LinksToO therDocuments">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="DocumentUrl" sql:field="DocumentUrl"
> sql:datatype="varchar" />
> <xs:element name="DocumentTitle" sql:field="DocumentTitle"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="NotesAndConditions" sql:relation="NotesAndConditions"
> sql:relationship="MicrosoftPartnerProfile_NotesAnd Conditions">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="MeetingFrequencyID" sql:field="MeetingFrequencyID"
|||
> When I try to select with sqlxml I recevie the following error related to one
> relationship that has a composite key (all none composite key relationships
> work).
> Schema: the parent/child table of the relationship on
> 'ProductMetricsBreakDown' does not match.
> The xsd is included that is causing the error is included
> It is the AnnualBusinessModel_ProductMetricsBreakDown that is giving me the
> error.
> Any help would be greatly appreciated.
> <?xml version="1.0" encoding="utf-8"?>
> <xs:schema elementFormDefault="qualified"
> xmlns:xs="http://www.w3.org/2001/XMLSchema"
> xmlns:sql="urn:schemas-microsoft-com:mapping-schema">
> <xs:annotation>
> <xs:appinfo>
> <sql:relationship name="MicrosoftPartnerProfile_AnnualBusinessModel"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="AnnualBusinessModel" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Branch"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Branch"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_BusinessFocus"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="BusinessFocus"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_FormUI"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="FormUI"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_LinksToOtherDocument s"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="LinksToOtherDocuments" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_NotesAndConditions"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="NotesAndConditions" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerAssessment"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerAssessment" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerCompetency"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerCompetency" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerGTM"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="PartnerGTM"
> child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerIndustryVerti cal"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerIndustryVertical" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerSalesVertical "
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSalesVertical" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_PartnerSpecializatio n"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="PartnerSpecialization" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_RevenueBreakdown"
> parent="MicrosoftPartnerProfile" parent-key="AccountID"
> child="RevenueBreakdown" child-key="AccountID" />
> <sql:relationship name="MicrosoftPartnerProfile_Contact"
> parent="MicrosoftPartnerProfile" parent-key="AccountID" child="Contact"
> child-key="AccountID" />
> <sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <!--<sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="CalendarYear"
> child="ProductMetricsBreakDown" child-key="CalendarYear" /> -->
> <!--
> <sql:relationship name="AnnualBusinessModel_ProductMetricsBreakDown"
> parent="AnnualBusinessModel" parent-key="AccountID CalendarYear"
> child="ProductMetricsBreakDown" child-key="AccountID CalendarYear" />
> <sql:relationship name="RevenueBreakdown_RevenueBreakdownDetail"
> parent="RevenueBreakdown" parent-key="AccountID BusinessSectionID
> CalendarYear" child="RevenueBreakdownDetail" child-key="AccountID
> BusinessSectionID CalendarYear" />
> -->
> </xs:appinfo>
> </xs:annotation>
> <xs:element name="MicrosoftPartnerProfile"
> sql:relation="MicrosoftPartnerProfile">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="NativeID" sql:field="NativeID" sql:datatype="int" />
> <xs:element name="CertificationTierLevelID"
> sql:field="CertificationTierLevelID" sql:datatype="varchar" />
> <xs:element name="CompanyName" sql:field="CompanyName"
> sql:datatype="varchar" />
> <xs:element name="DoingBusinessAsName" sql:field="DoingBusinessAsName"
> sql:datatype="varchar" />
> <xs:element name="GeographicAreaID" sql:field="GeographicAreaID"
> sql:datatype="int" />
> <xs:element name="Region" sql:field="Region" sql:datatype="varchar" />
> <xs:element name="District" sql:field="District" sql:datatype="varchar" />
> <xs:element name="MatrixID" sql:field="MatrixID" sql:datatype="int" />
> <xs:element name="NumberOfEmployees" sql:field="NumberOfEmployees"
> sql:datatype="int" />
> <xs:element name="NumberOfSalesProfessionals"
> sql:field="NumberOfSalesProfessionals" sql:datatype="int" />
> <xs:element name="NumberOfEmployeesPerUPP"
> sql:field="NumberOfEmployeesPerUPP" sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionals"
> sql:field="NumberOfTechProfessionals" sql:datatype="int" />
> <xs:element name="OrgHQLocationIndicator"
> sql:field="OrgHQLocationIndicator" sql:datatype="varchar" />
> <xs:element name="NumberOfSalesProfessionalsPerUPP"
> sql:field="NumberOfSalesProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="GlobalPartner" sql:field="GlobalPartner"
> sql:datatype="varchar" />
> <xs:element name="ActiveFlag" sql:field="ActiveFlag"
> sql:datatype="varchar" />
> <xs:element name="NumberOfTechProfessionalsPerUPP"
> sql:field="NumberOfTechProfessionalsPerUPP" sql:datatype="varchar" />
> <xs:element name="MSOrganizationID" sql:field="MSOrganizationID"
> sql:datatype="int" />
> <xs:element name="Seg_1_49_Percent" sql:field="Seg_1_49_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_50_999_Percent" sql:field="Seg_50_999_Percent"
> sql:datatype="decimal" />
> <xs:element name="Seg_1000_14999_Percent"
> sql:field="Seg_1000_14999_Percent" sql:datatype="decimal" />
> <xs:element name="Seg_15000_Percent" sql:field="Seg_15000_Percent"
> sql:datatype="decimal" />
> <xs:element name="AddressLine1" sql:field="AddressLine1"
> sql:datatype="varchar" />
> <xs:element name="AddressLine2" sql:field="AddressLine2"
> sql:datatype="varchar" />
> <xs:element name="City" sql:field="City" sql:datatype="varchar" />
> <xs:element name="PostalCode" sql:field="PostalCode"
> sql:datatype="varchar" />
> <xs:element name="StateProvinceId" sql:field="StateProvinceId"
> sql:datatype="varchar" />
> <xs:element name="Phone" sql:field="Phone" sql:datatype="varchar" />
> <xs:element name="SiebelID" sql:field="SiebelID" sql:datatype="int" />
> <xs:element name="StatusID" sql:field="StatusID" sql:datatype="varchar" />
> <xs:element name="ProfileDueDate" sql:field="ProfileDueDate"
> sql:datatype="datetime" />
> <xs:element name="ManagedBy" sql:field="ManagedBy"
> sql:datatype="varchar" />
> <xs:element name="ParentAccountID" sql:field="ParentAccountID"
> sql:datatype="int" />
> <xs:element name="UPPID" sql:field="UPPID" sql:datatype="int" />
> <xs:element name="LastModifiedBy" sql:field="LastModifiedBy"
> sql:datatype="varchar" />
> <xs:element name="LastModifiedDate" sql:field="LastModifiedDate"
> sql:datatype="datetime" />
> <xs:element name="ParentUPPId" sql:field="ParentUPPId"
> sql:datatype="int" />
> <xs:element name="CustomCampaign" sql:field="CustomCampaign"
> sql:datatype="varchar" />
> <xs:element name="PartnerSalesVertical"
> sql:relation="PartnerSalesVertical"
> sql:relationship="MicrosoftPartnerProfile_PartnerS alesVertical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="SalesVerticalID" sql:field="SalesVerticalID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerIndustryVertical"
> sql:relation="PartnerIndustryVertical"
> sql:relationship="MicrosoftPartnerProfile_PartnerI ndustryVertical"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="IndustryVerticalID" sql:field="IndustryVerticalID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerGTM" sql:relation="PartnerGTM"
> sql:relationship="MicrosoftPartnerProfile_PartnerG TM" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="GTMFocusID" sql:field="GTMFocusID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerCompetency" sql:relation="PartnerCompetency"
> sql:relationship="MicrosoftPartnerProfile_PartnerC ompetency"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyID" sql:field="CompetencyID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="FormUI" sql:relation="FormUI"
> sql:relationship="MicrosoftPartnerProfile_FormUI" maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CompetencyCheckMode"
> sql:field="CompetencyCheckMode" sql:datatype="varchar" />
> <xs:element name="SpecializationCheckModel"
> sql:field="SpecializationCheckModel" sql:datatype="varchar" />
> <xs:element name="ProductsCheckMode" sql:field="ProductsCheckMode"
> sql:datatype="varchar" />
> <xs:element name="IndustryVerticalsCheckMode"
> sql:field="IndustryVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="MBSVerticalsCheckMode"
> sql:field="MBSVerticalsCheckMode" sql:datatype="varchar" />
> <xs:element name="GTMSCheckMode" sql:field="GTMSCheckMode"
> sql:datatype="varchar" />
> <xs:element name="AssessmentsCheckMode"
> sql:field="AssessmentsCheckMode" sql:datatype="varchar" />
> <xs:element name="AnnualBusinessCurrentMode"
> sql:field="AnnualBusinessCurrentMode" sql:datatype="varchar" />
> <xs:element name="BusinessPlanCurrentMode"
> sql:field="BusinessPlanCurrentMode" sql:datatype="varchar" />
> <xs:element name="NavProfileStatus" sql:field="NavProfileStatus"
> sql:datatype="varchar" />
> <xs:element name="NavCoreInformation" sql:field="NavCoreInformation"
> sql:datatype="varchar" />
> <xs:element name="NavBusinessFocus" sql:field="NavBusinessFocus"
> sql:datatype="varchar" />
> <xs:element name="NavContact" sql:field="NavContact"
> sql:datatype="varchar" />
> <xs:element name="NavBranch" sql:field="NavBranch"
> sql:datatype="varchar" />
> <xs:element name="NavCompetency" sql:field="NavCompetency"
> sql:datatype="varchar" />
> <xs:element name="NavSpecialization" sql:field="NavSpecialization"
> sql:datatype="varchar" />
> <xs:element name="NavIndustryVert" sql:field="NavIndustryVert"
> sql:datatype="varchar" />
> <xs:element name="NavMBSVert" sql:field="NavMBSVert"
> sql:datatype="varchar" />
> <xs:element name="NavRevSummary" sql:field="NavRevSummary"
> sql:datatype="varchar" />
> <xs:element name="NavConditions" sql:field="NavConditions"
> sql:datatype="varchar" />
> <xs:element name="NavRhythm" sql:field="NavRhythm"
> sql:datatype="varchar" />
> <xs:element name="NavCampaigns" sql:field="NavCampaigns"
> sql:datatype="varchar" />
> <xs:element name="NavAssessments" sql:field="NavAssessments"
> sql:datatype="varchar" />
> <xs:element name="NavLinks" sql:field="NavLinks"
> sql:datatype="varchar" />
> <xs:element name="NavProducts" sql:field="NavProducts"
> sql:datatype="varchar" />
> <xs:element name="NavPlanStatus" sql:field="NavPlanStatus"
> sql:datatype="varchar" />
> <xs:element name="NavGoalSummary" sql:field="NavGoalSummary"
> sql:datatype="varchar" />
> <xs:element name="NavInvestments" sql:field="NavInvestments"
> sql:datatype="varchar" />
> <xs:element name="NavSolutionPlan" sql:field="NavSolutionPlan"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="LinksToOtherDocuments"
> sql:relation="LinksToOtherDocuments"
> sql:relationship="MicrosoftPartnerProfile_LinksToO therDocuments">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="DocumentUrl" sql:field="DocumentUrl"
> sql:datatype="varchar" />
> <xs:element name="DocumentTitle" sql:field="DocumentTitle"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="NotesAndConditions" sql:relation="NotesAndConditions"
> sql:relationship="MicrosoftPartnerProfile_NotesAnd Conditions">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="MeetingFrequencyID" sql:field="MeetingFrequencyID"
> sql:datatype="int" />
> <xs:element name="ConditionsOfSatisfaction"
> sql:field="ConditionsOfSatisfaction" sql:datatype="varchar" />
> <xs:element name="Notes" sql:field="Notes" sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerAssessment" sql:relation="PartnerAssessment"
> sql:relationship="MicrosoftPartnerProfile_PartnerA ssessment">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="AssessmentTypeID" sql:field="AssessmentTypeID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="AnnualBusinessModel"
> sql:relation="AnnualBusinessModel"
> sql:relationship="MicrosoftPartnerProfile_AnnualBu sinessModel">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="PartnerFiscalYearEndDate"
> sql:field="PartnerFiscalYearEndDate" sql:datatype="datetime" />
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CalendarYear" sql:field="CalendarYear"
> sql:datatype="int" />
> <xs:element name="AnnualRevenueInMillions"
> sql:field="AnnualRevenueInMillions" sql:datatype="decimal" />
> <xs:element name="RevenueGrowthPercentYOY"
> sql:field="RevenueGrowthPercentYOY" sql:datatype="decimal" />
> <xs:element name="AnnualRevenuePerUPP"
> sql:field="AnnualRevenuePerUPP" sql:datatype="decimal" />
> <xs:element name="AnnualMSRevenueInMillions"
> sql:field="AnnualMSRevenueInMillions" sql:datatype="decimal" />
> <xs:element name="AnnualSoftMSRevenuePerUPP"
> sql:field="AnnualSoftMSRevenuePerUPP" sql:datatype="decimal" />
> <xs:element name="MSRevenueGrowthPercentYOY"
> sql:field="MSRevenueGrowthPercentYOY" sql:datatype="decimal" />
> <xs:element name="PercentCRM" sql:field="PercentCRM"
> sql:datatype="decimal" />
> <xs:element name="PercentERP" sql:field="PercentERP"
> sql:datatype="decimal" />
> <xs:element name="HighlightedProductSubcategoryID"
> sql:field="HighlightedProductSubcategoryID" sql:datatype="int" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="BusinessFocus" sql:relation="BusinessFocus"
> sql:relationship="MicrosoftPartnerProfile_Business Focus">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="BluePrintQuadrantID"
> sql:field="BluePrintQuadrantID" sql:datatype="int" />
> <xs:element name="PartnerTypeID" sql:field="PartnerTypeID"
> sql:datatype="varchar" />
> <xs:element name="DistrictPref1" sql:field="DistrictPref1"
> sql:datatype="int" />
> <xs:element name="DistrictPref2" sql:field="DistrictPref2"
> sql:datatype="int" />
> <xs:element name="DistrictPref3" sql:field="DistrictPref3"
> sql:datatype="int" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="PartnerSpecialization"
> sql:relation="PartnerSpecialization"
> sql:relationship="MicrosoftPartnerProfile_PartnerS pecialization">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="SpecializationID" sql:field="SpecializationID"
> sql:datatype="int" />
> <xs:element name="Checked" sql:field="Checked" sql:datatype="varchar"
> />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="ProductMetricsBreakDown"
> sql:relation="ProductMetricsBreakDown"
> sql:relationship="AnnualBusinessModel_ProductMetri csBreakDown" >
> <xs:complexType>
> <xs:sequence>
> <xs:element name="MetricId" sql:field="MetricId" sql:datatype="int" />
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CalendarYear" sql:field="CalendarYear"
> sql:datatype="int" />
> <xs:element name="ProductSubCategoryID"
> sql:field="ProductSubCategoryID" sql:datatype="int" />
> <xs:element name="MetricName" sql:field="MetricName"
> sql:datatype="varchar" />
> <xs:element name="ProductSubcategoryName"
> sql:field="ProductSubcategoryName" sql:datatype="varchar" />
> <xs:element name="Half1MSGoal" sql:field="Half1MSGoal"
> sql:datatype="decimal" />
> <xs:element name="Half1NonMSGoal" sql:field="Half1NonMSGoal"
> sql:datatype="decimal" />
> <xs:element name="Half1MSActual" sql:field="Half1MSActual"
> sql:datatype="decimal" />
> <xs:element name="Half1NonMSActual" sql:field="Half1NonMSActual"
> sql:datatype="decimal" />
> <xs:element name="Half2MSGoal" sql:field="Half2MSGoal"
> sql:datatype="decimal" />
> <xs:element name="Half2NonMSGoal" sql:field="Half2NonMSGoal"
> sql:datatype="decimal" />
> <xs:element name="Half2MSActual" sql:field="Half2MSActual"
> sql:datatype="decimal" />
> <xs:element name="Half2NonMSActual" sql:field="Half2NonMSActual"
> sql:datatype="decimal" />
> <xs:element name="Total" sql:field="Total" sql:datatype="decimal" />
> <xs:element name="TotalPercentage" sql:field="TotalPercentage"
> sql:datatype="decimal" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <xs:element name="Branch" sql:relation="Branch"
> sql:relationship="MicrosoftPartnerProfile_Branch">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="BranchAccountID" sql:field="BranchAccountID"
> sql:datatype="nvarchar" />
> <xs:element name="ExecuteOnLocalMarketingCampaigns"
> sql:field="ExecuteOnLocalMarketingCampaigns" sql:datatype="varchar" />
> <xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
> sql:datatype="int" />
> <xs:element name="BusinessSectionID1" sql:field="BusinessSectionID1"
> sql:datatype="int" />
> <xs:element name="BusinessSectionID2" sql:field="BusinessSectionID2"
> sql:datatype="int" />
> <xs:element name="EngagementTypeID" sql:field="EngagementTypeID"
> sql:datatype="int" />
> <xs:element name="EngagementTypeID1" sql:field="EngagementTypeID1"
> sql:datatype="int" />
> <xs:element name="EngagementTypeID2" sql:field="EngagementTypeID2"
> sql:datatype="int" />
> <xs:element name="ExecuteOnMSOpportunityForecasting"
> sql:field="ExecuteOnMSOpportunityForecasting" sql:datatype="varchar" />
> <xs:element name="AddressLine1" sql:field="AddressLine1"
> sql:datatype="varchar" />
> <xs:element name="SubDistrictID" sql:field="SubDistrictID"
> sql:datatype="int" />
> <xs:element name="City" sql:field="City" sql:datatype="varchar" />
> <xs:element name="StateProvinceID" sql:field="StateProvinceID"
> sql:datatype="varchar" />
> <xs:element name="PostalCode" sql:field="PostalCode"
> sql:datatype="varchar" />
> <xs:element name="NumberOfLocalSalesProfessionals"
> sql:field="NumberOfLocalSalesProfessionals" sql:datatype="int" />
> <xs:element name="NumberOfLocalTechProfessionals"
> sql:field="NumberOfLocalTechProfessionals" sql:datatype="int" />
> <xs:element name="BranchName" sql:field="BranchName"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> <!--
> <xs:element name="RevenueBreakdown" sql:relation="RevenueBreakdown">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
> sql:datatype="int" />
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="CalendarYear" sql:field="CalendarYear"
> sql:datatype="int" />
> <xs:element name="PercentMS" sql:field="PercentMS"
> sql:datatype="decimal" />
> <xs:element name="PercentNonMS" sql:field="PercentNonMS"
> sql:datatype="decimal" />
> <xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
> sql:datatype="decimal" />
> <xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
> sql:datatype="varchar" />
> <xs:element name="RevenueBreakdownDetail"
> sql:relation="RevenueBreakdownDetail"
> sql:relationship="RevenueBreakdown_RevenueBreakdow nDetail"
> maxOccurs="unbounded">
> <xs:complexType>
> <xs:sequence>
> <xs:element name="BusinessSubsectionID"
> sql:field="BusinessSubsectionID" sql:datatype="int" />
> <xs:element name="AccountID" sql:field="AccountID"
> sql:datatype="nvarchar" />
> <xs:element name="BusinessSectionID" sql:field="BusinessSectionID"
> sql:datatype="int" />
> <xs:element name="CalendarYear" sql:field="CalendarYear"
> sql:datatype="int" />
> <xs:element name="PercentMS" sql:field="PercentMS"
> sql:datatype="decimal" />
> <xs:element name="PercentNonMS" sql:field="PercentNonMS"
> sql:datatype="decimal" />
> <xs:element name="PercentOfTotal" sql:field="PercentOfTotal"
> sql:datatype="decimal" />
> <xs:element name="ChildrenVisible" sql:field="ChildrenVisible"
> sql:datatype="varchar" />
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> -->
> </xs:sequence>
> </xs:complexType>
> </xs:element>
> </xs:schema>
>
>
>
What do you mean, you had to nest it? Where? Under what node?
BizTalk Utilities - Frustration free BizTalk Adapters
http://www.topxml.com/biztalkutilities