Monday November 20th 2017

Categories

Insider

Archives

‘Sql Server 2005’ Archives

Examples Use string concatenation

Examples Use string concatenation

Recently I was trying to import datafeeds into the wordpress blog. images on the post and links needs some html tags. I used SQL language string concatenation operator to fill up the missing tags as follows; select  , '<img src="' + '' +IMAGEURL + '"' + ' Detail: ' + + ', '+ 'Price in USD:'+ ', '+ cast(PRICE as CHAR)+ ', '+ '<a href="' + [...]

Data integrity example

Data integrity example

An example of a data integrity mechanism is the parent and child relationship of related records. If a parent record owns one or more related child records all of the referential integrity processes are handled by the database itself, which automatically insures the accuracy and integrity of the data so that no child record can exist without a [...]

Rules and Check constraint

Rules and Check constraint

Rules are a backward-compatibility feature that perform some of the same functions as CHECK constraints. CHECK constraints are the preferred, standard way to restrict the values in a column. CHECK constraints are also more concise than rules; there can only be one rule applied to a column, but multiple CHECK constraints can be applied. CHECK [...]

Temp table a useful tool in many reports

Temp table a useful tool in many reports

Reporting the payments received against shipment’s C&F value. In this example our client was facing an  issue where shipments are made  and C&F value amount is taken as Accounts Receivable, payments are received in 2 to 3  installments.  Management wants to know how much is outstanding against each shipment C&F Invoice. In [...]

Practicality of Floor function in SQL Server

We are writing this post to share our experience of usefulness of Floor function. We use the floor function in calculating product manufactured and raw material wastage in the process. The problem was to calculate how many units of a product can be manufactured from certain weight of a raw material. We were getting answer like 8.67 products [...]

Correlated subquery

Correlated subquery (also known as a repeating subquery) is a subquery where selection criterion of inner query refers to values in the outer query. One of the restriction is that inner query cannot return more than one row matching the outer row; Example; USE pubs SELECT au_lname, au_fname FROM authors WHERE 100 IN (SELECT royaltyper [...]

Data Mart case study

Data Mart case study

This post is about a case study of ASB Bank, a wholly owned subsidiary of Commonwealth Bank of Australia (CBA). ASB built a Basel II risk management data mart on Microsoft® SQL Server™ 2005 Enterprise Edition. Using the new features and technologies in SQL Server 2005, the bank was able to meet the requirements in less than nine months, ensure [...]

Data Scrubbing / Cleansing

Data Scrubbing / Cleansing

Data scrubbing also called data cleansing, is the process of amending or removing incorrect data in a database. Sometimes data incomplete, improperly formatted like postal code should be in this format "N9B 1W7" not in “N9B1W7"or first name and last name in 1 field, instead separate fields or duplicated. Sometimes zip codes are missing or in [...]

Data Architect – Overview

Data Architect – Overview

Many times in the job descrition a title Data Architect is used. According to DAMA (Data Management Association) , Data Architect is often interchangeable with, but includes enterprise architecture considerations. A DAMA recognized Certified Data Management Professional would have a wide range of such skills. Translating this to Data [...]

Using Derived tables

In Sql language this is very common to use views instead of tables directly, for example we can create view; View_MarketingEmployees ;  CREATE VIEW View_MarketingEmployees AS   SELECT * FROM Employee   WHERE department = "marketing"  GO Then If we wanted to see all of the Employees from Marketing with the First name John, ordered [...]

 Page 1 of 2  1  2 »