How to receive multiple scalar valuesin Hibernate

As I try to retrieve values Using Hibernate(a single table) It is repeating the same value multiple times. I want to try using retrun type as scalar values so I can retrieve the two columns I need(Ex val1, val2) and receive them in the dao class. How can I receive multiple scalar values, is something I am not aware of.

DAO Class
DAO class was receiving the list of Acct objects. But this is returning the same value multiple times. So I wanted to return sclar values of Acct.siteSid and Acct.acctNum and receive the list of those two values. I also want to know how it would be even if it is not a list (Just these two values are to be returned). Thanks in advance.
Query query = session.getNamedQuery("com.temp.entity.Acct.validateAccount");
query.setString("acctnum", acct);
query.setString("siteID", siteID);
accountList= query.list();

for Oracle RDBMS] in your query to concatenate the columns. Then return just one scalar value as string. In your Java Code where you receive the list, you can iterate over the list and split on the delimiter (say a comma).

Featured Post

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Introduction
This article is the second of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers the basic installation and configuration of the test automation tools used by…

Introduction
This article is the last of three articles that explain why and how the Experts Exchange QA Team does test automation for our web site. This article covers our test design approach and then goes through a simple test case example, how …