Tag: database

SQL removing duplicates in a certain column

Good afternoon all! Had a question regarding the removal of duplicates in one column and making it remove the whole row. I will provide an example in a screenshot in Excel as to not provide proprietary info. I am looking to remove one of the rows highlighted in yellow for example but do not want […]

Does a byte data type exist or is there an equivalent in SQL Server?

I’m trying to find out if Byte is a valid datatype in SQL Server, and if it has an equivalent. I’m not sure if there is an equivalent type for that

MS SQL prepare execute PHP

I’m getting nowhere with MS Sql and some php queries. function getBillet($idBillet) { $connection = getBdd(); $sql = ‘select BIL_ID as id, BIL_DATE as date, BIL_TITRE as titre, BIL_CONTENU as contenu from t_billet where BIL_ID=?’; $billet = $connection->prepare($sql); $billet->execute(array($idBillet)); if ($billet->rowCount() == 1) return $billet->fetch(); else throw new Exception(‘Aucun billet ne correspond à l\’identifiant’ . […]

Java JDBC SQL Server database keeps freezing

So I have recently been working on a web-app which is connected to a SQL server database. During testing everything went fine; all methods work and there were no major issues. At a certain point in the testing-phase I left the server on for more extended amounts of time and after a while of usage […]

How to perform efficient Bulk update in SQL server

I just spent the last one hour reading on stack but did not find answer for my use case. It’s pretty straightforward though. I have a table which will have like 5000 entries max. The table has 10+ columns. One of the column values needs to be updated every 3 minutes for all the 5000 […]

SQL Server to Netezza Data type equivalent

I need to convert these data types from SQL Server to Netezza: decimal (38,5) Bit Varchar (50) Smallint datetime Can someone give me the equivalents on Netezza please? Thanks!

Tool To Generate Data Migration Script From Table A To Table B In SQL Server

During our SQL Server database deployments, we create a temporary table which contains the new desired state of data for a particular table. We then merge the temp table into the target table (we actually use individual insert, update and delete statements, but that’s probably not relevant). The inserts/updates/deletes performed are captured and written out […]

Need to tune the select query without adding index

I have a query related to Indexes and Execution plan. Below are few tables that I am using Table 1 : TestReviewResult Column_name |Type |Length TestReviewResultId |int |4 TestNumber |int |4 ReviewerUserId |int |4 Current Index index_name index_description index_keys TestReviewResult_PK clustered, unique, primary key located on PRIMARY TestReviewResultId Table 2: TestReviewFinding Column_name Type Length TestReviewFindingId […]

How does one create database tables (MSSQL) to handle notifications to users and system notifications to all users?

I would like to create a notification system for a web application I’m working on. I’m having trouble designing a database that is laid out in a “correct” format. This is what I would like to accomplish: Have different notification types, such as Office, User, Client, Vendors, and System. User, Client, and Vendors are different […]

MS SQL bulk user and database creation

I’m exploring options to setup a SQL 2016 database server to support teaching students database fundamentals. There will be close to 200 students on the course. I’d like to automate the creation of all the user accounts and associated database via a script – this means the database for each user needs to be created […]

MS SQL Server is a Microsoft SQL Database product, include sql server standard, sql server management studio, sql server express and so on.