Viewing 15 posts - 1 through 15 (of 595 total)
In response to both frederico_fonseca and ratbak
I am using global temp tables because I need to persist the data across SPIDs. The table in question is built from some highly...
June 6, 2022 at 2:17 pm
I miss Gail 🙁
I met her once. I picked her up from Birmingham international airport when she came over for SQLBITS one year. She is/was one of the most knowlegeble...
November 25, 2021 at 9:51 am
As helpful as ever Joe. It would be lovely if we could all live in the world of perfect 3NF data with proper entity identifiers and considered data types, unfortunately...
November 22, 2021 at 10:31 pm
I would also be asking WHY you need to re-insert it with the correct ColumnID record.
If ID contiguity (i.e. no breaks) is an audit requirement then you have just failed...
November 20, 2021 at 11:48 am
It really depends on whether you understand the consequences of NOLOCK. It can result in a 'dirty read' if there are uncomitted transactions in the database that affect the data...
November 20, 2021 at 11:27 am
Like Phil said, you should know better.....
Your table has no name
you have provided a table structure but no data
What is a PTO (I am assuming Period of Time Off)
Your table...
November 20, 2021 at 11:15 am
+1 for Scotts suggestion. Personally I prefer the COALESCE() operator over ISNULL. There are too many other places where the NULL word appears in syntax so I find COALESCE() has...
November 20, 2021 at 10:46 am
If you are doing an aggregation every field must be either an aggregation type or included in the GROUP BY.
If you don't want it aggregated then you will need to...
November 20, 2021 at 12:32 am
The Pedant in me yells back Common Table Expression.
Technically a CTE is a named query. But it is probably not in the context of the OP question
November 20, 2021 at 12:28 am
It's a conceptual thing. in SQL server a query is an ad-hoc thing that you write in Management Studio (or Azure Data Studio, or VS Code). Access doesn't have ad-hoc...
November 20, 2021 at 12:26 am
Don't forget that if you are looking for 30 days rolling you will need to inject missing dates so that they are contiguous as the BETWEEN is looking at row...
November 20, 2021 at 12:21 am
That sounds like a suitable temporary solution. If you are in discussions with the customer can you get the data format changed to either XML or JSON or even an...
November 20, 2021 at 12:16 am
This is one where you are probably going to have to make a tradeoff between performance and cognitivie load / maintenance costs. Your approach means than any changes in business...
November 20, 2021 at 12:11 am
Thanks Brian, I was being faceicous about the comments, I know it's not Microsofts fault 🙂
I didn't state the problem clearly enough. I am not trying to develop the code...
November 20, 2021 at 12:01 am
OK, you learn something new every day...
Just ran the create script for the index and it contains a WHERE condition.
CREATE UNIQUE NONCLUSTERED INDEX [IX_TableName_Current] ON [dbo].[TableName]
(
[Entity_Identifier] ASC
)
INCLUDE([AttributeField_1],[AttributeField_2]...)...
August 17, 2021 at 9:52 am
Viewing 15 posts - 1 through 15 (of 595 total)