Viewing 15 posts - 6,841 through 6,855 (of 8,753 total)
er.mayankshukla (10/8/2014)
I have a log database where I have all the stored procedure for logging to log tables.
There are two databases - Dev and Test , which has stored...
October 8, 2014 at 1:04 am
Evil Kraig F (10/7/2014)
ROI is both our enemy and our weapon. Use wisely.
That is so true, just as beauty, ROI is only in the eye of the beholder
😎
October 7, 2014 at 11:18 pm
This is even more straight forward to do using the row_number function and set the order to select Current first if it exists, here is a quick sample
😎
USE tempdb;
GO
SET NOCOUNT...
October 7, 2014 at 10:13 pm
Further on the subject, first an example of a user, title and status tables with mandatory constraints and keys.
😎
USE tempdb;
GO
SET NOCOUNT ON;
GO
IF OBJECT_ID(N'dbo.TBL_USER') IS NOT NULL DROP TABLE...
October 7, 2014 at 1:59 pm
Ed Wagner (10/7/2014)
Sean Lange (10/7/2014)
Koen Verbeeck (10/7/2014)
As if regular spam wasn't annoying enough, one particalar user is now "spamming" the recent posts view with QotD threads...
That has been going on...
October 7, 2014 at 12:32 pm
Elementary:blush:, add the aliases and a from clause
😎
UPDATE ER
SET ER.LeaveDate = DATEADD(wk,2, FC.enrollDate)
FROM Fatals_CTE FC
INNER JOIN DBO.Enroll ER
ON ER.enrollmentID = FC.t_enrollmentID;
October 7, 2014 at 12:24 pm
Quick question, why use cross apply when this can be achieved more efficiently with an inner join?
😎
SELECT
AX.id
,AX.name
,MAX(BX.sal) AS sal
FROM...
October 7, 2014 at 11:18 am
Quick thought, the filter is only applied in the scope of the sub-query, effectively a cross apply without a filter which will return all rows. Consider this query instead
😎
USE tempdb;
GO
SET...
October 7, 2014 at 10:28 am
You are more or less there, here is a run-able self explanetory example
😎
USE tempdb;
GO
CREATE TABLE dbo.TBL_TO_UPDATE
(
TTU_ID INT IDENTITY(1,1) PRIMARY KEY CLUSTERED...
October 7, 2014 at 1:28 am
Quick suggestion which doesn't use a cursor and also avoids touching the default trace which cannot be altered via the procedure. The @status = 0 turns them off, 1 turns...
October 6, 2014 at 11:38 pm
Luis Cazares (10/6/2014)
October 6, 2014 at 2:21 pm
GilaMonster (10/6/2014)
Eirikur Eiriksson (10/4/2014)
Is it just me or does this smell like a spam? A quick search returned few similar postings referencing the same vendor on other sites.😎
It's the same...
October 6, 2014 at 2:08 pm
bpowers (10/6/2014)
That was it Thanks so much! Any idea how I can run this across three test databases in one piece of code?
Quick suggestion
😎
DECLARE @DB TABLE(DBNAME NVARCHAR(128));
INSERT INTO @DB(DBNAME)
VALUES (N'DB_1'),(N'DB_2'),(N'DB3');
DECLARE...
October 6, 2014 at 1:39 pm
Here is a quick solution, more for prototyping but it works
😎
USE tempdb;
GO
SET NOCOUNT ON;
GO
DECLARE @TXML XML = '<EventOne Date="09/22/2014" ID="12196996" InternalEventOneID="96436969" xmlns:reslib="urn:reslib">
<EventOneDate>09/22/2014</EventOneDate>
<TimestampCreate>09/22/2014 11:37:06:413</TimestampCreate>
<Comment>Comment One!!</Comment>
<EventZ EventID="834033" EventHistoryID="375381" InternalEventID="4843699" InternalHistoryID="17082526">
<EventType Word="PLAD">One</EventType>
</EventZ>
<EventOne...
October 6, 2014 at 11:46 am
Quick first notes (there will be more):
😎
"Users"
1. What attribute or collection of attributes uniquely identifies each user?
2. Users cannot have middle or additional names?
3. Full name should be a...
October 6, 2014 at 1:24 am
Viewing 15 posts - 6,841 through 6,855 (of 8,753 total)