Viewing 15 posts - 541 through 555 (of 1,957 total)
joakim.fenno (3/19/2014)
Thanks!
You're welcome 🙂
Lets start with the "int" flag version, its does not produce the correct output if you add a value 101 (menas true for month 1, false for...
March 19, 2014 at 3:33 am
Here are three ways you could tackle this. I prefer number three, which is to store the month number as a tinyint.
They all produce the same result, but query 2...
March 18, 2014 at 5:39 pm
I have to say "I don't know", but it's interesting and if anyone wants to join in, this AdventureWorks query shows similar symptoms:
select count(*)
from sales.salesorderdetail
where salesorderid not in (select salesorderheader.salesorderid...
March 17, 2014 at 5:35 pm
The problem is in your sample data at position 407 (highlighted below - unfortunately it is not visible, but that character is the problem)
Delete that one character from your data...
March 16, 2014 at 7:39 pm
Jeff's addition of the WHERE clause is designed to prevent SQL Injection and possible data corruption by only allowing data that conforms to the listed character sets.
You have an illegal...
March 16, 2014 at 7:29 pm
What is the error and what is the output of
Print @MyString
?
March 16, 2014 at 7:19 pm
You could inspect the CLR with a tool such as ILSpy, but it looks like it is working out the number of ten millionths of a second since 1/1/0000 taking...
March 16, 2014 at 6:52 pm
Jeff Moden (3/16/2014)
then either use BCP/BULK INSERT to load it or use a well written CLR to split it.
+1
...Or split the text in your front end application (that is currently...
March 16, 2014 at 6:30 pm
That query works from a TABLE variable - @t, just use your table in place of @t.
To make things easier and to get better answers, try to provide consumable test...
March 5, 2014 at 5:30 pm
Your code nearly worked, here is a tweaked version that does.
declare @t table ([MemberID] char(8), Codes varchar(4000));
insert @t values
('00000123','012|222|123|333'),
('00000233','012|222|332'),
('00000244','012|211'),
('00000332','012')
SELECT [MemberID]
,x.query('field[1]/text()').value('.','VarChar(10)') CODE1
,x.query('field[2]/text()').value('.','VarChar(10)') CODE2
,x.query('field[3]/text()').value('.','VarChar(10)') CODE3
,x.query('field[4]/text()').value('.','VarChar(10)') CODE4
,x.query('field[5]/text()').value('.','VarChar(10)') CODE5
,x.query('field[6]/text()').value('.','VarChar(10)') CODE6
,x.query('field[7]/text()').value('.','VarChar(10)') CODE7
,x.query('field[8]/text()').value('.','VarChar(10)') CODE8
,x.query('field[9]/text()').value('.','VarChar(10)') CODE9
,x.query('field[10]/text()').value('.','VarChar(10)') CODE10
,x.query('field[11]/text()').value('.','VarChar(10)')...
March 5, 2014 at 5:21 pm
It's fugly, but have you tried wrapping your clr function in a t-sql function?
That will prevent the parser error.
I have tested it on a "hello world" function to...
March 5, 2014 at 4:53 pm
The way I would do this is probably via a customer web page with a ReportViewer control that handled switching reports...
But, you can do it with a parent report as...
March 3, 2014 at 4:46 pm
It's a bit hard to visualise what you are trying to achieve, any chance of a screenshot of your 2008 layout?
February 27, 2014 at 5:57 pm
That example uses a table called runtimestore to keep track of which number/variant of data you require. You could use any table on the server for this.
February 24, 2014 at 4:01 am
You can simply add a couple of extra columns and use a matrix in your report, but this assumes you want to order by name...
e.g.
select
names
, row_number() over(order...
February 23, 2014 at 5:21 pm
Viewing 15 posts - 541 through 555 (of 1,957 total)