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

Better Suggestion For Paging ?

We have This Query : SELECT * FROM VW_1 WHERE F1 Like '%|13|%' ORDER BY F2 DESC OFFSET (1 - 1) * 10 ROWS FETCH NEXT 10 ROWS ONLY SELECT ceiling(COUNT(*)/10.0) as pagecounter, COUNT(*) as itemcounter...

View Article


Help counting rows

I need some help with a select statement joining file1 to file2. File 1 may have 0, 1, or many corresponding rows in file2. I need to count the corresponding rows in table2. Table2 also has a Boolean...

View Article


Correct index strategy for BETWEEN

Two tables:GeoIpLocation (Id, City, Country, Latitude, Longitude; PK: Id; 2m rows)GeoIpBlock (IpFrom, IpTo, GeoIpLocation_Id; PK: IdFrom, IdTo; 100k rows)Simple concept: get location for given IP....

View Article

Error running Stored procedure from SSIS runs fine in SSMS

I have simple query which creates tables by passing database name as parameter from a parameter table . SP1 --> creates databases and calls SP2--> which creates tables . I can run it fine via...

View Article

sp_MSForEachDB

I'm trying to use sp_MSForEachDB to return a list of all members of role db_owner which are not 'dbo'.This is what I have so far and is returning the same dbname for all result sets returned rather...

View Article


SSIS 2014 Sharepoint List Destination

We are just looking to move to SSIS 2014 from 2008R2 however we have a number of packages which write to Sharepoint lists. The SHarepointDestination doesn't seem to work in VS 2013 has anyone come up...

View Article

Doubt about logic in T-SQL

Hey All.I need some help with T-SQL. I've been struggling for many many hours with it and it is pissing me up.I can't use loops, cursors, etc. This is because I need high performance.I would be very...

View Article

SSMS with RUNAS – trapping failed network logon

I'm sure that a few of you use this command to open up an SSMS instance for accessing databases in domain [domain] using Windows authentication:[code="other"]runas /user:[domain]\[username] /netonly...

View Article


Gain Muscle And Burn Fat With Testosterone

Alpha Limit be liberal feeling pale and lifeless. Eventually, your muscles present lessen and disappear gone, leaving you without any strength definition or vigor. It's surprising how rapid your...

View Article


SSIS Package

Hi to all. I was unsure which form to post to for this question so as the backend is SQL 2014 I opted for this one :)I created an ssis package to output a file which is then sent by FTP. This all...

View Article

T-SQL Pivot

Hi -I am trying to pivot my data results so that instead of showing multiple rows for each product a client has it will show one line for each client and concatenate all of their products together. For...

View Article

Convert a mySQL Database Schema to a MS SQL script - Creating a database

Hello,I have a mySQL Schema that I want to use to create a MS SQL script.My problem is that I don't understand everything that is in the schema so it's kind of hard to translate to MS SQL.Hopefully...

View Article

Query plan for partitioned views not running as they should.

I've been using partitioned views in the past and used the check constraint in the source tables to make sure the only the table with the condition in the where clause on the view was used. In SQL...

View Article


Cross Applied

I am trying to create a query where I use ISNULL once with the first select statement and than use cross apply to create the column I really want, however I am getting a error message of 102 from SQL...

View Article

Unique Index

I am trying to create an unique index on the following table that stores relationship information between two persons with constraints where [code="plain"][size="1"][end_date] IS NULL OR [end_date]...

View Article


replicating tables who are reference by indexed views w data binding

when i do a snapshot i have it set up to truncate before insterting. As a result i'm getting an error saying that it cant truncate a table reference in an indexed view. What settings should i use to...

View Article

Truncate table failing (intermittently), no errors presenting.

I have a basic load proc (loading a staging area.) that truncates a target table just before inserting fresh data in said table, all wrapped in a distributed transaction. What happens (only with...

View Article


Problem with Flat file connection manager

Hi all,I have to eliminate comma in last field of a file in flat file connection manager. when I check the source file I didn't see any commas but it appear in connection manger as shown in SSIS...

View Article

High Availability Replica

Hi,I know it is possible to use the secondary replica to pull data (application intent) etc..But is there some way to query the replica directly via SSMS?

View Article

Error in adding condition in sql query

Message PreviewHi following is a working code[code="other"]declare @dte as datetime='2015-04-01'declare @StDt as Datetime = DATEADD(mm,DATEDIFF(mm,0,@dte), 0)declare @EnDt as datetime = DATEADD( DD,...

View Article
Browsing all 3145 articles
Browse latest View live