Viewing 15 posts - 7,246 through 7,260 (of 8,755 total)
Here is an alternative method without recursion, uses Tally table type looping instead. The code uses Chris's sample data to produce comparable output. It is simplified and limited to that...
August 31, 2014 at 12:49 am
TomThomson (8/30/2014)
Eirikur Eiriksson (8/30/2014)
sharonsql2013 (8/30/2014)
Select
AVG(Case when TotalHours < = 60 And TotalHours > 0 then TotalHours else...
August 30, 2014 at 4:00 pm
sharonsql2013 (8/30/2014)
Select
AVG(Case when TotalHours < = 60 And TotalHours > 0 then TotalHours else 0 end)AVGWithin60
AVG(Case when...
August 30, 2014 at 12:00 pm
Just in case you missed this from the previous instance of the question, modified to return blank if no HardDrink
😎
USE tempdb;
GO
SET NOCOUNT ON;
CREATE TABLE #TEMP (T_ID INT IDENTITY(1,1),UserName varchar(20),Drink varchar(20),Value...
August 30, 2014 at 10:39 am
Shadab Shah (8/29/2014)
There would be a better solution then , the one mention above by me.
If some body has it would be great to know. Just to improve on...
August 30, 2014 at 10:27 am
Can you ping the servers in both directions from each other using the server names, not the ip address (oops that sounds twisted:-))?
😎
August 30, 2014 at 10:16 am
Lynn Pettis (8/30/2014)
The active thread view reminds me of a Monty Python skit: Spam, spam, spam, spam ... :-P;-):w00t:
The Menu (translated to SSC'lect)
Post and Spam
Post,...
August 30, 2014 at 9:58 am
Greg Edwards-268690 (8/30/2014)
Jeff Moden (8/29/2014)
August 30, 2014 at 9:46 am
techmaark (8/30/2014)
pls check screenshot of msdtc setting attached
First thought and if I remember correctly, set the NetworkDtcAccessTip (Transaction Internet Protocol (TIP)) to 1. Do check on technet though as my...
August 30, 2014 at 9:37 am
polkadot (8/30/2014)
August 30, 2014 at 9:22 am
Quick thought, have a look at this page Enable Network Access Securely for MS DTC, guess this is your problem.
😎
August 30, 2014 at 9:13 am
Here is a quick "set based loop" method using an inline Tally table to count the hours.
😎
USE tempdb;
GO
DECLARE @TEST_DATA TABLE
(
TEST_DATA_ID INT IDENTITY(1,1) NOT NULL PRIMARY KEY...
August 30, 2014 at 8:48 am
Lynn Pettis (8/30/2014)
August 30, 2014 at 8:01 am
Quick thought, use a combination of replace and convert with the 110 format directive
😎
USE tempdb;
GO
DECLARE @MMDDYY VARCHAR(20) = '01 20 1950'
SELECT CONVERT(DATETIME,REPLACE(@MMDDYY,CHAR(32),CHAR(45)),110)
Result
1950-01-20 00:00:00.000
August 30, 2014 at 7:59 am
Mr.Sahand (8/30/2014)
Eric the loop in this level does not iterate the tables or any other Enumeration. It is just a simple loop.the tables' loop sits below the code shown:-)
He he,...
August 30, 2014 at 7:09 am
Viewing 15 posts - 7,246 through 7,260 (of 8,755 total)