Quantcast
Channel: SQLServerCentral » SQL Server 2014 » Development - SQL Server 2014 » Latest topics
Browsing all 3145 articles
Browse latest View live

Merge several codes to one code

I am trying to merge different sets of sql queries to one query and when i try to do , i shows incorrect count. Here is below  code needed to merge to one code./******* Below sql has common Table but...

View Article


“LOGIN FAILED FOR USER ‘NT AUTHORITY\ANONYMOUS LOGON’” WHEN YOU RUN AN SSIS...

i researched my issue and found the below link. I don't want to use a sql job. I'd rather now hard code the sql login the in the proc either. Does anyone know if this issue has been addressed by...

View Article


Import and Export Data Package

I created a package (AccessData) using the SQL Server 2014 Import and Export Data (32-bit) tool.  I can see the AccessData package with the SQL Server 2014 Execute Package Utility.  I have not tried to...

View Article

Image may be NSFW.
Clik here to view.

Nullable FK within one to many relationship

Hi Guys,i noticed that my problem appeared from one to many relationship with nullable FK. My model is:

View Article

Moving database

I have moved a database from one computer (and server) to another by using a backup copy, and then restoring it on the other using Management studio to restore it on the other machine. This involved...

View Article


Managing large table in SQL Server 2014

Hi Guys,I have a large table that has around 11 million rows and is growing by about 1 million rows each week. As a result the performance is starting to degrade on the Power BI reports that consume...

View Article

SQL Job calling .NET App connecting to another SQL instance - security issue

Hi,I've intertied a failing process and have been asked to fix it. The process is a SQL job which has a single step to create and execute a xp_cmdshell statement. The xp_cmdshell statement calls an...

View Article

Using the Name of a CASE STATEMENT later on in a CONCAT

I understand why i can't do this (using CONCAT with "MOT2".  For the same reason i couldn't use "FILER", but I was able to work around FILER . . . but can i work around my CASE statement and use MOT2...

View Article


Spilt a record into 4

Guys,  have select statementSelect salesid, salesname, salesamount from salestablessalesid salesname salesamount     1       cust1         101.50 want

View Article


Image may be NSFW.
Clik here to view.

Best way of concatenating values and returning an empty for null values

I've taken an online practice exam for my 70-461 exam and I cannot work out why concatenating using '+' is better than using the concatenating function:

View Article

Issue with SELECT after creating a CTE SOLVED!! User error

not fluent in CTE's but I thought i did this right. I get an Error Near SELECT for the select after the CTE.  Thoughts? thanks  (Sorry, Webpage doesnt give me a SQL option below . . . thanks I deleted...

View Article

Column set to varchar(max) error

I have some code that logs validation messages that are displayed to users of our software. The table it is saved in is comprised of 5 columns  Record identity column,UserID char(9),ValidationMessage...

View Article

get date by rank

I have  results from my queryaccount  value rank  fixdate             payabledate22           100    1    01/01/201822       &nbsp

View Article


SEQUENCE object or NEWSEQUENTIALID()

I'm studying for my 70-461 exam and have received a corker of a question in my practice test:"You develop a database application. You create four tables. Each table stores different categories of...

View Article

Error OPENQUERY Maximum length is 8000

Hi, I have a query inside a openquery:SELECTRE.*FROM OPENQUERY(PROD,'SELECT XXXX ') REThis is too long. Excede maximum length: 8000. How can i write the query without this error? I can´t minimize the...

View Article


deadlock vs. locking

Hello,We have a database transaction. During this transaction, the database is locked so that other process can't access the database. 90% of the time, the process which is blocked simply waits for the...

View Article

Parent / Child tables - SELECT QUERY to bring child data records into parent...

I have two tables, one with Summary/basic data, the other with detail data multiple records pertaining to each record in the Parent table.  The number of records  in the detail table for each parent...

View Article


Insert values from one table into multiple tables

I need a little help. I have a supplied file that contains many company names and addresses. I need to break this up and insert the values from the single table or file into multiple tables using SQL....

View Article

Use uniqueidentifier field in place of int

Hi All,I'm trying to populate a temp table. Here is the temp table:[code language="sql"]CREATE TABLE #SESDMVESEnrollData (  ContractNumber nvarchar(50) not null,  PolicyNumber

View Article

Reverse engineering a duty rate when dealing with small values

I need to compute the Duty Rate on an item by dividing the Duty Paid by the Value of the goods.  and this code works:[code language="sql"]CASE when [VALUE] =0 THEN 0 ELSE Round(CAST([Duty] AS flo

View Article
Browsing all 3145 articles
Browse latest View live