Questions tagged [mssql-jdbc]

For specific questions on Microsoft's JDBC driver for their SQL Server product.

For specific questions on Microsoft's JDBC driver for their SQL Server product.

Microsoft JDBC Driver for SQL Server

Related tags:

603 questions
-1
votes
1 answer

Minimum set of permissions required for SQL Server database?

I am writing a program in java in which i have to validate whether the user has all the minimum permissions required for creating, altering and deleting a table, procedure. By default, my SQL Server database has following set of privileges: CREATE…
mahan07
  • 887
  • 4
  • 14
  • 32
-1
votes
1 answer

Group data on weekly (Sunday - Saturday) basis

I am stuck with following problem. How can I group following data in the way that it will sum up count on weekly basis. +---------------------+-----+ | data |count| +---------------------+-----+ | 2012-08-01 00:00:00…
chinnusaccount
  • 239
  • 6
  • 20
-1
votes
3 answers

Selecting rows based on a SQL Server "bit" column

In a SQL Server table, I have a BIT column and based its value, I need to update that table's other columns with some values. I tried this UPDATE tablename SET Completed = GETDATE() WHERE CheckTaskAvailable = TRUE but I get the error Msg 207, Level…
Tarun
  • 25
  • 1
  • 6
-1
votes
2 answers

Java sql Data pulling in the columnName but not the data

On this java method I am trying to get data from a ms-sql server. I am trying to get the int value from a column , Now the columns I am using are all int's but for some reason when i try pulling it as a INT I am getting a number format error saying…
Gilbert V
  • 1,050
  • 5
  • 16
  • 43
-1
votes
1 answer

"ms sql" means microsoft SQL Server or MS Access

In netbeans, during new database connection for "ms-sql", I…
-1
votes
1 answer

insert into table using MS sql rocedure and return status message fails in mssql 2008 r2. returns exception procedure is a table valued function

I have the below procedure in sql server 2008 R2 MSSQL procedure /****** Object: UserDefinedFunction [dbo].[test_fn_transaction_search] Script Date: 01/30/2015 11:57:44 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO alter PROCEDURE…
DJR
  • 89
  • 2
  • 3
  • 7
-1
votes
1 answer

PreparedStatement Value Error in java

The fallowing code is giving "Incorrect syntax near the keyword 'VALUES'." I can not find the problem with my SQL statement. /* * Table Structure for HistoryData Table in SQL Server * 1) City_ID - int …
igalbenardete
  • 207
  • 2
  • 12
-2
votes
1 answer

How to store password in # format in SQL Server Management Studio for my ASP.NET web project

I have an ASP.NET web project with web form. for my log in, I need to store user password in hashed format. And also retrieve the password when logging in. My table has columns username varchar(50) Primary key, mobile varchar(50), pass…
-2
votes
1 answer

Dynamic where condition in SQL Server stored procedure

This is my SQL Server stored procedure CREATE PROC test_sp @id int, @ipVal varchar(20) = null, @browserName varchar(20) = null as begin select * from users where id=@id order by id desc; end I want to change my where condition in this…
Sesuraj
  • 7
  • 1
  • 8
-2
votes
1 answer

Select top 5 across 2 databases very slow

I have to select top 5 rows in another two databases and sort each databases columns. This is my code. SELECT TOP 5 DK.dbo.TIME.TIME_STRT, DB1.dbo.DATA.PLC_11 FROM DK.dbo.TIME, DB1.dbo.DATA ORDER BY TIME_STRT DESC, PLC_11 desc; It has been running…
Minsung Choi
  • 39
  • 1
  • 7
-2
votes
1 answer

How can i fix "Bean Error" in spring-boot?

I`v got bean error... this is error code: Related cause: org.springframework.beans.factory.UnsatisfiedDependencyException: Error creating bean with name 'testMapper' defined in file…
beatbear
  • 1
  • 2
-2
votes
4 answers

Sql - SQL Error [156] [S1000]: Incorrect syntax near the keyword 'as'

Below is my query - DELETE FROM activity_details as ad, edit_details as ed LEFT JOIN edit_details as ed ON ed.details_id = ad.row_id WHERE year(ad.activity_datetime) = year(GETDATE())-10 I am getting error SQL Error [156] [S1000]: Incorrect syntax…
shreya
  • 95
  • 3
  • 11
-2
votes
1 answer

how to set classpath for java mssql connectivity

i am writing code for java mssql connectivity in notepad++ i am not using any ide. can anybody give me code. how to set classpath? jtde or jdbc driver i need code for both driver Thanks in advance
Aavik_Kumar
  • 41
  • 1
  • 1
  • 7
-3
votes
1 answer

Need YTD and MTD calculations in SQL

Date Amt ytd mtd 01-Jan-21 1 2 2 01-Jan-21 1 2 2 02-Jan-21 1 3 3 03-Jan-21 1 4 4 01-Feb-21 1 5 1 02-Feb-21 1 6 2 03-Feb-21 1 7 3 04-Feb-21 1 8 4 05-Feb-21 1 9 5 01-Mar-21 1 10 …
-4
votes
1 answer

Can anyone tell the query for the below scenario

Input: Col1 Col2 DBA Stored Procedure DBA Functions DBA Triggers Output: Col1 Col2 DBA Stored Procedure, Functions, Triggers
HARISH VM
  • 1
  • 3
1 2 3
40
41