Viewing 15 posts - 31 through 45 (of 747 total)
' A' is not equal to 'A' -- leading space in the in example):
SELECT * FROM #Results
WHERE 1=1 AND [Column1] in ('A') AND [Column2] = 'B'
January 8, 2025 at 10:25 pm
What discrepancy?
Both queries should return nothing (if AnotherColumn is in SomeView), since AnotherColumn can't equal both 'XYZ' and '1'.
Is the leading space intended in 'XYZ'?
Negated/clarified by example
January 8, 2025 at 10:14 pm
The change in database focus only occurs within the scope of the dynamic sql session. Your "outer" session is still using whatever database you were using prior to executing sp_executesql.
December 23, 2024 at 9:52 pm
You could use a parameter to let user choose server, & programmatically derive the connection string & dataset. See links below
Or -- not recommended -- you could embed all 100...
December 5, 2024 at 7:26 pm
They are probably right. There is probably no value in that column (not to mention the ambiguous "ID" name) unless you are using an ORM or other tool/framework that insists...
November 26, 2024 at 10:10 pm
What do you mean by "Update routine"? A stored procedure? A script? Or ORM or other C# code
If SQL code add something like
SELECT @@ROWCOUNT AS UpdatedCount
directly after...
October 29, 2024 at 3:16 pm
Just exclude first_name & last_name from the constraint -- per your new requirement, they are no longer part of the definition of unique. e.g.,
CREATE UNIQUE INDEX ix_unique_email
ON...
October 2, 2024 at 2:43 pm
4 versions of this post -- reply to https://www.sqlservercentral.com/forums/topic/between-datetime-statement-not-working-4 which seems to be the one being updated.
October 2, 2024 at 2:28 pm
4 versions of this post -- reply to https://www.sqlservercentral.com/forums/topic/between-datetime-statement-not-working-4 which seems to be the one being updated.
October 2, 2024 at 2:28 pm
4 versions of this post -- reply to https://www.sqlservercentral.com/forums/topic/between-datetime-statement-not-working-4 which seems to be the one being updated.
October 2, 2024 at 2:28 pm
If it is truly indexed appropriately (and filtered indexes may be a part of that), then none of the other approaches may be needed to maintain performance at that level.
What...
September 9, 2024 at 1:50 pm
@pitterson's response looked like it was ChatGPT-generated (especially given it was a new user)
August 22, 2024 at 3:14 pm
What is the transaction isolation level for the database? I haven't found yet the default used by Powershell.
August 14, 2024 at 1:22 pm
Viewing 15 posts - 31 through 45 (of 747 total)