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

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


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


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

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

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

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


SSRS Grouping Problem

I have a report that has a dataset problem that I'm not sure I can fix.   The query for it is dynamic SQL because the company won't let me use a string splitting function like Jeff Moden's...

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


Show ALL results or limit them based on parameter

I have an query returning back to excel. It is a list of items and their class. Based on a parameter in excel, I want to see ALL of the items, or I want to exclude those with class C and show all the...

View Article

Joining a large table to itself....better ideas?

Hello all,I'm creating a view to use for future queries to make things easier.  Essentially this view needs to join a very large table to itself and I'd like to see what are the best ways to maintain...

View Article

SARGability of query

We have inherited the following (obfuscated) code, and are looking to improve performance. MyAudit has over 35 million rows, and MyTable has 0.5 million rows. The query takes 3-4 minutes to complete...

View Article
Browsing all 3145 articles
Browse latest View live