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

How many active orders were there at the close of each day

Hello,I have an Orders table with Start DateTimes(when the order was created) and Stop DateTimes.  If the Stop DateTime column IS NULL, then the order is considered "Active".I'm trying to look at a...

View Article


Using Or within a clause with multiple ANDs

I think i need to put my OR in (), but not sure how . . query runs longer than it should..I want SITE_ID to be LIke 'AP%' OR Like 'G9%' then the other ANDs.[code language="sql"]HAVINGQ.PERI

View Article


Create a Payment Schedule

Hi There, Below is a sample table and some data within that table.

View Article

Use an external Excel sheet as a parameter in SSMS WITHOUT using a stored...

I don't think i can, but can i use the values in an External Excel file on my desktop as parameter values in SSMS without using a Stored Procedure?  IT people won't allow me the ability to write...

View Article

GROUPING SETS or ROLLUP question

I've only seen this used in MS documentation, and have yet to encounter it in the "real world", but I have a query now that might justify the usage.   However, I want to better understand what both...

View Article


SQL Server Insert Result Set Data to temp Table

How can i insert the Result set data to tamp table. I got nested stored procedure and need to insert this data to temp table. This is the sample what i am trying to do.[code language="sql"][/code]C

View Article

convert utf-8 xml to rows and columns?

Hello,Hopefully I explain this right .I have an utf-8 encoded XML file.I am trying to "convert" into a traditional table rows and columns.XML Data looks like this:

View Article

Harmony integration for SSIS

Hello,Does anyone know if it is possible to use HARMONY web service in SSIS? I have a convoluted C# batch process that I would like to re-write in SSIS, but I am uncertain if SSIS supports this.Any...

View Article


Issue Casting as either decimal or integer

i am trying to multiply the duty rate (a decimal) by the Total Value, which can be decimal.CAST (D.Duty_Rate as decimal(22,8) * Sum(M.TOT_EXT_COST) as Duty_per_PartAs written, i get the an error .........

View Article


I need to divide my total by the QTY, but QTY lives on every row

I hope i explain this correctlyI am dealing with BoMs . . . If there are 50 rows of parts, for example, on a BoM where the BoM QTY is 6, I need to divide the total of my 50 lines of duty per part by 6....

View Article

SSISDB.internal.executables Table Keeping Very Old Project Versions?

Hi,I'm on SQL Server 2014 (v 12.0.5540.0).  We use the SSIS Catalog to house all of our SSIS packages, and we have the retention period set 30 days and a max of 10 project versions.  I can see that the...

View Article

Clustered Index created but SQL complains

Hi Guys,I'm very new in query optimizing.I have  created a non clustered Index on tbl_A as below also note that all tables have primary key created.CREATE NONCLUSTERED INDEX idx_tbl_A ON tbl_A...

View Article

[Cell Phone] like '%[^a-zA-Z0-9(+&]%')

I am wondering if someone can help me understand what this is in the query I am sharing below? [quote]'%[^a-zA-Z0-9(+&]%')[/quote] This is the 1st time I have seen

View Article


Best way to perform calculation stored as varchar

Hello, I'm working on a report for a customer where they have a formula stored in a varchar field such as "({Price} - 8.1) x .7 x {Weight}". I'm using the Replace function to replace {Price} with the...

View Article

Help with dertermining number of days between dates

Assume I have the data contained in the attached example.  I have a table of Serial Numbers with their contract number and the Start Date and Call Off Date.  I also have a table that has every month...

View Article


How to get records from table using filtered columns

Hi Team,I have below scenario.Create table mines(id int,name varchar(50),lamp_start varchar(50),lamp_end varchar(50),conc_start varchar(50),conc_end varchar(50))declare @category varchar(50)

View Article

Windowing in a Calendar Table

Good morning/afternoon/evening every one :-)I have been asked to provide a column on a (UK specific) calendar table that marks the equivalent week/last week/quarter last year so we can report on how we...

View Article


convert comma separated string into rows

Hi all,I am having a table where i am storing comma separated string in that. I want to split that on particular condition and convert into rowsDECLARE @csv varchar(50)SET @csv = 'comma after this, and...

View Article

Change Data Capture __$Command_Id Error

SQL Server Default Instance:  CDC enabled database SQL Server Enterprise 2014 SP2-CU11 [CDC Source table] SQL Server Named Instance: SQL Server 2016 Enterprise SP1-CU8 [destination tables] Visual...

View Article

Deriving a column from another derived column - conversion issues.

Hi all, Ran into some difficulties as follows[code language="sql"]  --How Many Students Stop at What RanksSelect  approxrank as 'Rank' ,  Count (*) as

View Article
Browsing all 3145 articles
Browse latest View live