Here's a few of the new posts today on the forums. To see more, visit the forums.
|
SQL Server 2017 - Administration |
Weird network issue - Hi, I have an ssis package, that when I run it from the virtual server (the package is deployed on the catalog) and I use a job to run the package it takes 18 hours. I have set up another server (very small one called TEMP), is also a virtual server and deployed the same […] |
SQL Server 2017 - Development |
Parse character string into multiple fields - I need to parse a VARCHAR(255) field into four fields, three VARCHAR(5) and one VARCHAR(255). The VARCHAR field to be parsed is a variable length for example: 122 667|6 71|77|120 71|77|219|427|122|670|120|10 The characters before the first | go into field 1 The characters after the first | but before the second | go into field […] |
SQL Server 2016 - Development and T-SQL |
Find rows older than 60 days with Epoch time format - Hi, I'm trying to purge this table for any rows older than 60 days but the LogTime column is in Epoch format. I've read articles on how to convert it to human readable format and i just can't get it to work. Here is the table data. LogLevel LogTime INFO 1574434804509 INFO 1574434804509 INFO 1574434804509 […] |
Need to use Remain value in calculation - Hello community, I need to performe a calculation by Row using remain values for the same Receipt_nr --This is a Temp table for test purpose CREATE TABLE #temptab (docdata DATE, Invoice VARCHAR(29), nrInvoice INT, totalinvoice NUMERIC(14,2), totalreceived NUMERIC(14,2), Receipt_nr INT, TotalPaymetforInvoice NUMERIC(14,2), remain NUMERIC(14,2) ) INSERT INTO #temptab (docdata, Invoice, nrInvoice, totalinvoice, totalreceived, Receipt_nr, TotalPaymetforInvoice, […] |
Administration - SQL Server 2014 |
Slow deletes - Hi All, I have table with 1574963 rows and grown up to 1.21 Tera Bytes. Table has a clustered idx and additional nonclustered idx is created. App team is trying delete/archive some data in small chunks. CREATE TABLE [dbo].[LogData]( [c1] [bigint] NOT NULL, [c2] [int] NOT NULL, [c3] [int] NOT NULL, [c4] [ntext] NOT NULL, […] |
Development - SQL Server 2014 |
EXECUTE sp_executesql - Cordial Saludo. tengo el siguiente script DECLARE @SqlString NVARCHAR(500) DECLARE @ParmDefinition NVARCHAR(500) DECLARE @Valor_Tmp Numeric(12,2) SET @SqlString=LTRIM(RTRIM(@ValorFrm)) SET @ParmDefinition = N'@Valor_OUT Numeric(12,2) OUTPUT' EXECUTE sp_executesql @SqlString,@ParmDefinition,@Valor_OUT=@Valor_Tmp OUTPUT SET @Valor=@Valor_Tmp la variable @ValorFrm='SET @Valor_OUT=983,5-2(15.3)-1' Esta variable es una construccion similar a a+2(b)-1 construida por programa. El problema es que en el SSMS funciona y ejecuta bien […] |
A cursor with the name already exists - Hi, I have this code in a job that needs to run every 5 minutes. It works most of the time without issue. But 4-5 times a day I get the "a cursor with the name already exists" error. I added the LOCAL to the cursor declaration, but still get the error. I checked for […] |
SQL 2012 - General |
Place data on another drive - Hi all! I have had to change from my good old dependable server to a local laptop. That gives some big challenges... One of my databases is app. 2GB, and that just cannot be on a laptop harddisk - At least not mine. In comes my Synology drives, 2 X 8 TB But […] |
How to understand the SQL Server Statistics information and Query Cost of Execut - In figure 1, there are SQL statements , these 2 sql statments join 2 tables, one is on current database server, the other is on another database server. the first SQL statement runs by SQL Server linker server to join; the second SQL statement uses openquery and linked server to get same data. and in […] |
Find how many week day crossed in a given date - Team I have a scenario in SQL Query. If I Give a day, The output should say which day and how many days crossed in a given month For Ex If I give 04th Dec 2019 as input > It should say, It is Tuesday and this date is first tuesday If the Input is […] |
Reporting Services |
Drillthrough Reports - I have created a report (report1) that I can then drill into report2 (Action > Go to Report) - On report1, I specify name of report2 and give it the parameter report2 needs. Test this out and all works fine - I can click on my "hyperlink" on report1 and it will take me to […] |
Strategies and Ideas |
Programmatically determine intersection of flight paths and countries - A friend of mine asked me an interesting question... Given a flight path (a linestring of sorts), can one determine which countries the flight overflew? My guess was to define the path as a linestring (maybe with a width, if that's possible), and then use STIntersect to determine the countries overflown. Is there an example […] |
Integration Services |
How to achieve parallelism in BULK INSERT with OLE DB source and target objects - Hi all! I need help to get the performance up on my ETL. My data flow task is very simple in nature: OLE DB source (MS SQL Server table) points to OLE DB target (MS SQL Server table) with TABLOCK hint The target table is uncompressed, has no indices or other constraints (PKs, Uniques) -> […] |
Administering |
Log Shipping Agent Error Message - Hi all, I am trying to configure log shipping and getting following error in agent job history.(SQL Server 2019) There was no problem with sql server 2017 and 2016 in same configuration. The backup file was created normally but error message is logged. ---------------------------------------------------------------------------------------------------------------- 2019-12-04 11:16:50.90 Starting transaction log backup. ID: '26c94b60-7380-4ddd-8dc7-ae2ae70630c7' 2019-12-04 11:16:50.90 *** […] |
SQL Server 2005 Strategies |
Datatype coversion error - Hi, In my application I am fetching data from a View which internally having multiple select qurries combined using Union. It's near about 500 lines of query. When i fire Select on view it takes some time and then throws Datatype coversion error. To find the source of the error I execute available queries on […] |