Viewing 15 posts - 1,711 through 1,725 (of 13,849 total)
What is the problem? Can you be more specific?
November 27, 2021 at 11:54 am
I can't see any easy way of accommodating scenario four in a MERGE, because MERGE does not allow an INSERT in the case of a match.
You could experiment with changing...
November 25, 2021 at 1:23 pm
Sorry my mistake trn.year is decimal. I can not change it. Is it not possible to filter the year in Case statement?
No.
CASE is an expression, which returns a result....
November 25, 2021 at 1:06 pm
The query 'brings all the data' because you are not filtering any of it out. If you wish to filter out data, use a WHERE clause.
I asked you about TrnYear,...
November 25, 2021 at 11:22 am
As an aside, as you're using SS 2019, I suggest you start using STRING_AGG() rather than the legacy FOR XML PATH method.
Makes your code much easier to read.
November 24, 2021 at 2:58 pm
OK, so now you understand why you did not get 'NOTPRIMARY', I assume?
November 24, 2021 at 2:35 pm
StatusId is in dbo.Revision, so I think you'd need to adjust slightly to something like the following
Well spotted, thanks for fixing that up.
November 24, 2021 at 2:33 pm
If you run just the inside part of the query, as follows, what result do you get:
SELECT CASE
...
November 24, 2021 at 1:12 pm
Many thanks for your considered and interesting reply.
I have just run your code and I get the same number of documents exported.
Can we recap on exactly what the problem...
November 24, 2021 at 1:01 pm
Try this:
CREATE TABLE T
(
title VARCHAR(100) NOT NULL
,Computed AS
REPLACE(
...
November 23, 2021 at 3:48 pm
By the way, your query is far easier to read if it is formatted and presented inside a code block, like this:
SELECT DISTINCT
...
November 23, 2021 at 3:30 pm
First, note that your CASE expressions do not filter any data out. To do that requires a WHERE clause.
Let's be more specific and focus on DailycheckHome, for example.
First of all,...
November 23, 2021 at 3:27 pm
Thanks, Phil for kind words. In my query I have been trying to filter following options but I know the query does not filter when I use a.TRNyear=2022 or...
November 23, 2021 at 12:29 pm
I have created a query but not filtering properly. for example and I like to show it on the report where I have struggles it so far.
What is your question?...
November 23, 2021 at 10:41 am
Those are not INTs!! Change the target datatype to DECIMAL and you should have more success.
November 22, 2021 at 4:59 pm
Viewing 15 posts - 1,711 through 1,725 (of 13,849 total)