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

finding SQL duplicates based on different parameters

Hi, I need to write a query (or a series of queries) that will allow me to find when two clients are living in the same house. The data looks like the dataset (see sample dataset below).The first t

View Article


find all variations of code assignment

We have orders with at least one code assigned to them. I need to find out all possible variations of those code assignments and count of orders with those variations.I have come up with the following...

View Article


Group by not working as desired...

View Article

with Execute as

Hi Have an  app that saves its internal reports (the SQL) in a table tblReports.I would like to make these queries available to outside apps e.g. EXcel so I wrote a simplified version of SP:

View Article

Dummy_val

Occasionally, I see a query submitted from Entity Framework with 'Dummy_VAL' in the where clause, like WHERE [Extent1].[SiteId] = 'DUMMY_VAL' - - -  What is Dummy_VAL and how does sql interpret it?

View Article


Clustered Index Update vs. Primary Key Index Update

Is there any kind of general rule or guidance on which kind of update is faster?   I'm trying to figure out which is the better way to go in a scenario where the table in question has a primary key...

View Article

Extract columns from Json array

Hi Everyone,Does anyone know or suggest a way to extract column information from the Json array. We are still using sql 2014 so jsonopen is not supported. I am trying to work through the same example...

View Article

create table from select

What's the correct syntax?[code language="sql"]CREATE TABLE Title2 AS SELECT * FROM Title[/code]Msg 156, Level 15, State 1, Line 2Incorrect syntax near the keyword 'SELECT'.

View Article


Trying to select both "paths" through data

I'm working with one of the developers, he has an application which logs the "path" taken by a process.  The process can take multiple parallel paths as well as loop back to previous steps.  What he's...

View Article


Die whitespace, DIE !!

Hi all, Trying to delete some white spacebar as follows...[code language="sql"]    /****** Object:  Table [dbo].[ranks]    Sc

View Article

update table: PK or unique idx?

Hi,There's this table with 300000000 rows and about 40 columns the pk consists of three fields massive updates are made on this table, for example:update  <all fields except those of pk> where...

View Article

How to spread an invoice tax across invoice lines without loosing rounded...

I have a view, which shows Invoice Details table. This view is used to print invoices to the customers. In my case each record of Invoice Details is a passenger, so for three passengers, as in my...

View Article

Oracle's ROWTYPE equivalent in Sql Server 2014

I appreciate ROWTYPE equivalent didn't exist in SQL Server versions prior 2014 and I could find no information re SQL 2014 eitherCan one advise, please? Perhaps there is some close alternative in 2014?...

View Article


Removing HTML tags

I've read many pages on the web about doing this and many come back to this page:https://www.sqlservercentral.com/Forums/1197668/Strip-HTML-TagsI have a SQL

View Article

GROUP BY

Hi All,i won't following output.find attachment for same.multiple row of columns.please suggest.regards santosh

View Article


Join on a substring value

One table has a Supplier Code, which is always 5 Alpha-Numeric.I need to join on a table where that Supplier code is embedded in a string.the string is always formatted as such:XXXXXXXX-Supplier-ZZZZ...

View Article

MERGE vs UPDATE

GM SSC,I have been on several blogs researching about MERGE vs UPDATE. Which is more effective? I have read some blogs that say "don't believe the hype" about MERGE. It's slow and bulky. I have read...

View Article


using wildcards in and and an IN in a Where clause

I have 500 strings that i need to do a wildcard on.example:  PARTNUM LIKE '%abcde%'but i have to find 500 different PartNums.Obviosly i can't do  IN ('%abcde%','%rthyg%','%UYTR%')How can i search for...

View Article

Looking for TSQL Query to display Parent child relationships

Hi All, Checking if anybody has query which displays all the user tables in a Tree format based on parent child relationship. CREATE TABLE [dbo].[Dept](    [DEP_ID] [int] NOT NULL PRIMARY KEY ,  

View Article

Load SSIS package with XML code only

Hi SSC,I made a copy of an SSIS package XML. I saved it to notepad with a ".DTSX" extension. I am trying to load that file into SSIS but I keep getting errors. Here are my steps...1) Add existing...

View Article
Browsing all 3145 articles
Browse latest View live