Skip to main content

All Questions

0 votes
1 answer
36 views

Turn a delimited field of ids into their pretty values - Are nested replaces the best option?

Considering the following two tables Clients ID CLIENT_NAME 1 Adam 2 Steve 3 Jack 4 Harvey Products NAME CLIENTS A 1,2,3,4 B 1,3,4 C 2 D 1,3 How can I make a query that will replace the Products....
Tyler N's user avatar
  • 301
0 votes
1 answer
233 views

SQL Server Fill Month Gaps in Groups

I have a table for example like below: declare @test table(Aid int, Bid int, CheckMonth date, Avalue decimal(18,2)) insert into @test (Aid, Bid, CheckMonth, Avalue) values (1, 4, '2014-07-05', 123....
ausmod's user avatar
  • 71
3 votes
1 answer
341 views

TSQL - Add missing dates

I have a query that results in the table shown below: select * from (select [iKey], [StartDate], [FirstFCDate] from (SELECT [iKey], min([Date]) as [FirstFCDate] from dbo.factFC group by [iKey]) as gp ...
SUMguy's user avatar
  • 1,673