Viewing 15 posts - 7,651 through 7,665 (of 8,756 total)
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
terry999 (7/31/2014)
ThanksWhere do I put the -c I tried
BULK INSERT tBCP FROM 'C:\temp\tbcp.csv'WITH (FORMATFILE='C:\temp\fmt.fmt', DATAFILETYPE='char')
It doesn't work
Ooops, my bad, I was thinking in bcp:-P
Should be DATAFILETYPE = 'char'
😎
July 31, 2014 at 5:29 am
Sivaganesh Tamilvendhan (7/31/2014)
while writing store procedure in db
most of Time i will Use common Table to write select quries
for selecting more than seven table whether...
July 31, 2014 at 4:57 am
You might want to add -c (character format) as it looks like it is using native (-n) format.
The 21 -> 50 49 -> 12594 is because it translates the character...
July 31, 2014 at 4:55 am
Quick question, does 7 get translated to 55? Looks like it is reading the character code values as the actual values, change it to SQLCHAR and then convert to int.
😎
July 31, 2014 at 4:02 am
Viewing 15 posts - 7,651 through 7,665 (of 8,756 total)