Viewing 15 posts - 361 through 375 (of 6,036 total)
It's hard to be specific with an advice without knowing how the procedure is built.
but generally speaking - you can include any value of any variable you're interested in while...
August 11, 2020 at 5:03 am
It's not about catching errors, it's about displaying the status of the process in the message tab without disrupting the execution.
After the execution is completed you may scroll through the...
August 11, 2020 at 1:25 am
Use RAISERROR with severity 0 (not actually raising any error, just printing a message) to display the state of affairs inside the procedure at any stage of execution.
That's how it...
August 11, 2020 at 1:00 am
Is it a part of a transaction opened somewhere in the application code?
a transaction which includes UPDATE and/or DELETE statements in line with that SELECT.
Because you have an "X" lock,...
August 10, 2020 at 8:05 am
I cannot see how <blocking-process> stands on the way of <blocked-process>.
Both queries apply shared locks, so, they should not block each other.
Can you find what is waitresource in the 1st...
August 5, 2020 at 10:32 pm
Yes, it works, it's easy enough to write code to prove it:
;with tbltest as (select cast('ab012' as varchar(5)) as TestNumber) select * from tblTest where TestNumber = cast(20012 as...
August 5, 2020 at 9:53 pm
Here is the full scenario:
You run the following query:
select * from tblTest
where TestNumber = 20012
The query output window displays the following error: "Conversion failed when converting the varchar value...
August 5, 2020 at 9:43 pm
It's not a problem for the number used in the question.
And there is no indication how a number "1234" would be correctly represented in tblTest. May be '01234' is not...
August 5, 2020 at 3:00 pm
I don't think it's a bug.
When you misuse partitioning and create daily or weekly partitions you end up with hundreds or thousands separate indexes created for every partition. Overhead of...
July 29, 2020 at 4:00 am
Numeric values take at least 5 bytes: starting with 4 bytes of metadata (defining the numeric type) followed by as many as necessary bytes of the integer representation of the...
July 27, 2020 at 5:10 am
And try to get rid of daily partitioning. With clustering on date it only adds to overheads without providing any advantage.
July 26, 2020 at 1:51 am
There is no point having a clustered index on date and id a non clustered index on date - they duplicate each other.
On the old version of the server you...
July 26, 2020 at 1:49 am
Afaik the OP didn't state the end dates couldn't be in the future.
He kinda did. Right here
Any other explanation why the splitting ends...
July 26, 2020 at 1:37 am
With a Calendar table in place it seems to be easier:
select DS.*, C.Date, EOM,
CASE WHEN ds.StartDate > C.Date then ds.StartDate ELSE c.Date END SplitBegin,
case when EOM...
July 24, 2020 at 7:26 am
Set End_Date = ISNULL (Deceased_date, End_Date)
July 23, 2020 at 9:17 am
Viewing 15 posts - 361 through 375 (of 6,036 total)