Viewing 15 posts - 3,031 through 3,045 (of 3,957 total)
Eugene Elutin (8/14/2012)
If you vote for Conservatives/Republicans - use RIGHT joinIf you vote for Labor/Democrats - use LEFT join
I exclusively use LEFT JOINs. 😛
August 14, 2012 at 8:58 pm
Cadavre +1 for a very clever solution.
August 14, 2012 at 7:28 pm
dirtyshorellc (8/9/2012)
What I am doing is creating a query that will simply take certain columns from a table and export them to a csv file for export to another...
August 14, 2012 at 7:27 pm
Phil Parkin (8/14/2012)
patrickmcginnis59 (8/14/2012)
Shadab Shah (8/12/2012)
Jeff Moden (8/10/2012)
Shadab Shah (8/9/2012)
I have come across various section on this website where it is mention that SQL Server is a set based...
August 14, 2012 at 6:44 pm
SQLKnowItAll (8/14/2012)
USE test
GO
CREATE TABLE testStringReplace (string VARCHAR(250))
INSERT INTO testStringReplace
SELECT TOP 500000 c1.name + '%' + c1.name + '%'
FROM sys.columns c1
CROSS JOIN...
August 14, 2012 at 6:30 pm
Playing around with PATINDEX, which is the closest thing you'll find to REGEX (except the CLR REGEX functions of course), I come up with something like this:
;WITH SampleData (string) AS...
August 14, 2012 at 4:12 am
Here's another approach:
;WITH Summary AS (
SELECT Account, Year=DATEPART(year, [Date]), Summary=SUM(Summary)
FROM #Accounts
GROUP BY Account, DATEPART(year, [Date]))
SELECT a.Account, [Date], Amount,...
August 14, 2012 at 3:30 am
Evil Kraig F (8/13/2012)
Jeff Moden (8/13/2012)
Evil Kraig F (8/10/2012)
August 13, 2012 at 9:29 pm
rVadim (8/13/2012)
This looks similar to this post:http://www.sqlservercentral.com/Forums/Topic1343554-391-1.aspx
Patterning after the quoted article, the solution for your data is as follows:
CREATE TABLE #testtab(
ID INT, DocID INT, MilestoneID INT,...
August 13, 2012 at 8:09 pm
Peter Brinkhaus (8/12/2012)
August 13, 2012 at 7:53 pm
A little basic formatting would go a long way to improving readability:
IF LTRIM(rtrim(@PostCode)) <> ''
BEGIN
select @ParameterList = '' -- Not used anywhere
...
August 13, 2012 at 7:43 pm
Wow! I'm glad I took the weekend off. Gave you guys a chance to get it all sorted out.
August 13, 2012 at 6:55 am
Lynn Pettis (8/11/2012)
CELKO (8/11/2012)
CELKO talked aobut DDL of my post, but here I only ask the question about the extra comma
A reflex on my part. I assume that...
August 13, 2012 at 6:48 am
Gosh! If you're gonna use the VARCHAR(20) version of @Holder, you should at least use this version of DWAIN's:
REVERSE(1*REVERSE([Column] * 1))
August 10, 2012 at 4:37 am
Many good examples in BOL: http://msdn.microsoft.com/en-us/library/ms345137(v=sql.90).aspx
Another way I've used it is to construct an XML document for passing into a SP, although if I were to do it over again...
August 10, 2012 at 4:09 am
Viewing 15 posts - 3,031 through 3,045 (of 3,957 total)