Viewing 15 posts - 1,366 through 1,380 (of 6,036 total)
Eric M Russell (6/13/2016)
UPDATE SomeTable
SET SomeText = @SomeText
WHERE WHERE ID = @ID;
IF @@ROWCOUNT = 0
...
June 15, 2016 at 12:18 am
Jeff Moden (6/14/2016)
other basic questions like "Tell me what you know about Clustered Indexes".
Group of indexes merged into a cluster?
Correct?
June 14, 2016 at 11:27 pm
colin.frame (6/8/2016)
Sergiy (6/6/2016)
and NOT (pm.pdenddate=pt.pdenddateOR (pm.pdenddate is NULL and pt.pdenddate is NULL)
)
This logic doesn't quite match what's given - the pm.pdenddate=pt.pdenddate part excludes all lines where one side only of...
June 14, 2016 at 6:14 pm
DiabloSlayer (6/14/2016)
Hi Sergiy,I'm sorry I'm lost 😉
Can you kindly add the initial piece (where we create the Calendar table) into your query?
Sorry and thanks again for your help.
Here is the...
June 14, 2016 at 5:37 pm
Pawan Kumar Khowal (6/13/2016)
SELECT ROW_NUMBER() OVER (ORDER BY NAME) Id , Name FROM(
SELECT Id,Name FROM [dbo].[Table1]
UNION ALL
SELECT Id,Name FROM [dbo].[Table2]
)r
Pawan Khowal
_________________________________________________________________________________________________________
https://msbiskills.com/tsql-puzzles-asked-in-interview-over-the-years/
1. SQL 2000
2. Topic from 2007.
June 14, 2016 at 12:13 am
Yes, of course.
It's pretty much Numbers table, but instead of numbers it contains dates:
Select DATEADD (dd, Number, 0)
From Tally
Where Number < 256*256
It will cover full range of SMALLDATETIME dates
June 13, 2016 at 7:50 pm
You can even have a query for all the dates ever:
SELECT DATENAME(MONTH, MonthStart) + ' ' + DATENAME(YY, DT.MonthStart) ReportMonth,
WeekNo, MIN(Date) FromDate, MAX(Date) ToDate
FROM (
SELECT DATEADD(mm, DATEDIFF(mm, 0, bc.Date),...
June 13, 2016 at 7:16 pm
DiabloSlayer (6/13/2016)
In this case, it would be like the following:
STARTDATE ENDDATE ...
June 13, 2016 at 6:51 pm
DiabloSlayer (6/13/2016)
If we chose 6/1 as the Start Date which is Wednesday then it goes from 6/1 to 6/7 etc. whereas it should go from Wednesday till Saturday (6/1 to...
June 13, 2016 at 5:14 pm
Use temp table instead.
#Table created in outer query is available within the scope of your dynamic SQL.
You may simply remove the table parameter then.
It's much better way to pass tables...
June 13, 2016 at 4:35 pm
Man, I can only say - you're dealing with some seriously screwed people. 🙂
Of course, I cannot know how you define the atmosphere on your interviews, how do you recognise...
June 12, 2016 at 11:50 pm
krypto69 (6/2/2016)
The trigger(s) caused a huge series of updates to several tables, logging, auditing, etc.
This was a one time update. We are a really busy shop..so 30G...
June 12, 2016 at 11:03 pm
stricknyn (6/10/2016)
Thanks for your response. Unfortunately no. The other process is designed that way because there are other processes (much like this stored procedure) that will be...
June 12, 2016 at 4:43 pm
Jeff Moden (6/10/2016)
June 12, 2016 at 4:36 pm
Viewing 15 posts - 1,366 through 1,380 (of 6,036 total)