Category "sql-server"

How to change normal distribution from MySQL to SQL Server

I have a code not total like normal distribution. How can I change it from Mysql to SQL Server? select latency where pow(e(), - pow((ln(latency) - 8.223) ,2)/2

ef core angular - is there a way to get and display data from database in input box depends on another input box

First Input Box will ask the user to enter employee number Second Input Box (readOnly) - employee name will be display here automatic base on employee number pr

SSIS ERROR: The attempt to add a row to the Data Flow task buffer failed with error code 0xC0047020

I have problems with SSIS process(acctually the same problem occurs for two different processes). So, we are doing some ETL work using SSIS. We have Business In

Get Records By Most Recent Date From two tables

I have two SQL tables. Each has an ID with other columns and a Date. Is there a way that I can get the result from these two tables in one query sorted by the

The parameter data type of UInt32 is invalid. (MS SQL Server)

In general we are supposed to pass integer values to our stored procedures and to do so we usually do it with this method command.Parameters.AddWithValue("@para

How to retrieve data from sql server db in android

this is the first time I am developing an android application. I want to bind some data with grid view or list view based employee id provided on the text box.

Why is this SQL Geometry invalid?

Edit - I provided the wtk of the poly I had made valid. Updated with the invalid string. Sorry this seems to have turned by mind to mush. I have a python proces

SQL Server TRUNCATE

I have a question to the TRUNCATE command. How does TRUNCATE work in background ? I read a text that says TRUNCATE creates a copy from the table and then star

Create a generic procedure, which inserts data into any table

I'm currently working on a .NET application and want to make it as modular as possible. I've already created a basic SELECT procedure, which returns data by che

SQL Server 2016 - How to get last logged in date for user?

How can I get the last logged in date for certain user. I googled and stumbled upon this query SELECT name, accdate FROM sys.syslogins But the accdate column

Why is SQL Server sequence jumping by two when fetched from Java code?

Let's say there is a sequence created on SQL Server: CREATE SEQUENCE dbo.my_seq START WITH 1 INCREMENT BY 1 NO CYCLE; GO And the following Java cod

Rolling COUNT DISTINCT of n-day active users using T-SQL

I am counting 7-day active users using T-SQL. I used the following code: SELECT *, COUNT(DISTINCT [UserID]) OVER ( PARTITION BY [HospitalID],

SSIS packages not showing in Upgrade Wizard Visual Studio 2019

I am having an issue upgrading our existing 2017 SSIS packages to 2019 . I have updated the target server version in the package settings and we have installed

Why is "insert into" inside stored procedure not working from python?

I wrote a stored procedure in SQL Server that gets passed 4 parameters. I want to check the first parameter @table_name to make sure it uses only whitelist char

How can I check whether a number is contained in comma separated list stored in a varchar column?

I have a table with a varchar column categoryIds. It contains some IDs separated by commas, for example: id categoryIds -------------------- 1 3,

Make directory in Using SQL xp_create_subdir

CREATE PROCEDURE SPCheckDirectoryExists ( @chkdirectory as nvarchar(4000) ) AS SET NOCOUNT ON BEGIN DECLARE @folder_exists as int DECLA

MsSQL driver which could not establish a secure connection by using Secure Sockets Layer (SSL)?

I use standard driver com.microsoft.sqlserver.jdbc.SQLServerDriver to connect to a MSSQL server. I run my program in Eclipse and encounter error: Failed to obta

How can I generate an entity–relationship (ER) diagram of a database using Microsoft SQL Server Management Studio?

I want to generate an ER diagram of an SQL database using Microsoft SQL Server Management Studio (SMSS). However, I don’t know how to. I found this techni

JAVA/MSSQL: com.microsoft.sqlserver.jdbc.SQLServerException: The connection is closed

I have got a problem with database queries, when I try to run them from my groovy script. Sometimes, but very often, I've got an error: com.microsoft.sqlserve

Checking variable for NULL kills performance

I have following queries: DECLARE @application_number CHAR(8)= '37832904'; SELECT la.LEASE_NUMBER AS lease_number, la.[LEASE_APPLICATION] AS applicatio