Viewing 15 posts - 2,146 through 2,160 (of 2,458 total)
Something like this perhaps...
-- your data
DECLARE @Report1 TABLE (contract varchar(20), A int, E int, N int, P int);
INSERT @Report1
SELECT 'Income', 5000, 6000, 8000, 4000 UNION
SELECT 'Costs', 4000, 7000,...
August 28, 2013 at 3:59 pm
If you can use CLRs you could look at mdq.regexmatches. See this thread.
August 22, 2013 at 4:43 pm
opc.three (8/19/2013)
DECLARE @sql NVARCHAR(MAX) = N'';
SELECT @sql += 'EXEC LoadFile ' + QUOTENAME(FILENAME, '''')...
August 20, 2013 at 3:55 pm
-- (1) Source Data
DECLARE @nbrs TABLE (n int primary key);
INSERT @nbrs VALUES (10),(20),(30),(40),(50);
-- (2) Solution
WITH
s1 AS (SELECT ROW_NUMBER() OVER (ORDER BY n) AS rn,n FROM @nbrs),
s2 AS (SELECT rn-1...
August 15, 2013 at 12:19 pm
First, I second both responses to your question. I actually have a couple versions of SQL server installed on my machine: 2008R2 Developer Edition & SQL Server 2012 Express. Developer...
August 14, 2013 at 2:47 pm
I have run into the exact same type of thing...
/bangs head.
This is the cause of my receding hairline. :hehe:
August 13, 2013 at 1:29 pm
the source data is coming from a database in the UK and the values sometimes contain non alpha-numeric characters. i'm probably wrong, but i'm wondering if some of these characters...
August 13, 2013 at 12:50 pm
Shot in the dark here but, are you using a case sensitive collation?
August 13, 2013 at 11:24 am
learning_sql (8/13/2013)
However I have just been playing around and when just typing the query it worked every time, I have...
August 13, 2013 at 7:11 am
dwain.c (8/12/2013)
Alan.B (8/12/2013)
Instead of the case statement you can also do this:
SELECT ISNULL(thing1.name,(ISNULL(thing2.name,thing3.name))) AS name
And why not:
SELECT COALESCE(thing1.name,thing2.name,thing3.name) AS name
?
Nice. That is cleaner and easier to read.
+1
August 12, 2013 at 7:15 pm
First, welcome to SSC!
If I understand your question correctly you have some VB code that accepts parameters, builds a query based on those parameters then sends that query (ad...
August 12, 2013 at 2:58 pm
We will be planning to migrate sql 2005 and sql 2008R2 on new windows 2008R2 server, we have one Replicated DB which ones we are subscribing and we don't have...
August 12, 2013 at 2:07 pm
Instead of the case statement you can also do this:
SELECT ISNULL(thing1.name,(ISNULL(thing2.name,thing3.name))) AS name
August 12, 2013 at 9:50 am
First, check out the Stairway to SQL Server Replication[/url] by Sebastian Meine.
I am going to set up replication in an OTLP environment. I would like to know what as...
August 9, 2013 at 2:06 pm
Viewing 15 posts - 2,146 through 2,160 (of 2,458 total)