Viewing 15 posts - 1,246 through 1,260 (of 4,087 total)
February 12, 2018 at 3:10 pm
February 12, 2018 at 2:47 pm
SELECT *
FROM sys.dm_sql_referencing_entities(<YourTableNameHere>, 'OBJECT')
Drew
February 12, 2018 at 1:41 pm
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...
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...
February 12, 2018 at 12:24 pm
February 12, 2018 at 12:13 pm
When...
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...
February 12, 2018 at 11:51 am
February 12, 2018 at 10:06 am
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...
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
February 12, 2018 at 7:43 am
February 10, 2018 at 8:43 pm
Viewing 15 posts - 1,246 through 1,260 (of 4,087 total)