- Microsoft SQL Server 2014 Business Intelligence Development Beginner’s Guide
- Reza Rad
- 243字
- 2021-08-13 17:55:23
Time for action – using a Named Query
Sometimes, you need to write queries instead of bringing tables and views as is from the database (assume that we don't have access to the underlying database in order to create views or change the structure of tables there). Named Query is a query that runs on the database and its result will be shown as a table in DSV. In this example, we will use a Named Query to bring the product category and subcategory along with the product table columns, by performing the following steps:
- In the Data Source View designer, right-click on the DimProduct table and under Replace Table, choose With New Named Query.
- In the Create Named Query window, add the ProductCategory and ProductSubCategory tables, and the designer will write joined statements itself.
- After that step, choose EnglishProductCategoryName and EnglishProductSubcategoryName from the columns list.
- Explore data of the DimProduct Named Query and review the result.
What just happened?
In this example, we used a Named Query and a query designer to write customized queries on the database. The query language used is T-SQL because the underlying database is SQL Server. However, it can be different based on the database.
You can also create logical keys for Named Queries or views. You can also create relationships between tables, views, and Named Queries in the DSV. These features in the DSV will provide the ability to develop a powerful base for the cube.
- Java入門經(jīng)典(第6版)
- jQuery EasyUI網(wǎng)站開發(fā)實(shí)戰(zhàn)
- Java深入解析:透析Java本質(zhì)的36個(gè)話題
- QTP自動(dòng)化測試進(jìn)階
- C#程序設(shè)計(jì)基礎(chǔ):教程、實(shí)驗(yàn)、習(xí)題
- 焊接機(jī)器人系統(tǒng)操作、編程與維護(hù)
- Java系統(tǒng)化項(xiàng)目開發(fā)教程
- 編寫高質(zhì)量代碼:改善Objective-C程序的61個(gè)建議
- Kubernetes進(jìn)階實(shí)戰(zhàn)
- C#面向?qū)ο蟪绦蛟O(shè)計(jì)(第2版)
- Java EE 程序設(shè)計(jì)
- VC++ 2008專題應(yīng)用程序開發(fā)實(shí)例精講
- 深度學(xué)習(xí):基于Python語言和TensorFlow平臺(tái)(視頻講解版)
- PHP高性能開發(fā):基礎(chǔ)、框架與項(xiàng)目實(shí)戰(zhàn)
- 中小企業(yè)網(wǎng)站建設(shè)與管理(靜態(tài)篇)