Viewing 15 posts - 32,011 through 32,025 (of 59,099 total)
shalini72011 (11/7/2011)
I have a query with update statement
UPDATE #Rpt
SET Productfamily = PD.pt_sp_type_c
FROM #Rpt s
...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:48 pm
This all works kind of like a call to xp_CmdShell. In order to kill the process, you have to kill the spid that made the call (which you're already...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:43 pm
Since the -s parameter defaults to a space, you need to (IIRC) explicity say -s"" (dash s followed by two double quotes with no spaces in between).
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:35 pm
If you only have two tags names, do you really need to get the actual tag name or will just knowing it's in there be enough? If the latter...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:20 pm
ashwin4all1 (7/10/2009)
All,
You better To use the following command for Getting the instance name.
EXECUTE xp_regread @rootkey='HKEY_LOCAL_MACHINE',
...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:17 pm
adonetok (11/7/2011)
How to modify code to display as '09:30:00 PM'?
declare @date datetime
set @date = '2011-11-08 21:30:00.000'
select CONVERT(VARCHAR, @date, 108) + ' '...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 5:15 pm
Scott Coleman (11/7/2011)
You could also use PIVOT.
Please see the following for why you might want to consider good ol' fashioned CROSS TABs instead.
http://www.sqlservercentral.com/articles/T-SQL/63681/
Of most importance is the performance chart near...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 4:58 pm
Steve Kinnaman (11/7/2011)
Yes That work great. A friend suggested to replace DATALENGTH with LEN, and that worked as well.
I agree with TOM. I recommend you continue to use DATALENGTH...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 4:28 pm
Sounds like you're back to trying to write a formatting function. You could save yourself a lot of time by just skipping that and spend more time on passing...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 4:24 pm
Sean Lange (11/7/2011)
ryvlad (11/7/2011)
just run it on your DB and you can always reference it...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 4:17 pm
The Dixie Flatline (11/7/2011)
Because I inadvertantly started (this very entertaining and informative discussion) by making a "suckish" comment, I feel compelled to admit that I have...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 4:14 pm
Because of the variable column names, you'll likely need a bit of dynamic SQL. The link below provides and example of how to do that. The data in...
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 8:16 am
kramaswamy (11/7/2011)
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 7:58 am
I didn't look back to see but do you have the xp_CmdShell proxy set up?
Also, is this a direct connection or are you "talking" through more than one connection?
--Jeff Moden
Change is inevitable... Change for the better is not.
November 7, 2011 at 7:35 am
SQL Kiwi (11/6/2011)
I don't agree that recursive CTEs are RBAR by the way: they're simply set-iterative, a bit like Hugo's 'lasagne' running total code.
I have to agree to disagree then......
--Jeff Moden
Change is inevitable... Change for the better is not.
November 6, 2011 at 9:40 pm
Viewing 15 posts - 32,011 through 32,025 (of 59,099 total)