doraprojects.net

The DISTINCT clause in agregate functions in T-SQL

The DISTINCT clause is used to return only distinct (different) values. It is use often with SELECT statement. But it is not ... the same data are counting only one time. The David firstname has 4 people so data with this name is counting only one time.

Create database model in DBDesigner

After install DBDesigner( I describe this process in my last post) You may run this application. You see window as below:Clo ... lation and choose from menu Edit Object. You see Relation Editor window. In Relation Editor change data. Click the OK button.

ORDER BY clause – when may use and when don’t may use alias of column in SQL Server 2012

It is two situation in SQL Server 2012 when You may or don’t use alias of column in ORDER BY  clause . First example  presen ... HEN FirstName ELSE LastName END So in CASE expression even using in ORDER BY clause, You may not use alias of column.

UNIQUE clause and NULL in SQL Server 2012

In this topic You find out how work UNIQUE constraint for column with or without NOT NULL constraint. Begin with  creating i ... one NULL value. If You would like to constraints this field for NOT NULL, You may add NOT NULL to column with UNIQUE clause.

Creating new login in SQL Server througth T-SQL script

In my last post I show You how create login in server, in this I present how do it througth T-SQL query. First go to Securit ... in' ; In Login Properties window You see new role: Try connect another time to the server. Now You see data in all databases.

Deployment and testing Java Web Start application on web server

My last post was about deployment and testing Java Web Start application locally. In this post I describe how deploy it on w ... dress is: http://doraprojects.net/test/test.jnlp If you see warning window click the Run button.   Then application appear.

How attach or detach database in SQL Server Management Studio?

Sometime we don’t want to show database in Databases node in SQL Server Management Studio, because we needn’t  to change some ... ILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_log.ldf') FOR ATTACH GO  

What is faster in inserting data into database: PreparedStatement using batch or standard PreparedStatement in Java application?

What is better to use  PreparedStatement with batch or without batch.  I test both ways to connect by JDBC to database and ge ... this test better findings achives PreparedStatement object using batch script. Difference between them is 7 254 miliseconds.

The CASE expression in SELECT statement in SQL Server 2012

The CASE expression is used in SELECT, UPDATE, DELETE statement and in WHERE, IN, ORDER BY and HAVING clause. The CASE expres ... ] WHERE [Title] is NOT NULL AND [LastName] LIKE 'Va%'; The next post will be about use CASE expression in other statements.

The LEAD and LAG functions in SQL Server 2012

The LEAD function provides value from the next row in result of query. The LAG function provides value from the previous row ... BY p.name ORDER BY s.value) as prev, p.name, s.year, s.value FROM person p JOIN salary s on s.id_person_fk = p.id ;

The OFFSET-FETCH filter in T-SQL

The OFFSET-FETCH clause is filter using to choose sorted limited data from result set. It is similar to TOP clause, but with ... SELECT FirstName, LastName, ModifiedDate FROM Person.Person ORDER BY (SELECT NULL) OFFSET 5 ROWS FETCH NEXT 10 ROWS ONLY;

TOP clause in T-SQL

Using TOP in T-SQL select given number of rows. It limits the rows returned in a query result set. Let begin with TOP clause ... be use only in SELECT statement and with ORDER BY clause. The TOP is used in SELECT, INSERT, UPDATE, DELETE, MERGE statement.

How get date and time parts in SQL Server 2012?

For get date and time parts in SQL Server 2012 are functions. Step by step I describe several of them. The first function is ... SELECT DATENAME( yyyy, SYSDATETIME() ), DATEPART( yy, SYSDATETIME() ); In most cases the return values will be the same.

How add sample AdventureWorks2012 database for SQL Server 2012?

Go the http://msftdbprodsamples.codeplex.com/ website and click on icon with SQL Server 2012 DW. You see list of links. Choo ... f is removed so You may click the OK button. In Object Explorer window You see in Databases node AdventureWorks2012 database.

Signing java web start application by generated key – keytool

In this place I describe you how generate key and signing its your jar application as java web start program.  So first we g ... va web start launcher. In Security Warning window select I accept box and click Run button. The application was running.    

25

My proposition about IDE for C++ is Code::Blocks application. In these screen I show You how install it. First You must go to ... ) button. After this the IDE will be open. You must close installation window.   Last step is clicking the Finish button.

What is faster: LinkedList or ArrayList?

In this post I test speed adding and getting elements to and from list. I create MyList project in Netbeans IDE. In main cla ... he a lot of elements and getting these elements – apply ArrayList, if adding or remove elements from list – apply LinkedList.

Creating administrator login for SQL Server 2012

In this topic step by step I show You how create system administrator login through SQL Server Management Studio. Connect to ... ect button. As You expand Databases node You see all databases in server. New creating login is system administrator login.  

Logging in Java application – Logger and FileHandler objects

How create application with logging on the server? What to do it in order to file contains date and time in its name? Today ... and find logs files. Open one of these. Your application logging creating files with information of name with date and time.

SQL Server – GO command

GO is the command SQL Server, that inform server to send all T-SQL statements before GO to an instance SQL Server as one batc ... able test_tab ( id int primary key identity, ); GO insert into test_tab DEFAULT VALUES; GO 10 select * from test_tab Result: