TOP

Data Mine Techniques

http://www.ibm.com/developerworks/library/ba-data-mining-techniques/ba-data-mining-techniques-pdf.pdf

Read More
TOP

Sql Right Join Example

http://www.roseindia.net/sql/sql-right-join.shtm

SQL RIGHT JOIN Syntax

The SQL RIGHT JOIN Syntax display you all the records from the right table, even there are no matches with the left table. The Syntax used for SQL RIGHT OUTER JOIN is given below:

SELECT column_name(s) FROM table_name1 right JOIN table_name2 ON table_name1.column_name=table_name2.column_name

Use Right JOIN in SQL Query

The Example shows you the RIGHT JOIN in SQL Query. In this  Example, we use RIGHT OUTER JOIN, which displays the records from two tables. The table contain return all record from table1,even there are no matches with the table 2.

select s.stu_id, s.stu_name, s.stu_class, l.lib_no from stu_table as s Right JOIN lib_table as l on l.stu_id = s.stu_id

Result

Stu_Id Stu_Name Stu_Class Lib_No
1 Komal 10 101
2 Ajay 10 102
3 Rakesh 10 103
4 Bhanu 10 104
5 Santosh 10 105
NULL NULL NULL 106
NULL NULL NULL 107
Read More
TOP

SQL update join

UPDATE B
SET
B.[LAST_RECRUIT_PRINT_DATE] = A.[LAST_RECRUIT_PRINT_DATE],
B.[LAST_RECRUIT_ONLINE_DATE] = A.[LAST_RECRUIT_ONLINE_DATE]
FROM
[Web_HearstSalesForce].[dbo].[VW_AccountsRecruit_320] A,
[Web_HearstSalesForce].[dbo].[Accounts] B
WHERE A.AccountNumber=B.AccountNumber

Read More
TOP

SQL Server BCP – put quotes around all fields

SELECT
quotename(ISNULL([SRIDNode],”),’”‘),quotename(ISNULL([EmpNo],”),’”‘),quotename(ISNULL([FullName],”),’”‘),
quotename(ISNULL([Level1SalesRepNo],”),’”‘),quotename(ISNULL([Level1EmpNo],”),’”‘),quotename(ISNULL([Level1FullName],”),’”‘),
quotename(ISNULL([Level2SalesRepNo],”),’”‘),quotename(ISNULL([Level2EmpNo],”),’”‘),quotename(ISNULL([Level2FullName],”),’”‘),
quotename(ISNULL([Level3SalesRepNo],”),’”‘),quotename(ISNULL([Level3EmpNo],”),’”‘),quotename(ISNULL([Level3FullName],”),’”‘),
quotename(ISNULL([Level4SalesRepNo],”),’”‘),quotename(ISNULL([Level4EmpNo],”),’”‘),quotename(ISNULL([Level4FullName],”),’”‘),
quotename(ISNULL([Level5SalesRepNo],”),’”‘),quotename(ISNULL([Level5EmpNo],”),’”‘),quotename(ISNULL([Level5FullName],”),’”‘),
quotename(ISNULL([Level6SalesRepNo],”),’”‘),quotename(ISNULL([Level6EmpNo],”),’”‘),quotename(ISNULL([Level6FullName],”),’”‘),
quotename(ISNULL([Level7SalesRepNo],”),’”‘),quotename(ISNULL([Level7EmpNo],”),’”‘),quotename(ISNULL([Level7FullName],”),’”‘),
quotename(ISNULL([Level8SalesRepNo],”),’”‘),quotename(ISNULL([Level8EmpNo],”),’”‘),quotename(ISNULL([Level8FullName],”),’”‘),
quotename(ISNULL([Level9SalesRepNo],”),’”‘),quotename(ISNULL([Level9EmpNo],”),’”‘),quotename(ISNULL([Level9FullName],”),’”‘),
quotename(ISNULL([Level10SalesRepNo],”),’”‘),quotename(ISNULL([Level10EmpNo],”),’”‘),
quotename(ISNULL([TCode],”),’”‘),quotename(ISNULL([BizTeam],”),’”‘),quotename(ISNULL([Title],”),’”‘),quotename(ISNULL([SalesGrp],”),’”‘)
FROM [salesreps].[dbo].[SalesOrgHouWithGrp]

