我一直在研究这种"高级"模式,感冒了几天,我无法弄清楚为什么它一直告诉我没有找到"网站".我重新阅读了这一章,甚至创建了一个实验的副本(之前有效),我不明白.我正在尝试导入和组合模式,我不知道如何让它正常工作......以下是错误:
Ln 16 Col 84 - cvc-elt.1:找不到元素'sites'的声明.1错误[Xerces-J 2.9.1]验证XML模式"sites.xsd"... Ln 32 Col 49 - src-resolve.4.1:解析组件"sites"时出错.检测到'sites'没有名称空间,但没有目标名称空间的组件不能从模式文档中引用.
如果'sites'意图具有命名空间,则可能需要提供前缀.如果"站点"没有名称空间,则应添加不带"名称空间"属性的"导入"
这是XML和架构:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns:cc="http://example.com/weekendfunsnacks/sites/ns"
targetNamespace="http://example.com/weekendfunsnacks/sites"
xmlns:sm="http://www.sitemaps.org/schemas/sitemap/0.9/ns"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<xs:import namespace="http://www.sitemaps.org/schemas/sitemap/0.9"
schemaLocation="http://www.sitemaps.org/schemas/sitemap/0.9/sitemap.xsd" />
<xs:element name="sites">
<xs:complexType>
<xs:sequence>
<xs:element name="site" maxOccurs="unbounded" minOccurs="0">
<xs:complexType>
<xs:sequence>
<xs:element type="xs:string" name="name"/>
<xs:element type="xs:byte" name="totalPages" />
<xs:element ref="sites" />
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:sequence>
</xs:complexType>
</xs:element>
</xs:schema>?
Run Code Online (Sandbox Code Playgroud) 我仍然很新,SQL并且无法在这里找到答案...我应该写一个SELECT声明,returns 4 columns from 3 tables使用aliases然后将相关名称分配给表...但我得到一个error关于WHERE条款,我不是非常肯定join3个表如何获得我正在寻找的结果.此外,它没有指定JOIN要执行的类型.
这是我的代码:
SELECT VendorName AS [Vendor], InvoiceDate AS [Date], InvoiceNumber AS [Number], AccountItemDescription AS [Description]
FROM Vendors AS v JOIN Invoices AS i
ON v.VendorID = i.InvoiceID
JOIN InvoiceLineItems AS l JOIN GLAccounts AS g
WHERE l.InvoiceLineItems = g.GLAccounts
ORDER BY Vendor, Description;-- Unfinished
Run Code Online (Sandbox Code Playgroud)
得到此错误:
Msg 156,Level 15,State 1,Line 6关键字'WHERE'附近的语法不正确.
任何提示将非常感谢...