sql-server Questions

2

Do you know a reliable command line tool able to export SQL Server schema to a text file?
Caracaraballo asked 27/4, 2017 at 22:41

3

Given a string '100+200', how do I evaluate it? I want to get 300 on output.
Engrail asked 20/6, 2014 at 22:48

4

When working with dates, I have been using DateTime2 type in SQL Server to store C# DateTime. .NET 6 has introduced new structs such as DateOnly and TimeOnly. I assume these should be mapped to Dat...
Xylol asked 8/2, 2022 at 7:39

5

Solved

I have a database field name call Code and I am trying to select it using a variable name like this below: Declare @var1 = [Code] (SELECT @var1 FROM [VoucherType] WHERE [DeletedBy] IS NULL AND...
Coatee asked 10/12, 2011 at 5:33

4

Solved

I'm loading a batch of CSV files into a SQL Server table using Python one row at a time. The files each contain a number of free text fields and erroneous data which I trim and rename before attemp...
Huerta asked 31/12, 2018 at 11:6

7

Solved

Here's a simplified example of what I'm talking about: Table: students exam_results _____________ ____________________________________ | id | name | | id | student_id | score | date | |----+------...
Romanticist asked 7/12, 2009 at 23:22

7

Solved

OK. I'm doing an update on a single row in a table. All fields will be overwritten with new data except for the primary key. However, not all values will change b/c of the update. For example, if m...
Viceroy asked 26/1, 2010 at 0:45

3

Solved

We have a lot of DBUsers in our database. We have to clean up all those users from the database. When I tried to drop the user from the DB it failed due to the following error Msg 15138, Level 1...
Hocker asked 7/2, 2011 at 12:31

7

Is this possible without restoring whole database? I have made changes which I would like to undo, but without putting DB offline, and doing full restore.
Lacagnia asked 3/2, 2014 at 2:15

7

Solved

Input: The customer claims that the application (.NET) when querying for some data returns data different from when the customer looks into the data table directly. I understand there could be va...
Ison asked 18/6, 2009 at 16:26

8

When there are a number of people working on a project, all of who could alter the database schema, what's the simplest way to unit test / test / verify it? The main suggestion we've had so far is ...
Weathering asked 13/1, 2009 at 17:8

3

Solved

I'm trying to remove parenthesis and text within it. Eg: Column1 has data and cleaned data should look like column2 Column1 Column2 HF(abcd) HF BP(234) BP ATRS (2354) ATRS AB(PS) SD(12) AB SD I...
Farmland asked 2/10, 2017 at 18:44

3

Solved

I have a database table created 20 years ago in my company, it is only used for journaling, with NO PRIMARY KEY or INDEX. I can't alter that table. I understood that we need to call HasNoKey() in ...
Aflcio asked 6/2, 2020 at 13:53

5

Solved

I have a table (Table1) which has a composite primary key(Column1 + Column2). I am using it as a foreign key in another table (Table2). Now I want to a SELECT statement to select all records from ...
Lotuseater asked 21/3, 2011 at 16:55

6

I have an EF6 solution that I would like to add a trigger on a table to log changes to a new table. This is due to an integration we are doing to an external database. Basically, they want a log of...
Groats asked 25/1, 2021 at 18:11

4

Solved

I want to create a clustered columnstore index in a table using the following query: CREATE CLUSTERED COLUMNSTORE INDEX cci ON agl_20180319_bck And I am getting this error: Msg 35343, Level 16, S...
Proxy asked 19/3, 2018 at 14:33

7

Solved

Consider the following simple DAG: 1->2->3->4 And a table, #bar, describing this (I'm using SQL Server 2005): parent_id child_id 1 2 2 3 3 4 //... other edges, not connected to the su...

4

I created a MSSQL docker container based on the official image provided by Microsoft (https://hub.docker.com/_/microsoft-mssql-server). I started a bash shell inside the running container and trie...
Obeng asked 17/4, 2020 at 12:39

1

Solved

I have a data set that I want to place in a clustered column store and optimize it for segment elimination when accessing it by a column called SubjectId which is defined as uniqueidentifier type. ...
Errand asked 31/7, 2024 at 21:5

7

Ubuntu 22.04.1 LTS pyodbc 4.0.35 OpenSSL 3.0.2 15 Mar 2022 (Library: OpenSSL 3.0.2 15 Mar 2022) Followed steps on Install the Microsoft ODBC driver for SQL Server (Linux) Installation successful. W...
Plasterwork asked 6/12, 2022 at 19:23

2

Solved

I'm now trying to decide which driver to use to create a DataSource from my JavaEE application to MS SqlServer. A couple of years ago I had good experience with JTDS, and SO answers suggest that J...
Davisdavison asked 27/12, 2011 at 8:59

3

Solved

We have a legacy application that fails to connect to SQL Server on certain computer (we have activated TLS, and that computer now raises an SSL error). The problem is that the application is...
Bleareyed asked 27/6, 2022 at 13:21

11

Solved

Can/Should I use a LIKE criteria as part of an INNER JOIN when building a stored procedure/query? I'm not sure I'm asking the right thing, so let me explain. I'm creating a procedure that is going...
Inefficient asked 21/8, 2008 at 16:45

8

We have existing SQL Server database and we are using C#. Lets say our mobile client send a graphql to server. How can I convert this SQL, so that my client get the data what he expect?
Semipermeable asked 22/9, 2016 at 15:47

5

Solved

I'm trying to convert my Date which is (eg. 2012-04-20 05:54:59) format in into mm-yyyy. I came across some solutions that says you would need to convert into varchar . Is there any way using the C...
Immaterialism asked 3/3, 2015 at 22:6

© 2022 - 2025 — McMap. All rights reserved.