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

Using TOP in an UPDATE statement.

[code language="sql"]UPDATE #TEMP_STPSet Signature_Date = Top 1 D.Close_DateFrom[SOLICIT].[GTM_DOC] D, #TEMP_STP, [SOLICIT].[GTM_DOC_PROD] P whereD.[SOLICITATION_ID] = P.[SOLICITATION_ID]<

View Article


Again, trying to use a value with the max Close Date

[code language="sql"]UPDATE tSET Elig_Flag = P.ELIGIBILITY_FLGFROM #TEMP_STP tCROSS APPLY (  SELECT P.ELIGIBILITY_FLG FROM [SOLICIT].[GTM_DOC_PROD] P INNER JOIN [SOLICI

View Article


Is this Deadlock due to Lock Partitions?

The same update ran a few miliseconds apart. It causes deadlock. Col2 is primary clustered key. In execution plan,  It's only one step which is Clustered Index Update on Col2.i

View Article

Dynamic Pivot Help

Hello forum, I am new to posting as I try to read a lot to address problems i have had in the past.  I have searched the forum but cant seem to find anything I need to put me on the right path.I have...

View Article

Deriving group members from nested groups

Hello All, Any input would be appreciated. I have some working code that derives group members from nested groups. There are two changes I need to make and when I do the code no longer works.

View Article


Question about a composite key and autoincrement

Hello all,I was recently assigned to convert an Access database to Sql Server.  I have to try and keep the structure the closest properly because some other programs use this database.This concrete...

View Article

SQL uses 2 different executions plan (slow and fast) for a simple query. Need...

Hi everyone,I am experiencing a performance issue with one process in our system. The performance issue is intermittent, the users say that it is working just fine for ~10 minutes and then it is slow...

View Article

Issues with Update using Cross Apply

[code language="sql"]UPDATE t SET  response_sol_id = x.[solicitation_id] FROM #temp_stp t    CROSS apply (SELECT P.solicitation_id        FROM&

View Article


Triggers

Hi Team,I have created one single trigger to capture information modified by the insert/update/delete commands.is there any performance difference if we create 3 separate triggers(like after insert...

View Article


upsert in ssis for large tables

I have 40 tables having different structure in one of DB on one server that is being updated by data provider.I want to create a SSIS package that would pull data from that data provider DB and insert...

View Article

Connect MS SQL Server with Progress 4gl OpenEdge database

Hi,I want to create a connection to Linked Server with Progress 4gl database. MS SQL Server is on local machine and Progress Database is hosted on Cloud (IS Corp). Can you tell me how to connect with...

View Article

Huge time hit with a subquery

Before i added this, my code ran in under 1 minute. Now, it takes at least 6 minutes (I stopped query at 6 minutes)Is there a better way to do this?[code language="sql"],ZATS = (Select top&

View Article

OpenRowSet No Field Terminators

Hi,To start I have minimal experience with OpenRowSet and BCP. I usually do processing with SSIS but this new project is using SQL Server Express so I don't have that luxury.  I need to import data...

View Article


SSRS Report: Any way to copy or download either an RDS file or the text...

It's been a while since I dealt with SSRS.   Am hoping to find an easy way to either download a shared data source as an RDS file, or somehow come up with the text necessary to create one from...

View Article

Copy File To Active Node In AO Environment

I have a process that needs to occasionally copy a file to a local drive on the active node of an AlwaysOn environment (SQL Server 2014 running on Windows Server 2012 R2 servers).  This environment has...

View Article


AVG a range of dates while grouping them by supplier

I have multiple suppliers with a purchase order date. I'm trying to calculate the average time between purchase orders but keep it grouped by supplier. I thought I could assign a row_number and over...

View Article

Add Group ID value for set of sequential rows

HiTo be honest I wasn't sure how to phrase this subject, I hope it makes sense after I describes my needs. I have a file(s) that need to be imported where the format is a single column of data where...

View Article


How does SQL Server handle concurrent operations?

Hello,We are having an issue which I suspect is database related. We have a web application on which we can upload files. When we upload a file, data from that file gets saved to a SQL database. We...

View Article

How can I cache an execution plan from SSMS

Hi,After I ran a query in SSMS, I can't find the execution plan in the cache.Is there any way I can tell SQL to cache the execution plan ? My goal is to run a query with a set of values and get the...

View Article

Batch Update Performance

Hi all,I have a batch UPDATE I'm trying to use to populate a new column for historic data on some fact tables in our data warehouse (up to around 1,000,000,000 rows per table). The code is structured...

View Article
Browsing all 3145 articles
Browse latest View live