All Questions
3 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....
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....
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 ...