Quantcast
Channel: Microsoft SQL Server
Browsing all 4871 articles
Browse latest View live

How to bulk insert a series of files

I have 487 text files that I need to import into a single table in SQL. I know how to import them one at a time using Bulk Insert (much thank to Larry Shanahan). However, is there a process for having...

View Article


Image may be NSFW.
Clik here to view.

Incorrect syntax in Merge Statement in SQL

The issue at hand is that I am getting an incorrect syntax at the "then" statement at the bottom of the third major section of the code in the attached picture. From looking at the code, can someone...

View Article


Merge two select statements in SQL 2014

I am trying to build a list of Care Instructions that are in use by products in GroupCode 104, but can't get my head around merging these two queries? Or is there a better way?Query1SELECT A.[Code],...

View Article

SSRS Permissions

I have recently lost the ability to edit SSRS reports in Report Builder.  In the Home folder, I have 5 subfolders.  Four of them I created manually and I can access everything.  The other one was...

View Article

SQL DISTINCT Across 2 sets of 2 columns

We have a table of relationshipsID,RelationType,ReciprocalID,ReciprocalRelationTypeeg rows100,Mother,105,Daughterand its mirror105,Daughter,100,MotherWhat SQL would filter out the mirrored rows,thank you

View Article


SQL Server 70-764 and 70-765 certification

Hello,I am planning to give sql server admin 2016 certification. I am preparing the content according to following...

View Article

The missing link... between tables

Hello all,I have a question very similar tohttps://community.spiceworks.com/topic/2025243-sql-finding-the-links-between-two-tablesbut I just can't seem to get the results I need... or really any...

View Article

How to create a tsql (or ps?) script that will run tsql>reboot>tsql script?

EnvironmentSQL2012Windows 2012 (VM)1 Novice scripter  ;)I want to set this up as a sql agent job:Step 1 run a query that cleans up my dbStep 2 reboots the serverStep 3 after reboot run a query that...

View Article


MERGE statement not removing enough duplilcates

Some background info to begin.First, I have 28 fixed width text files. From there, I import them using bulk insert into one of 6 larger tables. The reason for the delineation is that each set has to be...

View Article


How Do I Link My Company's Security Software to its SQL Database?

Hi,My company has a door locking system that uses an SQL database to store its information.We had to reinstall the security software due to a computer problem and now it will not link to the SQL...

View Article

Some Users not authenticating on SQL 2102

So I'm getting the error below Unable to determine if owner (who is a domain member) of the job has access error code 0x5. [SQLSTATE 42000] (Error 15404)). Everything I've found indicates the SQL...

View Article

repair sql table without data loss

I have encounterederror msg from a table CUSTOMERDETAILafter a checktablecommandHow to find out which pcorruptedrruoted?how to repair without losing data.Msg 8939, Level 16, State 98, Line 6Table...

View Article

How to produce averages based on distinct combinations

So I have a table of 146510 rows. The schema is given below.      create table test2      (     year char(4),     qtr char(2),     area char(6),     industry char(3),     employment numeric(8,0)...

View Article


SQL licensing

I am trying to help our ERP team.  We are having login issue on a database server.  I suspect that it is a licensing issue.  However, I dont know where to generate the report to see how many licenses...

View Article

Replace .mdf file with a newer one?

Hey Spiceheads!Got a good one for you.BTW, i'm an accidental DBA so that's why I'm reaching out to you. Here's the breakdown of what we have and what we are trying to do:Intranet site that points to...

View Article


Linked server works locally from SSMS but not from remotly connected SSMS

When trying a simple query like this remotely from SSMS:SELECT * FROM [LinkedServer1].[Database1].[dbo].[Table1]it fails with :Msg 18456, Level 14, State 1, Line 1Login failed for user 'NT...

View Article

How To Migrate SQL SERVER 2005 Rporting Services database?

Good afternoon all!Anyone successfully migrate a SQL Server 2005 (9.00.5069.00) Reporting Services database? All references I'm finding do not address SQL2005.

View Article


Image may be NSFW.
Clik here to view.

What is installing all these SQL programs? What can I remove?

So I've been tasked with making a Win10 golden image for the Devs with:- SQL Server 2012 SP4- Visual Studio Enterprise 2015 (update 3, latest)- Visual Studio Premium 2010 (update 1, latest)I...

View Article

Image may be NSFW.
Clik here to view.

How to manipulate the following data result?

I want to get CalculatedAmount data based on Operator type. If 'Sum', add upper CalculatedAmount with Amount. If 'Subtract', then minus. P.S: For first row, just take only Amount.

View Article

SQL Server 2016 Always On ReadOnly Routing List ...

Hello,I and application that is about 60% WRITE and 40% READ. have configured ReadOnly Routing List for SQL 2016 Always On Availability Group based on the Microsoft's guide. here :...

View Article
Browsing all 4871 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>