ISQLQuery is an interface in NHibernate. When using this tag please use NHibernate tag as well.
Questions tagged [isqlquery]
43 questions
6
votes
2 answers
How can I make SQLite return a proper DateTime when doing ISQLQuery.UniqueResult()?
TLDR:
The following code is run in the different databases, Oracle: select sysdate from dual SQLite select datetime('now')
When doing Session.CreateSQLQuery(cmd).UniqueResult() the result is a DateTime when working against Oracle but a…

Fredrik C
- 570
- 6
- 22
5
votes
1 answer
Oracle SQL compare strings containing numbers, starting with 0 (zero)
I have a Date column, which is actually not in a date format.
The date looks like: 25/10/2012.
Now I have to compare 2 dates, but I cant find a pattern to do this, as the format is wrong.
What I have tried is:
SELECT *
from PARAMETER
where…

Slim
- 1,708
- 5
- 37
- 60
4
votes
2 answers
Query to get only one row from multiple rows having same values
I have a notification table as follows
|id|user_receiver|user_sender|post_id|action|date|is_read
here user_sender is the person who generated notification, user_receiver is one who got the notification, post_id is id of post, action can be like,…

vikas devde
- 11,691
- 10
- 35
- 42
2
votes
1 answer
SQL server query for time zone
Is there any way to get the current time for particular given time zone?
For EX: GetDateTime("Morocco Standard Time")
It should give the local time of time zone "Morocco Standard Time"
Thanks in Advance,
Merlin

Merin
- 41
- 1
- 5
2
votes
2 answers
NHibernate ISQLQuery with byte[] parameter throws error
So, I am trying to use nhibernate to call a stored procedure that saves an image. My problem is that the query fails with this error:
The length of the byte[] value exceeds the length configured in the mapping/parameter.
Here is where I attach my…

Josh
- 16,286
- 25
- 113
- 158
2
votes
1 answer
Pass DateTime2 parameter value using ISqlQuery
I am using the ISqlQuery interface of Nhibernate to fire a SQL query on database. Following is the scenario. My Domain Model has a property:
public virtual Datetime StartTime { get; set; }
The database has a column StartTime of type DateTime2.
I…

Niraj
- 376
- 4
- 14
1
vote
1 answer
SQL SUM function
I tried the following query but it doesn't give the answer that I need
SELECT fname, SUM(salary) FROM employee
I need to have the all the fname records and the Sum value as the next column.
What I get from this query is only the first fname Record…

JibW
- 4,538
- 17
- 66
- 101
1
vote
3 answers
How to create a SQL query for the following operation?
I hope you will be able to help me out. I just started learning SQL and while applying my knowledge at work, I got stuck.I have SQL Database with multiple tables, which contain various data for properties of the items offered for sale. So far I…

Aman Khan
- 25
- 4
1
vote
1 answer
Ignore parameters when using ISQLQuery in NHibernate
I have to execute a native sql statement with NHibernate to the database.
For this, i use:
var query = session.CreateSQLQuery(sql);
query.ExecuteUpdate();
Now, the sql contains the character : in a Column-Alias (which I need on this way) and…

BennoDual
- 5,865
- 15
- 67
- 153
1
vote
2 answers
Android : How to append String after SQLite Funciton?
I have a small problem. Can anyone please tell me how to append String value after SQLite function in Insert Statement. Code line is below :
myDataBase.execSQL("INSERT INTO network_data (DateTime, Signal, GPSLat, GPSLong, NetLat, NetLong) VALUES…

Vipul Purohit
- 9,807
- 6
- 53
- 76
0
votes
2 answers
How to execute an SQL statement stored in a shell script variable using isql
So, I am trying to execute an SQL statement stored in a shell script variable using isql
Generic code attached.
SQL="select * from Student"
EMPLOYEES=`isql -U $USERNAME -P $PASSWORD -D $DATABASE -S $SERVER<

Rishabh
- 61
- 1
- 1
- 6
0
votes
1 answer
Azure devOps build pipeline: Force fail yaml step.bash in case of isql issue
In my build yaml pipeline, I have a step.bash to connect to isql and run a select query. I have a requirement to fail/exit the step in case of any issue in isql and retry 2nd time.
However, Azure devops is marking step.bash as success and skipping…

John_D
- 31
- 1
- 4
0
votes
2 answers
Inserting missing date into non nullable Datetime field
Here we have an existing database and I'm building a new system with a new database.
There I need to transfer some data from the old database table to the new database table.
I wrote this query in the SQL
INSERT INTO [Mondo-UAT].[dbo].[Countries] (
…

Dev Beginner
- 589
- 1
- 11
0
votes
1 answer
How to make pivot in SQL?
How to reach the second table from the first using SQL Query?
1st Table:
Date
CurrencyID
Rate
2022/01/01
1
1000
2022/01/01
2
2000
2022/01/02
1
1000
2022/01/02
2
2000
2022/01/03
1
1000
2022/01/03
2
2000
2nd…

Shahab Abdollahzadeh
- 37
- 4
0
votes
1 answer
I want to calculate machine mode time range from this table. How can I write a SQL query for this situation?
enter image description here
I could not add image

Semih ATİLLA
- 23
- 3