Skip to main content
Filter by
Sorted by
Tagged with
2 votes
2 answers
186 views

I need some help handling null columns in joins. I have three tables (below are just examples) Map, Employee and Region. Primary table is Map where I join Employee table on the MapID column to get ...
unicorn's user avatar
  • 590
1 vote
2 answers
128 views

I have a vertical table that end users want converted to a horizontal table with some groupings. I'm writing this in SQL Server 2019. My table looks like this: PKID cID vID vDate 1 2 81 1996-04-04 2 ...
Steve's user avatar
  • 23
6 votes
2 answers
133 views

My table in SQL Server with an nvarchar(max) column holds multiple JSON arrays in each cell. I am trying to parse the 'result' items into separate rows. JSON array: [ {"successful":true, ...
SomekindaRazzmatazz's user avatar
-1 votes
1 answer
70 views

I've got a column that stores text and I'm trying to find a way to pull the datetime from the field. I've tried to use a combination of SUBSTRING,CHARINDEX, and LEN to pull the datetime from the ...
MISNole's user avatar
  • 1,070
3 votes
3 answers
151 views

I have a table which has 3 columns: task_name -- data type is varchar(50) start_date -- data type is date end_date -- data type is date I want to list the dates which fall within the range (between ...
srh's user avatar
  • 1,729
0 votes
0 answers
76 views

This question is about SQL Server replication. I am running SQL Server 2019 v15.0.4420.2 and I get a large number of replicated tables from outside the organisation. What I am looking for is a SQL ...
Maxcot's user avatar
  • 1,617
2 votes
1 answer
147 views

I can’t calculate subtotal and total using GROUP BY ROLLUP syntax in a SQL Server 2019 database: CREATE TABLE [dbo].[G_Dashboard] ( [orderId] int NULL, [C_CO] varchar(4) NULL, [D_CO] ...
the_uncle_vince's user avatar
0 votes
1 answer
108 views

When writing a query with the TOP clause in Microsoft SQL Server 2019, is there a limit to how high a number you can specify before the query fails? For example: SELECT TOP 9999999999999999 FROM table ...
Stevoisiak's user avatar
  • 27.8k
0 votes
1 answer
134 views

I have a table with purchasing data, for example this below. The purchased items are for the entire year, so there are hundreds of items. I'm looking for a way to list all of the dates of the month, ...
Inquiring Mind's user avatar
0 votes
1 answer
77 views

Our table stores the line numbers of an order. Is it possible to concat them into a string, where the first and last sequential lines are separated by a hyphen, and non-sequential lines are separated ...
Jack Morris's user avatar
0 votes
1 answer
89 views

I need assistance executing a procedure inside one database to query another database on the same SQL Server 2019 instance. I can run the procedure fine as myself, but I can't use execute as in either ...
Paul Young's user avatar
0 votes
0 answers
197 views

I have the following two queries. The first runs in less than 1 second. The latter query takes minutes to run. All of the columns being joined are indexed. Both queries are doing the same thing, the ...
Developer Webs's user avatar
0 votes
1 answer
111 views

As the title says, I'm trying to use multiple variables in a single Execute SQL Task. Something like this: declare @payyear int select max(PAY_YEAR) as payyear from dbo.table1 select ? = @payyear ...
Matt Williamson's user avatar
1 vote
2 answers
93 views

I need a query to pull records from a SQL Server table based on the max date in the InsertDTS column and the date should not be included in the output. The InsertDTS column is defined as Datetime. I ...
Don's user avatar
  • 224
1 vote
1 answer
133 views

I have a column in a table that has values like below and I'd like to get the numeric value after the keyword APP and before the next space after APP*. Thanks so much in advance! Data Service B2B **...
Benjamin P's user avatar
1 vote
0 answers
329 views

Using Azure Devops for SQL Server 2019 database dacpac deployment with Visual Studio 2019 is dropping and creating index how do I change it not drop and create index for every deployment. how to ...
ITHelpGuy's user avatar
  • 1,047
0 votes
0 answers
39 views

I have a simple table like this: Api_No14 Prod_Date Oil_cf 42317448360000 2023-07-27 639.2337 42317448360000 2023-07-28 864.22 42317448360000 2023-07-29 NULL 42317448360000 2023-07-30 622....
Cartman23's user avatar
1 vote
1 answer
110 views

So based on a start date of 5 years ago on the 07th February – I want to generate 5 rows - one per year from the start date. If the start date was 8 years ago - 8 rows. Year StartDate EndDate 1 07-02-...
ikilledbill's user avatar
0 votes
1 answer
38 views

Is it possible to connect with an SSRS report from the Mendix application? I have prepared a report in SSRS, but I am not able to integrate it with the Mendix server. In Mendix, there is a native ...
Chandrashekhar Komati's user avatar
1 vote
1 answer
141 views

I have a table with more than a billion rows, with one of the column definitions being: row_id int NOT NULL And an index on it CREATE NONCLUSTERED INDEX row_id_IX ON dbo.test_table ( row_id ASC ) ...
Ram's user avatar
  • 570
1 vote
1 answer
71 views

We use AWS RDSProxy as a middle tier between our API and the SQL Server database. Noticing very high waits on the following statements called from RDSProxy even though they run very quickly manually: ...
cloudsafe's user avatar
  • 2,524
0 votes
1 answer
301 views

I'm using a SQL Server 2019 with a self-signed certificate. Crystal Reports 2016 throws this error: Microsoft OLE DB Driver 19 for SQL Server - ADO Error Code 0x80040e73 Format of the initialization ...
Andy Summers's user avatar
0 votes
0 answers
69 views

If I don't want to treat an empty string and NULL as being the same value, is there a cleaner way to write the following: -- @name and SomeTable.Name are varchar(10) NULL update SomeTable set Name = @...
Developer Webs's user avatar
0 votes
0 answers
137 views

I am having a situation with the scheduled job running longer when it runs on scheduled time, but runs absolutely fine when executing manually. The job is basically for creating the csv file using ...
SQL Rookie's user avatar
0 votes
0 answers
120 views

Test #1 I have the SQL below that iterates through a cursor which has 374 records. I've tested the query a dozen times and it runs in 3 mins 40 secs (give or take a few seconds). Test #2 I modify the ...
Developer Webs's user avatar

1
2 3 4 5
24