Viewing 15 posts - 4,141 through 4,155 (of 5,111 total)
March 3, 2017 at 6:11 am
The following works:WITH Groups AS(
SELECT GG.groupname,
GT.guidREP,
GG.guidID
FROM GuidGroup GG
JOIN GuidTable GT ON GG.guidID = GT.guidID)
SELECT G.groupname,
March 3, 2017 at 4:49 am
Ok, what would you return if a GROUP had 3 GUID's related to it, of which 1 had a value of NULL?
Say for example Guid1 had a value...
March 3, 2017 at 4:08 am
Thanks for providing DDL and sample data. Can you explain why group 1 returns Alex twice, and group 2 John? What is your logic?
March 3, 2017 at 3:46 am
That
March 3, 2017 at 3:22 am
March 3, 2017 at 3:10 am
Table variable aren't great. Regardless of how many rows you're going to INSERT into them, the query planner will always estimate the number of rows within the table as 1....
March 3, 2017 at 2:35 am
I would firstly get your data into something of a usable format. I've used a WITH statement, but I advise actually updating your table structure. I'm also assumed that the...
March 3, 2017 at 2:08 am
Testing the following on both SQL Server 2016 Dev (Windows 10), and SQL vNext (Ubuntu 16.04.2) returns what I would expect:
Msg 208, Level 16, State 1,...
March 2, 2017 at 11:52 am
Hugo Kornelis - Thursday, March 2, 2017 8:45 AMWho is General Failure, and why is he reading my hard disk?
This reminded...
March 2, 2017 at 9:12 am
My situation is similar. I have a good number of inactive users that need...
March 2, 2017 at 9:03 am
select*
into new_table
from old_table
But received this warning :
Warning: Null value is eliminated by an...
March 2, 2017 at 8:45 am
Try:USE [WorkLSC];
GO
SELECT *
INTO [DBO.T_NEWTABLE]
FROM [WorkLSC].[dbo].[vw_OLDTABLE];
GO
Note, however, it is terrible practice naming a table with the prefix "DBO.". I would suggest...
March 2, 2017 at 8:41 am
CREATE TABLE #Metrics (MetricID VARCHAR(5),March 2, 2017 at 7:34 am
Well... I have a solution, it's dirty, it's not pretty,it's probably got an hideous query plan, but for the 2 examples you gave, it works. If you ever have more...
March 2, 2017 at 7:13 am
Viewing 15 posts - 4,141 through 4,155 (of 5,111 total)