Viewing 15 posts - 1,741 through 1,755 (of 6,036 total)
My advise - create a static Calendar table:
N int,
[Date] date,
DayOfWeek tinyint,
WeekNumber,
LastWeekdayOfMonth tinyint
etc.
Whatever property of a date you may need in your Scheduling tool.
Populate it once, using Tally table.
Calculate and store...
December 23, 2015 at 6:05 am
Jason A. Long (12/22/2015)
I'm not certain that it's actually representative of a real, possible situation.
I was tending to say it's not a real situation, therefore I took it out of...
December 22, 2015 at 6:04 pm
ScottPletcher (12/22/2015)
But when it's a hard-coded literal
If it's in production code - the developer who did it must be sacked.
If it's in a dynamic SQL - you...
December 22, 2015 at 4:56 pm
I'd suggest some changes to the design:
CREATE TABLE [ClientApptSeries](
[ID] [int] IDENTITY(1,1) NOT NULL, -- it's good to have a unique ID to use it in JOINs
[ClientID] int NOT NULL,...
December 22, 2015 at 4:45 pm
What is the difference how fast your query returns a result if you cannot be sure if it's correct?
December 22, 2015 at 3:48 pm
ScottPletcher (12/22/2015)
December 22, 2015 at 3:47 pm
Jason A. Long (12/21/2015)
Just ran this against my updated test harness... It didn't break the loop and got the "maximum recursion" error.
I must admin - I have quite limited experience...
December 22, 2015 at 3:26 pm
Minor change to deal with deadlocks:
WITH
cte_Blocks AS (
SELECT
b.spid,
b.typ_of_block,
b.capdt,
b.blocked_spid,
blocked_level = CAST(1 AS INT),
blocking_chain = CAST(b.spid AS VARCHAR(8000))
FROM
#Blocking b
WHERE b.blocked_spid = 0
UNION ALL
SELECT
b.spid,
b.typ_of_block,
b.capdt,
b.blocked_spid,
blocked_level = cb.blocked_level + 1,
blocking_chain...
December 21, 2015 at 7:52 pm
ScottPletcher (12/21/2015)
Eirikur Eiriksson (12/21/2015)
Talib123 (12/21/2015)
If I use a Where = it works fine. How do I get around this small annoying issue.
SELECT name...
December 21, 2015 at 3:50 pm
Can you post DDL statements for all tables involved in the queries?
December 16, 2015 at 4:42 pm
Application may "point to" more than 1 database on more than 1 server.
Each method may use its own connection string pointing to a database (or any other data source)...
December 16, 2015 at 4:14 pm
tinausa (12/15/2015)
Also, number of categories may change from one product to another. Some have 3 and others have 4.
Then there must be additional column in the CatRange table:
DECLARE @CatRanges TABLE...
December 15, 2015 at 9:50 pm
I would not suggest hardcoding category ranges.
They should be put in a table.
This approach dramatically reduces the need in agile development, continuous deployment and questionable technics which became very fashionable...
December 15, 2015 at 7:06 pm
PJ_SQL (12/15/2015)
This is my trigger:CREATE TRIGGER TRG_A
ON _A
AFTER INSERT, UPDATE
AS
insert into _B
SELECT * FROM inserted
where c is not null
How do I incorporate in this?
Thank you.
That's up...
December 15, 2015 at 3:58 pm
Viewing 15 posts - 1,741 through 1,755 (of 6,036 total)