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

Code dotnet in the sql injection in management studio

Hello,I have developed a solution that allows to inject code directly in dotnet requettes sql . which allows to use all the dotnet framworks on the fly in the sql management studio.an example of which...

View Article


Syntax question

I have a robust query that returns a dataset and the data is good, however some of the records contain the exact same data with the exception of the 'Price' field. I want to combine the records that...

View Article


Like Statement With Parameters

I have a table :Person(Id bigint , FirstName nvarchar(50) , LastName nvarchar(50),Address nvarchar(100))and I have a sp for search data in "Person" table:CREATE PROCEDURE SelectPerson @First...

View Article

Help with query

I need to create a query where patients have delivered and may have returned within a certain number of days for another admittance. each visit a new chart(sessionid) will be created. I thought I could...

View Article

Partitioning Table Strategie

Im just starting to get into this topics and looking for general advice on how to set up the partitions.I have a transaction table with 50 million records that's very hard to query. it holds data for...

View Article


Random number !

I have a function which generate random number in range :[code="sql"]CREATE FUNCTION Func_Rand ( @MAX BIGINT , @UNIQID UNIQUEIDENTIFIER )RETURNS BIGINTAS BEGIN RETURN (ABS(CHECKSUM(@UNIQID)) % @MAX)+1...

View Article

Alternative query which can have better performance

Hello All,Is there an alternative to this update query mentioned below.[code="xml"]DROP TABLE #FinalMeetings CREATE TABLE #FinalMeetings ( RowNumber INT IDENTITY(1,1), MeetingType VARCHAR(60),Country...

View Article

Working on type 2 dimension in 2014 visual studio

Actually , for historical record I have to update End date as Updated Date where end date is Default date '2099-12-31'and for new record with same id , have to insert with Default date '2099-12-31'.But...

View Article


Help - Sql update commands being reversed

Hi, Can you help me please? I'm running a update on a table and it appears to work. But when I check the data about 10 mins later it has been reversed back to the original form! Any ideas/suggestions...

View Article


last exected date for stored proc

Hi All, Is it possible to find out the last executed date for any stored proc in the database using system tables or writing any other query.Thanks.

View Article

Clarion Date Conversion

The database for our software stores dates and times in clarion format. I'm trying to write some custom reports in T-SQL and I need to convert these dates but it's giving me a lot of trouble. How do I...

View Article

Indexed View not being used for Partitioned Clustered Columnstore Index

I am trying to use an indexed view to allow for aggregations to be generated more quickly in my test data warehouse. The Fact Table I am creating the indexed view on is a partitioned clustered...

View Article

multi-part identifier could not be bound

Greetings Everyone,I scoured the forum and internet trying to figure out what is wrong with this query. Aside from it being hard on the eyes I cannot pin point the error. I know it is complaining about...

View Article


Concatenating rows in a select horizontally...

Hi, Can you help me please? I'm using the SQL indicated below:[code="sql"]SELECT DISTINCT C.Field1 As 'Group', A.Field2 As 'Security Object' E.Field3 As 'User'FROM TableA AS AJOIN TableB AS B ON B.key1...

View Article

Persisted computed column not acting very persisted...

The short version of the story is this...I have a Column called "BillID" that is a VARCHAR(20) data type. A typical value looks something like this... A6304158-2The problem is that the numeric portion...

View Article


Best way to find how much of my partition filegroup contains data?

I have partitions that I have filled with data. I am not trying to figure out exactly how much data the partitions contain, and therefore I will be able to see if any of them are close to hitting their...

View Article

Dynamic trigger logging

I would like to have a dynamic trigger on INSERT, UPDATE and DELETE. (each their own trigger).What i want, is the trigger to log what has happened with the record. For the insert trigger, i would like...

View Article


Trying to calculate running difference in values between days

Hello,I am trying to write a query to calculate the running difference between data on different dates. Below is what my table of data looks like. Basically I want to calculate the difference between...

View Article

SSMS 2014, Visual Studio 2013 and Windows 10 insights?

I work for a small company that hasn't been accustomed to thinking about how desktop upgrades may affect the functionality of SSMS, Visual Studio (used by me for SQL Server administration, and SSIS and...

View Article

Problems with duplicates

HiI am having some problems coding with sql. Very new at this. I'm using sql server 2014.Anyway, I want to clean my table which have seveal duplicates in the name column. ID Tr Namn Säsong Lag date...

View Article
Browsing all 3145 articles
Browse latest View live