Showing posts with label including. Show all posts
Showing posts with label including. Show all posts

Monday, March 19, 2012

Access

I have an Access file with many tables and each table has got many constraints.I want to remove each and every constraints(including primary key,foreign relationship) for every table.How can I do it first?Delete the file

Thursday, March 8, 2012

about WITH XMLNAMESPACES

Hello experts!
I'm using a table including one column declared as xml-datatype.
This table holds instances of xml-documents, that use one of two schemas.
Let's call them schema1 and schema2, where schema1 is Version 1 of the
schema, and schema2 the extended Version 2.
Version 2 holds everything of Version 1 in the same structure, but allowes
some more fields.
The table has the following fields:
keyfield
schemaversion
xmldata
I now want to create a view, where the customer could easily access the data
inside the xml.
My idea was a view like
WITH XMLNAMESPACES(DEFAULT 'xmlns1')
SELECT ...
FROM ...
WHERE schemaversion = 1
UNION
WITH XMLNAMESPACES(DEFAULT 'xmlns2')
SELECT ...
FROM ...
WHERE schemaversion = 2
But the second WITH-statement seems to be unsupported.
Has anyone of you an idea, how i could access based on both schemas?
Thanks very much!
Maxok, i found some kind of workaround.
i created two views on the table, on using the namespace of schema1 and the
other of schema2.
every view includes a where clause on the data to only process the rows it
has to.
finally i created a third view which creates a union of the other two views
and which is the "interface" to the customer.
hmm, at the moment, as i do not have very much data to test on, the speed
seems to be satisfying, but i wonder how this will change if i get more and
more data.
so, if anyone of you has another idea, please share it!
thanks!
max
"Markus Emayr" <essmayr/at/racon-linz.at> schrieb im Newsbeitrag
news:uqwa2qrHHHA.1248@.TK2MSFTNGP03.phx.gbl...
> Hello experts!
> I'm using a table including one column declared as xml-datatype.
> This table holds instances of xml-documents, that use one of two schemas.
> Let's call them schema1 and schema2, where schema1 is Version 1 of the
> schema, and schema2 the extended Version 2.
> Version 2 holds everything of Version 1 in the same structure, but allowes
> some more fields.
> The table has the following fields:
> keyfield
> schemaversion
> xmldata
> I now want to create a view, where the customer could easily access the
> data inside the xml.
> My idea was a view like
> WITH XMLNAMESPACES(DEFAULT 'xmlns1')
> SELECT ...
> FROM ...
> WHERE schemaversion = 1
> UNION
> WITH XMLNAMESPACES(DEFAULT 'xmlns2')
> SELECT ...
> FROM ...
> WHERE schemaversion = 2
> But the second WITH-statement seems to be unsupported.
> Has anyone of you an idea, how i could access based on both schemas?
> Thanks very much!
> Max
>|||Why not use a prefix for each and declare it in a single with statement:
WITH XMLNAMESPACES('xmlns1' as "s1", 'xmlns2' as "s2")
SELECT ...
FROM ...
WHERE schemaversion = 1
UNION
SELECT ...
FROM ...
WHERE schemaversion = 2
Best regards
Michael
"Markus Emayr" <essmayr/at/racon-linz.at> wrote in message
news:uqwa2qrHHHA.1248@.TK2MSFTNGP03.phx.gbl...
> Hello experts!
> I'm using a table including one column declared as xml-datatype.
> This table holds instances of xml-documents, that use one of two schemas.
> Let's call them schema1 and schema2, where schema1 is Version 1 of the
> schema, and schema2 the extended Version 2.
> Version 2 holds everything of Version 1 in the same structure, but allowes
> some more fields.
> The table has the following fields:
> keyfield
> schemaversion
> xmldata
> I now want to create a view, where the customer could easily access the
> data inside the xml.
> My idea was a view like
> WITH XMLNAMESPACES(DEFAULT 'xmlns1')
> SELECT ...
> FROM ...
> WHERE schemaversion = 1
> UNION
> WITH XMLNAMESPACES(DEFAULT 'xmlns2')
> SELECT ...
> FROM ...
> WHERE schemaversion = 2
> But the second WITH-statement seems to be unsupported.
> Has anyone of you an idea, how i could access based on both schemas?
> Thanks very much!
> Max
>

Tuesday, March 6, 2012

About Wait Type

SQL Server 2k Enterprise sp3
Windows 2k Server
XeonX2*2 2GMhz2G RAMRAID5
After excuting 'dbcc sqlperf(WAITSTATS)',The WaitType,including
RESOURCE_QUEUELATCH_EXCXPACKETPAGE
IOLATCH_SH, often appears .
But CPU's Usage is less than 60% and RAM has 90M free.
http://sqldev.net/misc/waittypes.htm did not tell me how to optimizing SQL
server performance .
I don't know whether I should add the CPU ,or the RAM, or anything else.
I want the SQL Server to do its best.
ThanksAre you experiencing any kind of problems on your sql server that may need
more memory?
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.