5 Days past a specific date
Hi,I have a date in the future, I want to update a field if the date (now) is 5 days past that date.My code I have doesn't seem to work:Use LOGONs ALTER TABLE ServiceExpiryMatrix DROP COLUMN EXPIRED...
View ArticleHow to improve tthe performance of query having more inner joins?
Hello Everyone,I have an query in a stored procedure consisting of 10 inner joins including with two table variables and one hash temp table.The query output is 7500 rows. But the stored procedure...
View ArticleList tables from report
What is the best way to make a list of all the tables/views used in an SSRS report. Some reports that I am dealing with have very lengthy SQL statements in them with many nested SQL statements in them...
View ArticleMultiline select and count
I have a table:Users | Difficult ------------------------------ User 1 | Easy User 2 | Medium User 1 | Easy User 2 | Easy User 2 | Hard User 1 | Easy User 1...
View Articlesql server bulk insert blob filename parameter
My problem SQL script:declare @filepath varchar(100)set @filepath = 'E:\foto\1.jpg' INSERT INTO [dbo].[MsQuestions] ([TestCategoryID], [LevelID], [TestTypeID], [QuestionText], [QuestionImg])select 1 ,...
View ArticleJOB in Sql Server Agent should run multiple times.
Hi Guys,I have a ETL SSIS job in Sql Server Agent, Which should run multiple times. 1. For Example : I scheduled a job at 10:00 PM, If the job fails at 10:00 PM it should run automatically again at...
View ArticleInserting Distinct Rows from One Table Into Another
I have a really basic question and I've seen the answer on the forum but it isn't working for me. I have one table that has a lot of data and I want to copy the Distinct value of one column and...
View Articlesql server 2008 r2 install registry key error during installation
My sql server 2008 R2 installation fails with the following error.Could not write value to key/SOFTWARE. Verify that you have sufficient access to that key, or contact your support personnel.How can...
View ArticleCreate login to sql instance and then login from command line
Hi,I have a sql instance on my local machine and I want to login via the command line using a named user.I can login as the current user with "sqlcmd -S localhost"If I try it with a named user "sqlcmd...
View ArticleSQL Server 2014 Installation Problem
I run the setup file and hit the New Standalone Installation Of SQL Server. When i enter the license key and accept the terms of use and pass the Product Updates and Install Setup Files, i see a...
View Articlehave problem with stored procedure
Basically, I would like to retrieve the SES10 from the table dbo.ses2010_blk$ when it matches both the input parameters of census2010 and the blkgrp. I wrote this stored procedure and it executed...
View ArticleQuestion about MS SQL Server 2012 License on a server (renting/buying)
Hi, I am currently paying about $300 per month to the hosting company for the MS SQL 2012 Standard Edition (for 4 cores) on my server, my question is, can I just buy MS SQL 2012 STD outright ( for...
View ArticleHow Is It That Views Can Be Indexed?
I'm told a view doesn't take up space in a DB. In that case, it's just a query (compiled SQL), right? And if it's just a query, how can it be indexed? And if it's just a query, how can it have a...
View ArticleSQL Server Service can't start.
I was try start SQL Server Service in SQL Server Configuration Manager and it prompt out error 'The request failed or the service did not respond in a timely fashion.Consult the event log or other...
View ArticleHas anybody used the Tool in Visual Studio 2013 to create a database and...
Microsoft Visual Studio Professional 2013 Version 12.0.21005.1 REL Microsoft .NET Framework Version 4.5.51641 Microsoft Web Developer Tools 2013 2.0.40926.0 SQL Server Data Tools 12.0.30919.1...
View ArticleDelete Unnecessary SQL Server and Visual Studio Files
I just downloaded SQL Server 2012 and Visual Studios 2012. I want to know which of the files downloaded I can delete that won't affect the program itself. For example, the files that have 2008 and 2010...
View ArticleHow to convert string to an integer in SQL Server 2008
Hi All,How to convert string to an integer in sql server,Input : string str="1,2,3,5"Output would be : 1,2,3,5Thanks in advance.Regards,Sunil
View Articleapplication timeouts while DBCC CHECKDB is running
Hi All,There is a maintenance plan for checkdb that runs at 11pm on Saturdays for our ABCD database. This typically takes under 5 hours. We see quite a number of timeouts in our application which...
View ArticleCalling all SQL Server Gurus! Now is your time! Step up and be counted!
Dear clever clogs and smarty pants!We need YOU to lighten up our dark evenings and warm our hearts with your TechNet Wiki articles!Yes, it's THAT time of the month again, submissions time!September has...
View ArticleWhy does this SP return a value?
I don't WANT this SP to return any values.In my C# app I'm running the SP as int recordsAffect = cmd.executeNonQuery(); Throws an exception because the SP is returning a string. My guess is that the...
View Article