Viewing 15 posts - 3,436 through 3,450 (of 8,731 total)
Ed Wagner (2/2/2016)
Grumpy DBA (2/2/2016)
djj (2/2/2016)
Ed Wagner (2/2/2016)
BWFC (2/2/2016)
Ed Wagner (2/2/2016)
Grumpy DBA (2/2/2016)
Ed Wagner (2/2/2016)
HappyGeek (2/1/2016)
IronsideConstitution
HMS Guerriere
Battle
Abbey
Road
Hog
Razorback
Racegun
Race pod
February 2, 2016 at 9:16 am
You just need a combination of SUBSTRING and CHARINDEX. Be sure to consider the possibility of strings missing Requestor: or char(9) or both.
If you want help with the code, please...
February 2, 2016 at 8:50 am
M Joomun (2/2/2016)
Sean Lange (2/2/2016)
M Joomun (2/2/2016)
February 2, 2016 at 8:47 am
A bit simpler than the code posted by John. The FROM part is only generating sample data and it's not really a part of the solution.
SELECT *,
...
February 2, 2016 at 8:39 am
o.kaesmann (2/2/2016)
My faforite method to clean-up duplicated rows is this (I used the example code from above):
That's certainly interesting. I've never heard of %%physloc%% before and for a moment I...
February 2, 2016 at 8:07 am
The problem is that you're missing an important option that SQL Server offers: The possibility to modify data through CTEs and views as long as they follow certain rules (Check...
February 1, 2016 at 3:19 pm
venkataprasanth (2/1/2016)
February 1, 2016 at 2:21 pm
It could be as simple as having a calendar table with holidays and workdays included. Then the query would come like this:
SELECT COUNT(*)
FROM Calendar
WHERE cal_date BETWEEN @start AND @End
AND...
February 1, 2016 at 8:18 am
Even the method posted on Microsoft Support is better than this ugly RBAR option with a deprecated feature.
February 1, 2016 at 7:19 am
palotaiarpad (1/31/2016)
Hmm. I thought COALESCE will return the datatype of the leftmost parameter. Learnt something. Thanks.
ISNULL() does work that way.
January 31, 2016 at 7:21 am
yb751 (1/29/2016)
J Livingston SQL (1/29/2016)
nice....but when there is an unknown number of values, how does the dynamic sql work?
LOL...yeah now that you mention it, that would be a complete pain...
January 29, 2016 at 1:58 pm
Do you mean inserting one row, then waiting a moment before inserting a new row, then insert the following row all in the same statement?
If so, then it's not possible....
January 29, 2016 at 1:38 pm
mbatchelor (1/29/2016)
SELECT REG_CONFIG.CUR_YR_DFLT
,SECTION_MASTER.YR_CDE
,CAST(ROUND(REG_CONFIG.CUR_YR_DFLT - 1,0) AS int) AS NEWYEAR
,CONVERT(INT,SECTION_MASTER.YR_CDE) AS...
January 29, 2016 at 12:54 pm
J Livingston SQL (1/29/2016)
fair enough...see your (very valid) point. but why use "CONVERT" instead of "TRY_CONVERT"? (2012 forum)Thanks
Bad practice. I didn't see it was a 2012 forum and...
January 29, 2016 at 12:45 pm
J Livingston SQL (1/29/2016)
Luis Cazares (1/29/2016)
Maybe this:
DECLARE @date varchar(10) = '14-Apr'
SELECT CONVERT(datetime, '01 ' + RIGHT(@date,3) + ' ' + LEFT(@date,2), 6)
Hi Luis......why not just use this instead??
SELECT CONVERT(datetime, '20'+@date)...
January 29, 2016 at 12:31 pm
Viewing 15 posts - 3,436 through 3,450 (of 8,731 total)