Questions tagged [sql-server-2008]
Use this tag for questions specific to the 2008 version of Microsoft's SQL Server.
sql-server-2008
53,757
questions
1
vote
0
answers
33
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, but I can't.
Is there any way to connect Laravel 11 on PHP 8.2 ...
-1
votes
1
answer
42
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 ...
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 ...
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 ...
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 @...
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]....
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 ...
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 ...
-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 ...
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 ...
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 ...
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 ...
-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 ...
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, ...
-3
votes
2
answers
52
views
Return Duplicate Rows [closed]
I'm executing below query in, but return duplicate rows when we do not have any records for "LastMonth" and "CurrentMonth". Please let me know where is the issue?
**Output:**
...