Viewing 15 posts - 5,086 through 5,100 (of 7,597 total)
mm7861 (5/13/2015)
Need to get the previous business day of a date if that date is not a business day... again I would like to...
May 13, 2015 at 7:41 am
select
address_id,
case SUBSTRING(addr_flags, 1, 1)
when '1' then addr1
...
May 12, 2015 at 4:05 pm
Yes, after the shrink, you use sys.dm_db_index_physical_stats as usual to check for fragmentation.
Ooh, btw, I forgot something earlier. Even before you do the shrink, you can check if there...
May 12, 2015 at 11:10 am
SELECT A.Date,
( --get the last of the business dates from below
SELECT TOP (1) DateKey
...
May 12, 2015 at 11:05 am
SELECT
MAX(CASE WHEN DateFY = 2010 THEN Yr_Count ELSE 0 END) AS [FY10],
MAX(CASE WHEN DateFY = 2010 THEN May_Count ELSE 0 END)...
May 12, 2015 at 10:39 am
New Born DBA (5/11/2015)
CKX (5/11/2015)
I think you may find this particular response from Lynn probably explains what is going on here.
You can experiment by "including" the other columns in your...
May 12, 2015 at 10:18 am
You can just use a single UPDATE statement unless you need to other actions between the SELECT and the UPDATE:
UPDATE tblOnboardingSequence
SET NextNumber = NextNumber + 1
WHERE Name =...
May 12, 2015 at 10:09 am
Personally, I would stick with the simpler / more straight forward:
IF DATEPART(MINUTE,GetDate()) BETWEEN 00 AND 05
OR DATEPART(MINUTE,GetDate()) BETWEEN 30 AND 35
BEGIN
...
END
May 11, 2015 at 4:24 pm
Yes, it did :-).
A shrink is reasonable after you've deleted a lot of data. After the shrink, you can decide if you want to shrink the file to release...
May 11, 2015 at 4:16 pm
Jeff Moden (5/11/2015)
SQL Guy 1 (5/11/2015)
Here is the query that I came up with:
select f1.Operation,
f1.AllocUnitName,
...
May 11, 2015 at 4:10 pm
Edit: In your original, change the INNER JOIN condition to this:
INNER JOIN OrderTable2 ot2 ON ot2.Order_No = SUBSTRING(ot1.Full_Order_No, 10, CHARINDEX('-', SUBSTRING(ot1.Full_Order_No, 10, 20)) - 1)
May 11, 2015 at 1:51 pm
The fact is that bit-wise values can indeed be easier to maintain in certain cases, particularly for status and/or security flags. You can then add new values without having...
May 8, 2015 at 3:51 pm
Who comes up with such ridiculous, useless qs? And why on earth would a dba want to waste value time and brain space memorizing such trivialities??
May 8, 2015 at 3:24 pm
You could do a simple split of the string based on a "-", if needed, then use ISDATE() on one/both entries. That would tell you if SQL recognized it...
May 8, 2015 at 3:19 pm
Yikes, how many possible "status"es are there??
May 8, 2015 at 10:02 am
Viewing 15 posts - 5,086 through 5,100 (of 7,597 total)