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

How can i found only the less count values Name Must want 3 groupName also

IN SQL (adventureWorks) Database... I/P : ALTER PROCEDURE spLessDep AS BEGIN SELECT COUNT(Name) AS COUNT,max(GroupName) FROM HumanResources.Department WHERE GroupName <(SELECT MAX(GroupName) FROM HumanResources.Department) GROUP BY GroupName ORDER…
BALAJI N
  • 5
  • 2
-1
votes
2 answers

Need help to simplify this T-SQL query

I have this working T-SQL query, is there any way to simplify it? The SELECT COUNT(*) FROM Tablename is repeating and only the condition is different for each query, so is there a way to simplify this more? thank you SELECT COUNT(*) FROM Table…
-1
votes
1 answer

DBVisualizer is only showing Schemas, but not showing tables, and not letting me see data

For some reason, when I started DBVisualizer this time, it stopped showing me tables and data. It only shows me Schemas. I have checked using the host's online portal and the tables/data is all still there. Any ideas why DBVis stopped letting me…
CodyBugstein
  • 21,984
  • 61
  • 207
  • 363
-1
votes
2 answers

I can't find the number data with SQL Server like

The data is registered in the database with the number 5056381825. But when I like this number with 905056381825, a blank result is returned. What's the solution?
-1
votes
1 answer

Can't connect to database using JDBC (Communications link failure) despite being able to connect by other means

I am running MSSQL on docker using port 1433: And am able to connect to it and make queries using a simple tool I downloaded from the internet (SQLDbx): However when I try to connect using JDBC by this code: public static void main(String[]…
Ramy670
  • 51
  • 10
-1
votes
1 answer

dateChooser set todays date

I want to set the todays/actual date in datechooser field automatically. I've looked a couple of Stackoverflow topics about this and couldnt find a way to complete this. I dont want to output the date with system.out.println(); but I just want to…
Jay Dee
  • 127
  • 1
  • 2
  • 10
-1
votes
1 answer

SQL SUM values in declared column into total and group by id

Hello people of the internet. Once again I seek your advice. I have multiple meter readers collecting power consumption every 5 minutes and storing to MS SQL Database. I execute SQL query to get a days worth of data from all meter readers and check…
SaulPalta
  • 46
  • 8
-1
votes
2 answers

is it safe to use java.text.MessageFormat.format() when creating an sql query?

I am using MessageFormat.format() to create the String for my PreparedStatement. I read that using StringBuilder may be a cause of sql injection. Is it the same for MessageFormat? the code goes like this String SQL = "select…
-1
votes
1 answer

Combining DATE AND TIME

I need to take a DATETIME column (Column A) that contains only a date, then add a VARCHAR(5) column (Column B) which contains a 24-hour representation of a time (i.e. 13:30) and combine them to get a valid DATETIME to be used in a DATEDIFF…
JOhn
  • 1
  • 2
-1
votes
1 answer

Save multiple Select statements to a file (.txt, .csv) in SQL Server

How can we export or save multiple select statements in SQL Server? As for example, if we have 3-4 select statements, how can we export or print them to a single .txt or .csv file? In mysql we have select * from person INTO OUTFILE…
N Borah
  • 1
  • 4
-1
votes
2 answers

how to seperate date and time in mssql table in to two columns

i have view having a date column that includes both date and time ,i want seperate that columns in to date and time columns I tried the getdate function its not working , here is my example sql table data title description date sample this…
vyshnavi
  • 167
  • 1
  • 3
  • 16
-1
votes
1 answer

How to call a MSSQL stored procedure from java

I am trying to call a stored procedure from java and I'm having some issues getting the call to go through correctly. I've looked up numerous examples, but they don't match the syntax of the stored procedure I'm trying to call. STORED PROCEDURE…
John Cressman
  • 63
  • 1
  • 7
-1
votes
1 answer

how to implement sql server connection pooling in java jdbc?

I tried to search for this but it seems the answer might now be true anymore. How can do connection pooling in java with sql server? I found the new jdbc driver of microsoft but there's no sample code to show to use it.
My Intek
  • 85
  • 1
  • 2
  • 5
-1
votes
2 answers

how to order by date and by group mysql database?

I would like to know how to regroup the results from mysql queries according to date by grouping. Table Name = Visit_History
Ashi
  • 1
-1
votes
1 answer

SonarQube - SQL Server : get users and groups associated with Project in SonarQube from backend database

I need to find the list of users and group associated with project in SonarQube. I try to find tables user_roles and group_roles that have a column resource_id. This can be used to get corresponding kee value in table resource_index. This kee value…
Sanjoy Roy
  • 31
  • 1
  • 1
  • 5