Create Index Script with Fill Factor Question
I was looking for a t-sql script to create all the indexes on a database. I found the following link which provided a goo
View ArticleCREATING A 2ND TEMP TABLE BASED ON THE CONTENTS OF 1ST TEMP TABLE`
#temp_1 returns 50,000 with probably 3000 unique part numbers.Now i need to make another temp table from our pricing table that has MILLIONS of parts with many different change dates.I want temp_2 to...
View ArticleFinding Max and update
Hi , I have a scenario and need some idea to build that.i have a table where multiple stat-codes exist with different part-no with diff dates.I need to Get the maximum dates on each stat-codes and...
View ArticleOdd Join Scenario
I wasn't sure how to search for a solution this scenario. So I'm posting it here hoping for some help. I wouldn't be surprised if it's a simple solution that I'm overlooking. :) [code language="sql"]
View ArticleCan i put a select in an ISNULL Statement?
crude example,the REAL price might not be in DBO.RealPrice,but it will be in DBO.OLDPRICE.Can i do something like this:Selectyada A,yada B,,ISNULL(RealPrice, Select OLDPRIOE from DBO.OLDPRICE...)trying...
View ArticleNeed help setting cascade on delete
Hello,I have a hierarchy of tables in my database. They look like this:--Reports----ReportMetrics----ReportTopN----ReportCommentsThat is, a one-to-many relation exists between reports and...
View ArticleIntroducing FOREIGN KEY constraint may cause cycles or multiple cascade paths.
Hello,I'm encountering an error when trying to deploy my database. The error says:"Introducing FOREIGN KEY constraint 'FK_ProjectRecommendation_Project' on table 'ProjectRecommendation' may cause...
View ArticleSSIS Package and SQL Server Agent Job Failure - Fails at Data Import control...
Hi, we have an application that has not been changed (no new check-ins) for months. We also did not change the SQL Server Agent job. Recently, there was a move of some databases to a different server,...
View ArticleSQL Server 2014 Reporting issue
I am Configure SQL Server 2014 Reporting server. and i Developed and Deploy Reports using visual Studio 2013 and access these reports by using asp.net mvc application and ReportViewerWebForm.aspx as a...
View Articledateadd(day, max(field1) % 1000, dateadd(year, floor(max(field1)/1000),...
Hello can someone help me to format this code as text ?Thank you so muchT
View Articlehow to open view on inserting values
Hello I am trying create view, when I run it it will ask for values, I enter and it will search for data,here is my code I cant figured out what I am doing wrong, I get errorincorrect syntax near...
View ArticleInsert a data in MS Sql Server Managment studio thorugh php
Hi,I am using MS SQL server management through PHP. I have already connection successful but the problem is when I am going to insert data into a table through Excel sheet with the help of PHP. So it's...
View Article2000-11-28 00:00:00.000 how to convert this to text format
Hello can some one help me to convert this to text format dd/mm/yyyythank you so much
View Articlenull date parameter for a stored procedure
I have a stored procedure that has a parameter of date named dateStored.The default value is null.In the stored procedure I have a merge statement that the select part has a filter like this:where...
View Articlerunning trigger before deletion
Hello,I have a table called Consequences. I have another table called RiskMatrixAxis. The Consequence table has several foreign key references to RiskMatrixAxis. I'm trying to settup a delete trigger...
View ArticleRegarding Installation from MSSQL serve 2014 to SSIS, BIDS
Hi everybody,I am looking for step by step whole installation of MSSQL server 2014 database and SSIS, BIDS tools. I am looking help for following quest-1. Which application edition should i installed...
View Articleusing IF and ELSE if to tell SSMS to jump to that section of code
USE GTM_ODSFirst, i declare the variable and set it . . . . DECLARE @FTA VARCHAR (10)SET @FTA= 'Korea'IF @FTA = 'Korea'Select...............known good code........................etcELSE IF @FTA =...
View ArticleUsing a Case Statement to see if a Date is in the previous month or not
For a crazy calculation I need to do (it's part of a conditional across many fields) I need to see if the date was in the previous month or not.GOAL: To see if the c.PricingDate was last month or not...
View ArticleI'm struggling to update records from the result query
I'm doing validation, comparing if two tables have the save rows and result using except and intersect function.If the except function produce results I was to update only the records that doesn't...
View ArticleAdd Auto Incremental to existing column
Somehow when adding a table from another database there was no PK or Auto Incremental column set, now I would like to create a PK and set this column to auto incremental.I was able to get the PK set to...
View Article