Viewing 15 posts - 7,651 through 7,665 (of 8,760 total)
Steve Jones - SSC Editor (7/31/2014)
SQLRNNR (7/31/2014)
Because you just had two pina coladas?
That's completely misworded. It's "because you had just two pina coladas."
....in each transaction....:rolleyes:
😎
July 31, 2014 at 3:08 pm
tshad (7/31/2014)
INSERT INTO Users
( User_id ,
...
July 31, 2014 at 3:06 pm
Straight forward running total and lag
😎
;WITH BASE AS
(
SELECT [R], [D]
FROM (
VALUES
(1,'A')
,(2,'B')
,(3,'B')
,(4,'A')
,(5,'B')
,(6,'B')
,(7,'A')
,(8,'A')
,(9,'A')) AS X([R],[D]))
,PRIME_GROUP AS
(
SELECT
B.R
...
July 31, 2014 at 2:59 pm
Snargables (7/31/2014)
July 31, 2014 at 1:36 pm
Jeff Moden (7/31/2014)
swasheck (7/31/2014)
July 31, 2014 at 1:06 pm
SQLRNNR (7/31/2014)
Eirikur Eiriksson (7/31/2014)
SQLRNNR (7/31/2014)
William J. Fellows (7/31/2014)
To qualify my statement, Steve stares at my legs a lot. 😛Well, you have good looking legs.
:exclamation:Unwanted details:sick:
Task achieved!!
Jason, you are a real...
July 31, 2014 at 12:58 pm
GilaMonster (7/31/2014)
Alvin Ramard (7/30/2014)
WAIT!!!! What kind of database MUST be repaired regularly???? :w00t:
MS Access ones.
That actually is correct advice, for an MS Access database (as in Access tables)...
July 31, 2014 at 12:50 pm
SQLRNNR (7/31/2014)
William J. Fellows (7/31/2014)
To qualify my statement, Steve stares at my legs a lot. 😛Well, you have good looking legs.
:exclamation:Unwanted details:sick:
July 31, 2014 at 12:35 pm
William J. Fellows (7/31/2014)
To qualify my statement, Steve stares at my legs a lot. 😛
Think you got it wrong, he's not the tallest tree in the forest:-P
😎
July 31, 2014 at 12:29 pm
Steve Jones - SSC Editor (7/31/2014)
July 31, 2014 at 12:17 pm
Quick fix for your update
😎
declare @mycutoff date = '01/01/2020';
select [Date] = CONVERT(VARCHAR(10),CASE WHEN convert(datetime,'7/26/29',1) >= @mycutoff THEN DATEADD(YEAR,-100,convert(datetime,'7/26/29',1)) ELSE convert(datetime,'7/26/29',1) END,103)
Result
26/07/1929
July 31, 2014 at 11:48 am
SQLSeTTeR (7/31/2014)
Gents - the birthday is 1929 not 2029. I would prefer not to update the server because I don't now the impact.
Sorry, didn't notice the century before, looks...
July 31, 2014 at 11:32 am
Further on Michael's excellent advice, the CONVERT function takes the third optional parameter [style], controls the style of the input/output.
😎
select [Date] = CONVERT(VARCHAR(10),convert(date,'7/26/29',1),101)
Results
07/26/2029
European
select [Date] = CONVERT(VARCHAR(10),convert(date,'7/26/29',1),103)
Result
26/07/2029
July 31, 2014 at 11:19 am
Phil Parkin (7/31/2014)
Don't think this works if there is no underlying row selected.
You are right Phil, works for columns but not rows;-)
Here is a workaround
😎
declare @address table
(
AddressID int,
AddressType...
July 31, 2014 at 10:29 am
Use the ELEMENTS XSINIL after the FOR XML clause.
😎
July 31, 2014 at 9:41 am
Viewing 15 posts - 7,651 through 7,665 (of 8,760 total)