Viewing 15 posts - 706 through 720 (of 7,191 total)
Why would anyone do that?! I think it's going to be messy. You can use the sys.sql_modules catalog view to find all objects that have the word "customer" in their...
July 30, 2018 at 6:58 am
Lynn Pettis - Tuesday, July 10, 2018 9:21 AMwhy test both MIN and MAX to be the same?
Because Open...
July 10, 2018 at 9:26 am
SELECT
PartNo
, MAX(Status) AS MaxStatus
, MIN(Status) AS MinStatus
FROM Parts
GROUP BY PartNo
HAVING MaxStatus = 'Open'
AND MinStatus = 'Open'';
John
July 10, 2018 at 9:15 am
Yes, you can do that, but you have to use "LIKE" instead of "=". What are your expected results?
John
July 6, 2018 at 8:17 am
Here's a rewrite of your query. You should be able to see how to easily extend it to include the other values.
SELECT DISTINCT
caseid
July 6, 2018 at 4:52 am
It could be the Greek character thing. Try this:
EXEC master.sys.xp_dirtree N'\\MNG01\Scans\05083-???????S?\ALL\',1,1;
John
July 6, 2018 at 3:40 am
Yes. Usually applying a CU or service pack causes at least one restart of the SQL Server services.
John
July 5, 2018 at 7:36 am
This should work, provided you make the new int columns not nullable. I recommend you do this at a time when there's no activity on the tables in question.
July 5, 2018 at 2:38 am
Sounds like your backup file isn't a valid backup file. Are there any backups you can restore from? Do you verify your backups when you make them, or use the CHECKSUM...
July 4, 2018 at 1:02 am
Cat
What statement are you using to attempt your restore? What do you get if you run this:
RESTORE HEADERONLY FROM DISK = 'Z:\Backups\VSSQL2\Backupfile.bak'
John
July 3, 2018 at 9:40 am
Presumably Name1 and Name2 aren't unique in their respective tables? What happens if you pass in a value of Name1 or Name2 that returns more than one value of ID? ...
July 2, 2018 at 1:51 am
What do you get if you run this?
SELECT
entity_name
, subentity_name
, permission_name
FROM fn_my_permissions ( TableName , 'OBJECT' )
John
June 25, 2018 at 2:07 am
You only need one CASE expression:CASE
WHEN FEB_CREDITS <> 0 THEN FEB_CREDITS
WHEN JAN_CREDITS <> 0 THEN JAN_CREDITS
WHEN DEC_CREDITS <> 0 THEN DEC_CREDITS
WHEN NOV_CREDITS <>...
June 18, 2018 at 3:16 am
June 15, 2018 at 9:06 am
We need the actual execution plan, please - you've posted the estimated plan. How many rows are in your temp tables?
John
June 15, 2018 at 5:45 am
Viewing 15 posts - 706 through 720 (of 7,191 total)