Viewing 15 posts - 1,651 through 1,665 (of 7,614 total)
Is it possible that OPERATION is a view (or synonym) and not a table?
April 26, 2021 at 8:42 pm
Did you run the SELECT by itself to make sure you get results from that?
SELECT c.name
FROM sys.tables t
JOIN sys.columns c ON t.object_id = c.object_id
WHERE t.name...
April 26, 2021 at 8:41 pm
I think this is a form of Gaps and Islands (term coined by Itzik Ben-Gan? maybe?). It's rather traditional in G&I to use the name "grp", so I stuck with...
April 26, 2021 at 8:36 pm
Yes, only 1 OUTPUT clause. My best suggestion is to use CASE for every column. You can generate the CASE statements from the table definition so you don't have to...
April 26, 2021 at 12:21 pm
Just now noticed the Postgre sql qualification. I answered for SQL Server; code may or may not work on Postgre.
April 26, 2021 at 2:42 am
For (1):
SELECT GUEST.GUESTID
FROM GUEST
WHERE GUEST.GUESTNAME='John %' /*space added because don't want name 'Johnathan' or 'Johnny'*/ AND
EXISTS(SELECT 1 FROM BOOKING WHERE BOOKING.GUESTID=GUEST.GUESTID AND...
April 26, 2021 at 2:41 am
This ends up being a very complex task. There are a number of threads about it on this site.
Here's a doozy (from history): Claus Philipp Maria Justinian Schenk Graf von...
April 22, 2021 at 11:18 pm
An alternative:
SELECT
Field0,
CASE WHEN Field1_with_Field4 <> '' THEN Field1_with_Field4 ELSE Field1_without_Field4 END AS Field1,
CASE WHEN Field1_with_Field4...
April 22, 2021 at 11:14 pm
USE [DB_XYZ];
GRANT EXEC TO [MyDomain\User_1]
That includes system procs, of course. If you prefer, you can do this:
GRANT EXEC ON SCHEMA::dbo TO [MyDomain\User_1]
April 21, 2021 at 2:12 pm
I've started creating a separate deadlock extended event myself.
Here's an example of how to create a deadlock ext event. Naturally your WITH options may vary. You can then use SSMS...
April 19, 2021 at 9:58 pm
Data pages make up a clustering key. No data page exists outside a clustering key. if any data in a table with a clustering key is updated then...
April 19, 2021 at 12:01 am
(3) SQL does that itself, so that's only a very minor consideration.
I might be misinterpreting what you're saying above but,...
April 18, 2021 at 10:16 pm
Paul is certainly a worthwhile authority. I will study his article later. I did notice this quote, which was emphasized:
A clustered table will always produce full...
April 16, 2021 at 9:27 pm
Paul is certainly a worthwhile authority. I will study his article later. I did notice this quote, which was emphasized:
A clustered table will always produce full logging and...
April 16, 2021 at 9:27 pm
Viewing 15 posts - 1,651 through 1,665 (of 7,614 total)