Skip to main content

Questions tagged [sql-server-2008]

Use this tag for questions specific to the 2008 version of Microsoft's SQL Server.

1 vote
0 answers
30 views

Connect to MSSQL hosted on Windows 2008 R2 from Amazon Linux 2023 PHP 8.2

I can't do anything with legacy database, can't migrate or update, I have to read some data from it. Personally, I'd love to migrate asap, but I can't. Please help, is there any way to connect ...
Rustam Anvarov's user avatar
-1 votes
1 answer
41 views

Update single column with multiple values [duplicate]

I am trying to add multiple values at once in existing table using query That column with NULL values "County" I want it populated with countries like Kenya, Uganda, Cameroon, Ghana. I have ...
Thomas Magono's user avatar
0 votes
1 answer
60 views

Get multiple messages from Service Broker queue

I have the following code: WAITFOR( RECEIVE TOP (100) message_type_name, CAST(message_body AS XML), conversation_handle FROM ...
Denis Kaminsky's user avatar
-1 votes
0 answers
82 views

Query with multiple LEFT JOINs on tables and views taking excessively long to execute

I have a SQL query that involves several LEFT JOINs and paging, but it's running very slowly. Here's the structure of my query: DECLARE @pageOffset INT = 1; DECLARE @pageLimit INT = 10; DROP TABLE IF ...
TheZenithCoder's user avatar
0 votes
0 answers
76 views

Why the number of affected rows is not what I expect?

I am running the belove code and expecting to see 2 affected rows , but what i see is that 3 rows are affected . HOW ? I keep the exapmle simple : I have a table : CREATE TABLE MyTable ( Column1 ...
zolei's user avatar
  • 25
1 vote
1 answer
59 views

How to dynamically set the value of a parameter in sp_executesql without modifying the calling software

I'm currently working with a stored procedure that executes an INSERT statement using EXEC sp_executesql. The procedure takes several parameters, including @TRANSACTIONNUM, @CUSTOMERNUM, @VALUE, and @...
zolei's user avatar
  • 25
0 votes
1 answer
74 views

Altering the stored procedure does not affect the output [closed]

In the context of the provided SQL Server stored procedure, I need the SCODE column in myTable to be a value of 0, regardless of the values present in the @TVP_m table. I have tried: INSERT INTO [ax]....
Roberto's user avatar
  • 35
0 votes
1 answer
42 views

How to pass symmetric key to query

I want to know how to pass symmetric key to SQL query as parameter. I'm usually hardcoding it within the query as follows: OPEN SYMMETRIC KEY SymKey DECRYPTION BY CERTIFICATE CertiFi; SELECT * FROM ...
Mark's user avatar
  • 69
0 votes
0 answers
77 views

Laravel eloquent relationship with binary SQL Server

I have 2 tables in SQL Server. Table Account: [id] [binary](13) NOT NULL, [PRIMARI KEY] [email] [varchar](50) NOT NULL, .... Table Status: [numG] [int NOT NULL, [id] [binary](13) NOT NULL, [PRIMARI ...
blackhoLe's user avatar
-1 votes
3 answers
60 views

How can I select one of two columns from different tables as a single column

I have two tables. tblAddress PrimaryKey AddressType Address 1234 LOC 123 ST. 1234 MAL 456 TER tblAccountInfo PrimaryKey Address 1234 123 ST. 5678 XYZ AVE What I want is that if an account has ...
Richard J Wilkinson's user avatar
0 votes
1 answer
49 views

Multiple Users Simultaneously Press Button, Makes Infinite Loop Ineffective on C#

I have a c# infinite loop code on a WinForm project, which uses a value in SQL which alternates between 1/0 and if it's 0 it'll continue the process, while if it's 1 it'll stay in the loop. The ...
MasterOfNothing's user avatar
0 votes
1 answer
385 views

Getting error SQL Server did not return a response. The connection has been closed

I am connecting MS SQL server 2008 database using jdk 1.8.371 and spring boot 2.1.5. i am getting error "SQL Server did not return a response. The connection has been closed". i am not ...
Vinay M Gandhi's user avatar
0 votes
3 answers
82 views

SQL Server Case Then Statement

Is it possible to have multiple expression in the Then for a Case statement What i want will look like this Select EmployeeId, Case When Dateofjoin > '1-1-2000' Then Select Column1 , Select ...
Matt's user avatar
  • 2,876
-1 votes
1 answer
90 views

Parsing First Name and Last Name

I am using SQL Server 2008 for this. I am trying to parse first name and last name separately from a column that contains a full name value. After parsing, I would like to store that value in a ...
Curious's user avatar
0 votes
0 answers
37 views

Why does the following script throw database still in use when selecting the master database first? [duplicate]

Why does the following SQL query throw an error when I've first selected the master database before dropping the database in question? Please see error and code below: Msg 3702, Level 16, State 4, ...
Tim Kruger's user avatar

15 30 50 per page
1
2 3 4 5
3585