Null value column should take the value of the record which is above it.
Hi Friends,I have below scenarioidNameLname1abcabc12NULLabc13pqrpqr14NULLpqr15NULLpqr1could you please provide a query to get values like belowidNameLname1abcabc12abcabc13pqrpqr14pqrpqr15pqrpqr1Which...
View ArticleUSing MAX in SQL query
I have these values on my table:FIPS LoadDate RecDate1 10/1/2005 2/1/20051 12/3/2006 2/10/20051 3/10/2005 3/2/2005 <=====I want to pull this recordThis is my...
View Articlemaster detail insert sql server 2008
Friends...I want to insert the data in to master and detail table....i tried the below query...the master part is ok...its inserting...but the detail part i am confused....not able to store the...
View ArticleFIll in missing months
I am querying a table that includes the rider id, the date of the ride and the distance. Problem is that they may not have ridden I In a given month, so I want to include that month with a distance of...
View Articlehow to find All names of the Father with the Son and show it in the order ?
I have more of 150,000 Row in Fullname ,Example : Before FullName jon acersham rat kasmalo haikdosk kam samjon acer dosk kamrad...
View Articleplease suggest good books on sqlserver trnsactions or cuncurrcay
Dear all, please suggest me some good books or links on trnasaction processing or cucurrecnyyours sincerely
View ArticleHow can i select the step count of a recursive CTE ?
I want to select the step count of this query (which one is do fiirst and continue + 1) from query below;WITH EmpCTE( BomID , empid, mgrid,BomMgrId, lvl, Qty , FLG) AS ( SELECT BomID , empid ,...
View ArticleTable inheritance in SQL ?
Is there a table inheritance in SQL ?I need to make two tables which are identical :1. Recharcheable battery2. Primery BatteryIs there a way to make a 'Battery' Table and create the 1 and 2 tables...
View Articleprovider: TCP Provider, error: 0 - No connection could be made because the...
hi all,i want to connect to server side from client , i am using sql server 2008 sp1 and os winn 7 64 bit, but it give me an error as above.also i tried this...
View ArticleT-Sql query
Hi All,I am looking for a query for a certain scenario mentioned below.I have a table person and the query below shows the Original Result.I am looking for a query that would populate result as shown...
View ArticleType-2 dimension check condition
I am using a MERGE with OUTPUT wrapped inside an INSERT to do a typical TypeII table insert update.In the merge statement, where I need to check if any of the attributes have changed, I will gave...
View ArticleError in merge statement when trying to impliment SCD type 2 using merge...
Hi , I'm trying to impliment SCD type 2 using Merge using below blog as reference but sime how it is erroring out with...
View Articleget unique sort result ids
ID SORT 2000001 1 2000054 1 2000161 1 2004102 1 2000126 8 2000161 8 2004102 8 2000001 51 2000054 51 2000161 51 2004102 51 2000126 58 2000161 58 2004102 58 Output ID SORT 2000001 1 2000054 1 2000161 1...
View ArticleTSQL Help needed using time datatype
i have a requirement to get the appropriate RunID based on the Starttime.I'm not able to get results if Starttime is beween 00:00 and 05:00 for ABC Dataset. Please...
View ArticlePlease tel me which one is good approach of joining.
Dear all, Table_2 has following datac na----------------7.000k 3.000j 32.000gTable_1 has following datac na----------------1.000l 2.000m 34.000hna is primary key for both...
View ArticleHow to make an application update data in SQL Server Database
Hi guys, do you know of any free software out there which I can use to practice queries on, such as add data in the software and to make that data update automatically in the SQL Server Database I...
View ArticleRemove Parent Node if child node contains in xml
Hi All,I have this data.declare @xml xml set @xml...
View ArticleSpread the Love! Be our T-SQL TechNet Guru, this Valentine's
TechNet loves you! We love your contributions at TechNet Wiki sooo much that we give you more than just love in return...We give you NOTORIETY, GLORY... and VIRTUAL MEDALS!That's not all, this love we...
View ArticleArithmetic overflow error converting expression to data type int When...
Hello, everyone,I encountered the error :"Arithmetic overflow error converting express to data type int" when updating a table as follows:UPDATEt1SETt1.Count1 = t2.Count2FROMTable1t1JOINTable2...
View Article