Viewing 15 posts - 1,246 through 1,260 (of 4,085 total)
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 3:10 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 2:47 pm
SELECT *
FROM sys.dm_sql_referencing_entities(<YourTableNameHere>, 'OBJECT')
Drew
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 1:41 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 1:39 pm
I think this captures everything.
;
WITH DeliverySites AS
(
SELECT *,
STUFF(
(
SELECT ',', DeliverySite AS [text()]
FROM #MyTemp sub
WHERE main.POID = sub.POID
ORDER...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 12:55 pm
Instead of doing a crosstab/pivot, you can also just use a HAVING clause with the correct criteria.
SELECT [Param]
FROM #mytable
GROUP BY [Param]
HAVING MAX(CASE...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 12:24 pm
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 12:13 pm
When...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 12:12 pm
This looks like an EAV table. Storing things in an EAV table makes it much harder to query. You can use Cross Tabs and Pivots to change...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 11:51 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 10:06 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 9:54 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 9:26 am
Another example of people not supplying nearly enough information. I got an email from someone saying that I met the qualifications for a job at their company and wanting to...
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 9:24 am
Use a CASE expression.
select DEP_Code, DEP_Name, cast(0 as bit) Favourite,
case
when DEP_Code = 'ACHR' then 7
when DEP_Code = 'IT' then 8
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 12, 2018 at 7:43 am
J. Drew Allen
Business Intelligence Analyst
Philadelphia, PA
February 10, 2018 at 8:43 pm
Viewing 15 posts - 1,246 through 1,260 (of 4,085 total)