How to extract overlapping date ranges from a table of date ranges
Would appreciate help and or hints to the following scenario::Magazine subscriptions are registered on a per subscriber basis with subscription id, subscriber id, start date, and end date.A subscriber...
View ArticleHelp to optimize a SP
Could you guys please review the attached Stored Procedure and advise if optimization is needed.I've attached the SQL plan.
View Article[Resolved] Issues with Building Packages Programmatically after Upgrading SQL...
Problem:We needed to upgrade SQL Server from 2008 R2 to 2014. In addition to using couple of static SSIS packages, we use SSIS packages that are programmatically generated by VB.NET component based on...
View ArticleUnable to start SSIS - missing Server Name
Hi all,I am new to SQL Server.Just now installed the SQL Server Express Edition and also Data tools.I am able to open Database Engine. However I am not able to Open Integration Services. It is asking...
View ArticleSQL Users and Password Policies
Hi Team,There is an audit requirement to extract all the users and their corresponding password policy. I used the below query however, I am not getting the password policy used. I would need help to...
View ArticleHow to "Date" help
I am looking to write a SQL query and use a dynamic date. I want the SQL to ALWAYS use 1/1 to 12/31 of the prior calendar year. So, if it is run at any point in 2016, it will return all results from...
View ArticleCreating CLR Functions in non-default dbo Schema
I have created several CLR functions which I have assigned to the schema 'fn', rather than the default 'dbo', via a post-deployment script.As far as I know, it is not possible to specify the schema...
View ArticleEncrypt Stored procedures !
Hi,I use encryption for my stored procedures but RedGate can decrypt it ! Whats the best way to encrypt objects securely?
View ArticleSelect From XML Feild
Hi I want to get "Volvo12" OR "Volvo43" From this field. <main> <purch id="14" ...="0"> <item id="449" ... /> <item id="450" ... /> <... > </purch> <invo>...
View ArticleGrouping On Different Fields
Hi,I have a aggregate query that calculates pass/ fail percentages. I want to be able to run it based on different groupings. Is there any easy way to do this other than writing a separate query for...
View ArticleRetrieving data per time interval help
HiI have a database table that records pH values from once per second.I want to retrieve the data per minute and group the data so that I know how many minutes per pH value over the course of the last...
View ArticleSELECT .. INTO to replace empty string or NULL value
I need a sanity check on some code I've written.I have a large table (more than 100 million rows) that needs an update on several columns. I decided to build a new table using SELECT .. INTO rather...
View ArticleText search without FULLTEXT....
Hi,I'm trying to implement a text search in a table's data...What I did was create a table (idRecord, word) with all the words of a record.I also have a function that brakes a string into to search...
View ArticleIssue Upgrading To SQL SERVER 2014
Hi allI'm working with an desktop application that uses SSRS to render the reports. The current version of sql installed is 2012 sp1. I'm testing the upgrade to SQL 2014 and almost everything works...
View Articlehttp://leorskincareblog.com/wrinkle-clearer/
The writing of relevant posts to your marketplace will set you apart and brand oneself as an expert within your industry. If you possess a cafe, publish cooking articles to assist your customers....
View Articlecurrent and time-expired rows.
In the topic:[url=http://www.sqlservercentral.com/Forums/Topic1760478-3412-2.aspx#bm1762255]overlapping date ranges[/url]ChrisM@Work suggested 'starting a new thread', this is the new thread.With the...
View ArticleUpdate with two date columns, need converting
I am updating Column2 with the year only from Column1. Since they both have DATE as data types, when I use the YEAR() or DATEPART() function they return an INT data type and therefore I get the error:...
View ArticleTry Catch doesnt work
Why Try Catch doesnt catch collation exceptions? How can I handle it?[code="sql"]BEGIN TRY IF '1' COLLATE Arabic_CI_AI = '1' COLLATE Arabic_100_CI_AI PRINT 1 SELECT 'ok'END TRYBEGIN CATCH SELECT...
View ArticleHow to develop a db diagram with Crow's Foot notation for 2014/2016?
Used to be that you could use Visio Pro 2010 to reverse engineer an SQL Server database and create a database diagram that uses the Crow's Foot notation. I have Visio Pro 2010 but it no longer seems to...
View ArticleWhy is it that NULL value will be automatically embedded in square brackets...
Hello all,I have encountered following problem lately:when an insertion script is done via [code="sql"]INSERT INTO myTable (col1,col2,col3) VALUES ('TEST1','TEST2',NULL) [/code]the value NULL will be...
View Article