SQL Server is a relational database management system from Microsoft. Use this tag for all SQL Server editions including Compact, Express, Azure, FastTrack and PDW.

learn more… | top users | synonyms (2)

0
votes
0answers
5 views

Why temporal tables are faster than table variables for joins?

Why temporal tables are faster than table variables for joins in SQL Server? NOTE: In both scenarios the tables have PK, and the tables are joined with other "physical" tables through the PK.
0
votes
0answers
4 views

UTF-8 encoding and storing data in MSSQL Server 2012

I know this topic is a bit beaten to death, but I'm trying to wrap my head around everything and figured it would be best to do a small write-up. I have a string, client side, which is UTF-8 encoded. ...
0
votes
0answers
4 views

How do I eliminate the ALTER DATABASE statement from my SSDT publish script?

Disclaimer: There is a similar question on SO that appears to be referring to an older version of SSDT. The selected answer references settings files that are not in my project. I believe I have the ...
1
vote
1answer
19 views

converting true false string to boolean while using “load infile data”

I needed to transfer data from MSSQL (Microsoft SQL Server) to MySQL, and the best option for me was to write a python script that exported data as csv from MSSQL and then import this csv into mysql. ...
-2
votes
0answers
13 views

SQL Server SubSelect syntax error

I am trying to execute a subselect query but it is giving me an error, I am not sure if I can do this kind of logic. SELECT (SELECT SERV_ACCT, ACCOUNT, SERV_ADDRESS FROM tblAPSData JOIN ...
0
votes
2answers
39 views

Store a database table in memory in a C# website application?

I have noticed that our web application queries a particular table an enormous amount of times. The table is relatively small, with only about a hundred rows that are used. I'm wondering if there is ...
0
votes
1answer
8 views

Unique Clustered Index - can I make non-unique without drop/create

I have a unique clustered index that is causing replication problems (see "bounded updates"). Is there any way, short of dropping the clustered index, to make the index non-unique?
0
votes
2answers
36 views

SQL UPDATE SET = subquery set (random)

I need to to the following (this is pseudo-code): UPDATE Cars SET Engine = (SELECT EngineName FROM Engines WHERE Type = 3)[RANDOMIZE_INDEX_FROM_1_TO_SUBQUERY_COUNT] So I basically need to update ...
0
votes
2answers
41 views

Violation of PRIMARY KEY constraint Msg 2627 Cannot insert duplicate key

I am getting a primary key violation and I don't know how to resolve it. The actual error message is; Msg 2627, Level 14, State 1, Line 1 Violation of PRIMARY KEY constraint ...
0
votes
2answers
27 views

SQL - Using Variable as Column Name with count(@variable)

I need to determine the duplicates within a large number of different columns. Rather than typing out each column name, I tried to use the following code. This is slightly more efficient because I ...
0
votes
0answers
9 views

Better pattern for ORM in PHP and SQL Server

I'm just a newcomer in the world of PHP development. I have a SQL Server 2005 database with stored procedures, and I would like to have PHP talking to it. Since I'm just a newcomer, I'd like to have ...
-2
votes
0answers
6 views

Fade Effect In Microsoft SQL Server Report Builder

I am trying to reporting dashboard and am trying to find out if there is a way to set on a timer fading in and fading out of different reports so I can just leave it running and it will cycle through ...
2
votes
1answer
40 views

SQL Query to truncate to two decimal points?

I have a pretty big query at the moment and I am missing one element... I need to cut the data to two decimal points (no rounding needed). I Googled but have had trouble adapting it to the current ...
-1
votes
1answer
17 views

Partitioning .mdf database with Powershell

I need to split database .bak into several files, using powershell. How best to do it? Any examples?
-1
votes
1answer
16 views

Specifying buffer size in sqlserver

How do I specify buffer size in sqlserver? I want to increase the buffer size so that I can see a performance gains. I'm not sure how to get the default value and how to increase it.. I see these ...

1 2 3 4 5 4725
15 30 50 per page