Read More
TOP

SQL insert select

/* Add new record — new salerep */

INSERT INTO [salesreps].[dbo].[salesreps]
(sales_no,empno,supervisor,
supervisorext,deptno,bonusteam,
admarcteam,title,LName,FName,
wkphone,hmphone,pager,mobile,
fax,hmaddress,city,state,zip,sls_mgr,
app_mgr,dept_mgr,dept_director,cls_director,
adv_vp,office,uid,comments,submitdate)
SELECT
sales_no,empno,supervisor,
supervisorext,deptno,bonusteam,
admarcteam,title,LName,FName,
wkphone,hmphone,pager,mobile,fax,
hmaddress,city,state,zip,sls_mgr,
app_mgr,dept_mgr,dept_director,
cls_director,adv_vp,office,uid,
comments,submitdate
FROM
[salesreps].[dbo].[salesreps_1]
WHERE sales_no IN
(
SELECT A.sales_no as salesno
FROM [salesreps].[dbo].[salesreps_1] A
left outer join
[salesreps].[dbo].[salesreps] B
on A.sales_no=B.sales_no
where B.sales_no is null
)

Read More
TOP

SQL split fullname

Example: #1

SELECT fullname ,reverse (substring(reverse(fullname),1,charindex(‘ ‘, reverse(fullname)))) as LName, substring(fullname,1,charindex(‘ ‘, fullname)) as FName
FROM [salesreps].[dbo].[salesreps_1]

Example: #2

SELECT fullname ,substring(fullname,charindex(‘ ‘, fullname), LEN(fullname)) as LName,
substring(fullname,1,charindex(‘ ‘, fullname)) as FName
FROM [salesreps].[dbo].[salesreps_1]

Read More
TOP

SQLCMD Examples

SQLCMD – Examples
sqlcmd Switches
-S >> ServerName
-D >> DatabaseName
-U >> UserName
-P >> Password
-Q >> Query
-o >> OuputFile

sqlcmd -SSQL2005_FIRST -Ucalyan -Pcalyan
-dDatabaseName -Q”select * from sampledata”

sqlcmd -SSQL2005_FIRST -Ucalyan -Pcalyan
-dDatabaseName -Q”select * from sampledata” -o”c:\sampledata.txt”

sqlcmd -SSQL2005_FIRST -Ucalyan -Pcalyan
-dDatabaseName -Q”EXEC MYPROC1″

sqlcmd -SHOME-CB\SQL2005_FIRST -Ucalyan -Pcalyan
-dDatabaseName -Q”exec msdb.dbo.sp_start_job @job_name = ‘TestJob’”

Read More
TOP

Data Integration — Open Source

http://apatar.com/

Read More
TOP

Software Development Document

1. Acquisition Plan
2. Availability Plan
3. Bill of Materials Template
4. Capacity Plan
5. Change Management Plan
6. Concept Proposal
7. Configuration Management Plan
8. Conversion Plan
9. Concept of Operations
10. Cost Benefit Analysis
11. Database Design Document
12. Deployment Plan
13. Design Document
14. Feasibility Study
15. Functional Requirements
16. Installation Plan
17. Interface Control Document
18. Maintenance Plan
19. Needs Statement
20. Operations Guide
21. Risk Management Plan
22. Setup Guide
23. Statement of Work
24. Software Requirements Specification
25. System Boundary Document
26. System Design
27. System Specifications
28. Security Plan
29. Transition Plan
30. Verification Plan

Read More
TOP

No-Sql Resource

Read More

Switch to our mobile site