Questions tagged [native-sql]
77 questions
0
votes
1 answer
How NHibernate cache native queries?
I have native sql query using in global NHibernate common session like
string sql = @"update Accounts
set vchBranch = :branch,
bitIsActive = :isActive,
bitIsVisible = :isVisible
where bintId =…

Another Mi
- 12
- 2
0
votes
1 answer
How to Join with Native SQL Query and doctrine
I'm developping an application with symfony 3.4. I want to execute a specific query. So i have two entities: the first is PrPurchaseRequest. the second is PrSpecificFieldValue. PrPurchaseRequest has oneToMany prSpecificFieldValues.
I want to get id…

walidtlili
- 840
- 2
- 13
- 36
0
votes
1 answer
Spring Data Native query pagination not working
I am using Spring Boot 2.0.2.RELEASE with Spring Data JPA. I am trying to do implement pagination with native query in MySql, my code is :
@Query(nativeQuery=true, value = "SELECT DISTINCT ud.latitude,ud.longitude,u.user_id userId FROM users u \n"…

SudeepShakya
- 571
- 3
- 14
- 34
0
votes
1 answer
Dynamic Query in Oracle
I am trying the below dynamic query where I get the column names , table names from one query and I need those values in a variable which I will make it as a global variable.
The column names can change ranging from 5 to 50 columns.
I wrote the…

vakul
- 157
- 3
- 17
0
votes
1 answer
How to extract more than one field value from native query in hibernate?
In the Hibernate, the former programmer implemented native query like this.
query = "select id from employee";
Query query = session.createSQLQuery(queryString).addScalar(scalarName, StringType.INSTANCE);
return query.list();
However, I would like…

Anna Lee
- 909
- 1
- 17
- 37
0
votes
1 answer
2 Generated SQL/MDX queries under a SQL query in IBM Cognos
I have a report where a query named "Query1" is created using the default data items present in the package. When I look into the Tools ---> Show Generated SQL/MDX, IBM Cognos shows 2 generated Native SQL queries for the query named "Query1". How…

user3215886
- 1
- 1
0
votes
2 answers
Hibernate - How to write criteria or sql or hql query for combined properties?
I've stored the full name of the individual as firstName, middleName & lastName differently on the datastore.
The user enters the full name to search the individual.
The problem is I want to search firstName, middleName & lastName combinedly.
And, I…

Aviskar Basnet
- 23
- 4
0
votes
2 answers
How to Filter Out All column = null Rows Past the Last column != null Row, by an Offset, in the Result of a SQL Query
I have an SQL table that looks like this:
Flow Head Series_Name
0 null A
0 null B
10 null A
10 null …

MarkieMoose
- 17
- 1
- 6
0
votes
1 answer
speed of SQL queries with variables
I am new to SQL and trying to query a large database so speed is an issue. I have been using a query (with line 1) of the form shown below which has been working fine, but when I modify it (to switch line 1 for line 2) to use a constant to make a…

LizE
- 1
0
votes
2 answers
How to manage 2 DAO methods in a single transaction?
I need to manage 2 Dao methods in a single transaction ,failure of either of them should rollback the other. The calling method is in the service layer. The technology used in Spring and Hibernate native sql query. Is there a way to achieve…

Shivayan
- 136
- 1
- 2
- 13
0
votes
3 answers
How to write join query in native SQL of Hibernate?
List list=new ArrayList();
List list1=new ArrayList();
public String execute(){
Configuration cfg=new Configuration();
cfg.configure();
SessionFactory…
0
votes
2 answers
Native SQL Program and ALV Layout
I created a program using from tCode = SE38
I am using Native SQL.
Here is my code:
DATA: BEGIN OF GetData OCCURS 0,
AUFNR Type COAS-AUFNR,
AUART Type COAS-AUART,
END OF GetData.
EXEC SQL PERFORMING loop_output.
SELECT…

Ramzy Nashaat
- 11
- 3
0
votes
2 answers
How to map native SQL query result to a list of custom value types in NHibernate?
I have a value type called FiscalYear which essentially is a wrapper for an integer. I have also implemented the NHibernate.UserTypes.IUserType for it. Now I can map properties of type FiscalYear directly to SQL Types and NHibernate will convert…

proskor
- 1,382
- 9
- 21
0
votes
1 answer
nhibernate native sql get aggregate value
I need to execute native sqn on nhibernate and get sum from complex query needed for reporting. The sql query returns only one float value for a sum.
float theSum= session.CreateSQLQuery(@"select sum(myfield) myfield from ....")
…

darpet
- 3,073
- 3
- 33
- 40
-1
votes
1 answer
Horizontal Rows as Vertical Columns in SQL Server
I have this requirement where I need to present horizontal rows as vertical columns in SQL Server native query.
For example, my select query returns 100 records for the select query using inner join.
select XX, XX etc FROM TAB1 con inner join TAB2…

ASChakkalakal
- 459
- 2
- 8
- 18