Viewing 15 posts - 796 through 810 (of 2,007 total)
All changes to SQL Server require in depth testing of every application before the change is made live.
Without testing you're guessing that it'll all work. That's not good...
March 20, 2012 at 4:37 am
For those that want the code but don't want to download a .doc, here is the original query.
DECLARE @keydoc INT
SET @keydoc = 539428
SELECT DISTINCT a.keydoc, a.keyfreesiteaccess, a.keyfreesiteaccesspublishable
FROM objectviews..aisarticle a
LEFT JOIN...
March 20, 2012 at 4:32 am
beginnew2012 (3/14/2012)
I want my table to be stored in a separate database, let's call it myDB.
This code is very complex to...
March 14, 2012 at 12:42 pm
dec_obrien (3/14/2012)
Hi,Yes it works (although I've no idea why!).
THanks
I'll try an example that you can follow in your SQL window
First, set your results to text and...
March 14, 2012 at 8:25 am
beginnew2012 (3/14/2012)
Cadavre, I don't want the table to be a temporary table. I want an actual table, what changes should I apply?
Change all references to #testEnvironment into whatever table name...
March 14, 2012 at 7:52 am
Lowell (3/14/2012)
Cadavre (3/14/2012)
This will create 1,000,000 rows of pseudo-random unique firstName, secondName, e-mail address and mail address.
I like your example Cadavre, but there's a possbility of creating names that contain...
March 14, 2012 at 6:33 am
dec_obrien (3/14/2012)
Is there a way to not add the extra commas if there isn't a corresponding seq
Yes. Do what ColdCoffee said in the first place.
Untested, but it should be something...
March 14, 2012 at 6:31 am
This will create 1,000,000 rows of pseudo-random unique firstName, secondName, e-mail address and mail address.
SET NOCOUNT ON;
IF object_id('tempdb..#testNames') IS NOT NULL
BEGIN
DROP TABLE #testNames;
END;
WITH t1(N) AS (SELECT...
March 14, 2012 at 4:59 am
If you insist on not using a calendar table, then this is better: -
WITH t1(N) AS (SELECT 1 UNION ALL SELECT 1),
t2(N) AS (SELECT 1 FROM t1 x, t1 y),
CTEMonth(MonNum)...
March 13, 2012 at 4:37 am
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[DelimitedSplit8K]') AND type in (N'FN', N'IF', N'TF', N'FS', N'FT'))
BEGIN
DROP FUNCTION [dbo].[DelimitedSplit8K];
END
GO
CREATE FUNCTION [dbo].[DelimitedSplit8K]
--===== Define I/O parameters
...
March 12, 2012 at 3:11 am
Bit of a late reply.
--Your current code
SELECT *
FROM EBBReport
WHERE IsCurrent = 0
AND (Datediff(dd, @EFFdate, convert(VARCHAR, getdate(), 1)) <= 90 AND
Datediff(dd, @EFFdate, convert(VARCHAR, getdate(), 1))...
March 12, 2012 at 2:54 am
nilesh k (3/9/2012)
Option 1:
SELECT base.*
FROM table base
INNER JOIN (SELECT segment, MAX([PostedDate]) AS Max (PostedDate)
FROM...
March 9, 2012 at 8:02 am
Gail Shaw wrote about "Catch all" queries a while ago[/url].
Since then, whenever I've needed to do something like that I've always started with that article in my mind.
March 8, 2012 at 7:00 am
Eugene Elutin (3/7/2012)
Cadavre (3/7/2012)
... The original question was reasonably interesting and the dynamic SQL for any table was an entertaining intellectual challenge.
Have you heard about solving SUDOKU in T-SQL?...
March 7, 2012 at 8:01 am
Eugene Elutin (3/7/2012)
Can some one come up with the reasonable idea for doing it in the first place?
I do not beleive...
March 7, 2012 at 7:47 am
Viewing 15 posts - 796 through 810 (of 2,007 total)