Viewing 15 posts - 7,231 through 7,245 (of 8,753 total)
caffeinated (8/31/2014)
Your example introduces division by...
August 31, 2014 at 11:04 pm
Quick thought, no need to use recursion or loops, rather use the LAG window function. Here is a quick sample code with some test data.
😎
USE tempdb;
GO
DECLARE @TEST_DATA TABLE
(
...
August 31, 2014 at 10:57 pm
Quick thought, the datediff function sometimes plays tricks on us, not to be trusted blindly, look at this sample
😎
USE tempdb;
GO
DECLARE @TEST_DATA TABLE
(
TD_ID INT...
August 31, 2014 at 10:33 pm
michielbijnen (8/31/2014)
I have added CREATE and INSERT queries!Could you explain what you had in mind with the MOD function?
Thx!
Good job with the DDL and the sample data, will have a...
August 31, 2014 at 2:31 pm
polkadot (8/31/2014)
Now the DB_2 is moved to another server, SRV_B, the LSRV_A would have to be changed to point to SRV_B etc.,
Yes, and that's his point. That if a lot...
August 31, 2014 at 1:19 pm
polkadot (8/31/2014)
If there are 2 servers whose databases are linking to a 3rd server's database, do each of the 2 server's linked server names have to...
August 31, 2014 at 11:51 am
Thanks for sharing the information. One quick question, what is the isolation level set in the connection configuration?
😎
August 31, 2014 at 10:15 am
The default constraint will only work on inserts not updates. The code sample below demonstrates this.
😎
USE tempdb;
GO
CREATE TABLE dbo.TBL_TEST_CONSTRAINT
(
TC_ID INT IDENTITY(1,1) NOT NULL
...
August 31, 2014 at 9:43 am
techmaark (8/31/2014)
server pings client but client not ping to server but i can remotely connect with server
As a quick fix, add a HOST entry for the server on the client...
August 31, 2014 at 9:15 am
Quick thought, look at sys.partitions and sys.tables
😎
August 31, 2014 at 7:07 am
If I remember correctly, Itzik Ben-Gan wrote an article on paging result set, both with and without offset fetch, suggest you look at it.
😎
Edit: added link.
August 31, 2014 at 5:52 am
karthik82.vk (8/31/2014)
I have a data of 100 PostalCodes and parcels associated with it. Each postal code will be having multiple parcels. My aim is to find the count of parcels...
August 31, 2014 at 5:24 am
This is more for fun than being an attempt to solve the problem, although the code can easily be amended to produce the desired results. It uses an inline Tally...
August 31, 2014 at 4:25 am
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
Viewing 15 posts - 7,231 through 7,245 (of 8,753 total)