Showing posts with label case. Show all posts
Showing posts with label case. Show all posts

Wednesday, March 28, 2012

How to show HTML text interpretation in SQL Server Reporting Services

Hi everybody

Is there a way to show HTML tags in a SQL Server Reporting services just like we are used to do in Crystal Reports?

I my case, I use the property Text Interpretation: HTML (right click in parameter field inside report and click edit parameter menu option).

I was wondering if we have something similiar in Reporting services?!

Hi, have you figured this out. I'd need to do that as well :)

I'll let you know if I find something.

|||

I'm going to ask Microsoft SQL Server Reporting Services forum:

http://forums.microsoft.com/MSDN/ShowForum.aspx?ForumID=82&SiteID=1

give it a try!

|||

Hi Cynick

Teo from Microsoft told said to me:

"HTML inlining is not supported with RS 2005. It is on the top list for the next release.".

As you can see we have to wait for the next Reporting Services version! Check out the link:

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=1540154&SiteID=1

I`m so disappointed but it'll be worth to wait!Crying

sql

Wednesday, March 21, 2012

How to setup a backup server for SQL Server2005 for production (in case the primary server fails

I currently have a SQL Server cluster setup with a Primary DB Server SERVER1 and the Standby server SERVER2. SERVER1 has been failing more than normal is the past few weeks and its takes upto 5 mins for SERVER2 realize that SERVER1 is down. I am looking for a better way to implement a backup server on production with minimum downtime. Please adivse..

you have two options one is Database mirroring and other is log shipping in sql 2005..........but i advise you to go with db mirroring as the downtime is less in high availability mode as you have a witness server and hence the failover will be automatic and within few seconds............but in log shipping only manual failover is possible........refer,

http://dumthata.com/sqlchn/articles/dbmrr.htm

http://dumthata.com/sqlchn/articles/lship.htm

Going forward pls post in the appropriate forum as it would be easier to read through and answer....

Wednesday, March 7, 2012

How to set Multiple Active results Sets (MARS) enable in ODBC

hello all there

can any body tell me how could i set the Multiple Active results Sets (MARS) option on/yes in case of the ODBC.

The thing is i create the connection using the SQL Native(sql sqrver-2005)wizard,

i got following when create the DNS

Microsoft SQL Native Client Version 09.00.1399

Data Source Name: DM_N
Data Source Description:
Server: vsnet1
Use Integrated Security: No
Database: DM
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Mirror Server:
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes

i just want to set the

Multiple Active Result Sets(MARS): YES

how could i ?

any help, solution or hint

Regards

Thanks

GSG

use this within your SQL Server connectionstring:

"Driver={SQL Native Client};Server=Aron1;Database=pubs;Trusted_Connection=yes;MARS_Connection=yes"

HTH, jens Suessmeyer.

http://www.sqlserver2005.de

How to set Multiple Active Results Sets (MARS) enable in ODBC

hello all there

can any body tell me how could i set the Multiple Active results Sets (MARS) option on/yes in case of the ODBC.

The thing is i create the connection using the SQL Native(sql sqrver-2005)wizard,

i got following when create the DNS

Microsoft SQL Native Client Version 09.00.1399

Data Source Name: DM_N
Data Source Description:
Server: vsnet1
Use Integrated Security: No
Database: DM
Language: (Default)
Data Encryption: No
Trust Server Certificate: No
Multiple Active Result Sets(MARS): No
Mirror Server:
Translate Character Data: Yes
Log Long Running Queries: No
Log Driver Statistics: No
Use Regional Settings: No
Use ANSI Quoted Identifiers: Yes
Use ANSI Null, Paddings and Warnings: Yes

i just want to set the

Multiple Active Result Sets(MARS): YES

how could i ?

any help, solution or hint

Regards

Thanks

Gurpreet S. Gill

use this within your SQL Server connectionstring:

"Driver={SQL Native Client};Server=Aron1;Database=pubs;Trusted_Connection=yes;MARS_Connection=yes"

HTH, jens Suessmeyer.

http://www.sqlserver2005.de|||

Thanks HTH

but the problem is that i dont want to configure it using connection string as HTH said.

i want to Configure it from using SQL Native wizard(ODBC) itself

as i cant touch the application code...

So i just want to have the DNS with

Multiple Active Result Sets(MARS): YES

or any other idea?

Thanks

Regard

Gurpreet S. Gill

|||

There was a lot of careful thought that went into the decision not to expose MARS in the DSN Wizard setttings. MARS is only useful in the case of an application specifically designed to use MARS, and turning MARS on for an application not explicitly designed for it will either provide no utility or in the worst case may cause the application to work incorrectly. Given that, it made sense to require the developer to be present to make the application changes needed to work correctly with MARS, in which case they can use the connection string to turn MARS on.

One way around this might be to use a FileDSN. By creating a FileDSN and manually adding the MARS_Connection keyword you should be able to connect using MARS. But I would exercise caution and make sure the application is well tested for that case.

|||

Hi i set the File DSN as

[ODBC]
DRIVER=SQL Native Client
UID=sa
DATABASE=DM
WSID=VSNET5
APP=Microsoft Data Access Components
SERVER=VSNET1
MARS_Connection=YES

but still it doesnt make MARS enables connection, our appliction still gives error "Connection Busy...."

Any other hint or solution?

regards,

Gurpreet S. Gill

|||

Add this before you call SQLDriverConnect

SQLSetConnectAttr(hdbc, SQL_COPT_SS_MARS_ENABLED, SQL_MARS_ENABLED_YES, SQL_IS_UINTEGER);

|||

If you need to use MARS, you need to set the connection attribute in your application explicitly. It is not possible to enable it in DSN.

This is because that MARS is only useful if an application acutally uses the functionality provided by MARS. In this case, it should not be a problem for the application to set the MARS attribute in code.

It sounds weird to me an application uses MARS but connects to database without enabling it...

|||Where could i write this

SQLSetConnectAttr(hdbc, SQL_COPT_SS_MARS_ENABLED, SQL_MARS_ENABLED_YES, SQL_IS_UINTEGER);

?

Sunday, February 19, 2012

How to sequentially SORT numbers that also have a letter attached?

Try:
declare @.t table
(
x varchar (5) primary key
, y as case when patindex ('%[a-z]', x) = 0 then ''
else right (x, len (x) - patindex ('%[a-z]', x) + 1) end
, z as case when patindex ('%[a-z]', x) = 0 then cast (x as int)
else cast (left (x, patindex ('%[a-z]', x) - 1) as int) end
)
insert @.t values ('1')
insert @.t values ('1a')
insert @.t values ('1b')
insert @.t values ('1c')
insert @.t values ('2')
insert @.t values ('2a')
insert @.t values ('2b')
insert @.t values ('2c')
insert @.t values ('3')
insert @.t values ('3a')
insert @.t values ('3b')
insert @.t values ('3c')
insert @.t values ('11a')
insert @.t values ('21c')
select x from @.t
order by z, y
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"ALI" <kismet110@.yahoo.co.uk> wrote in message
news:1150111751.001833.272460@.f14g2000cwb.googlegroups.com...
Hi
I'm hoping this will be straightforward for you guys to point me in the
right direction.
Friend of mine emailed me asking the following:
We have a table with a house plot number on it, which is varchar(5).
Example values are:
1
1a
1b
1c
2
2a
2b
2c
3
3a
3b
3c
11a
21c
When we sort these they come out as follows:
1
1a
1b
1c
11a
2
2a
2b
2c
21c
3
3a
3b
3c
Is there an easy way to get them to sort as per the first example? I.e.
1 first, then 1a, 1b, 1c followed by 2, 2a etc and not 11a?
I thought it'd be simple but not so! Would appreciate your advice on
the simplest way of achieving this please.Hi
I'm hoping this will be straightforward for you guys to point me in the
right direction.
Friend of mine emailed me asking the following:
We have a table with a house plot number on it, which is varchar(5).
Example values are:
1
1a
1b
1c
2
2a
2b
2c
3
3a
3b
3c
11a
21c
When we sort these they come out as follows:
1
1a
1b
1c
11a
2
2a
2b
2c
21c
3
3a
3b
3c
Is there an easy way to get them to sort as per the first example? I.e.
1 first, then 1a, 1b, 1c followed by 2, 2a etc and not 11a?
I thought it'd be simple but not so! Would appreciate your advice on
the simplest way of achieving this please.|||Try:
declare @.t table
(
x varchar (5) primary key
, y as case when patindex ('%[a-z]', x) = 0 then ''
else right (x, len (x) - patindex ('%[a-z]', x) + 1) end
, z as case when patindex ('%[a-z]', x) = 0 then cast (x as int)
else cast (left (x, patindex ('%[a-z]', x) - 1) as int) end
)
insert @.t values ('1')
insert @.t values ('1a')
insert @.t values ('1b')
insert @.t values ('1c')
insert @.t values ('2')
insert @.t values ('2a')
insert @.t values ('2b')
insert @.t values ('2c')
insert @.t values ('3')
insert @.t values ('3a')
insert @.t values ('3b')
insert @.t values ('3c')
insert @.t values ('11a')
insert @.t values ('21c')
select x from @.t
order by z, y
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Toronto, ON Canada
.
"ALI" <kismet110@.yahoo.co.uk> wrote in message
news:1150111751.001833.272460@.f14g2000cwb.googlegroups.com...
Hi
I'm hoping this will be straightforward for you guys to point me in the
right direction.
Friend of mine emailed me asking the following:
We have a table with a house plot number on it, which is varchar(5).
Example values are:
1
1a
1b
1c
2
2a
2b
2c
3
3a
3b
3c
11a
21c
When we sort these they come out as follows:
1
1a
1b
1c
11a
2
2a
2b
2c
21c
3
3a
3b
3c
Is there an easy way to get them to sort as per the first example? I.e.
1 first, then 1a, 1b, 1c followed by 2, 2a etc and not 11a?
I thought it'd be simple but not so! Would appreciate your advice on
the simplest way of achieving this please.|||Thanks for your help Tom, hopefully this will get them what they want,
I don't feel totally stupid now too for thinking it would be _really_
simple!
Tom Moreau wrote:
> Try:
> declare @.t table
> (
> x varchar (5) primary key
> , y as case when patindex ('%[a-z]', x) = 0 then ''
> else right (x, len (x) - patindex ('%[a-z]', x) + 1) end
> , z as case when patindex ('%[a-z]', x) = 0 then cast (x as int)
> else cast (left (x, patindex ('%[a-z]', x) - 1) as int) end
> )
> insert @.t values ('1')
> insert @.t values ('1a')
> insert @.t values ('1b')
> insert @.t values ('1c')
> insert @.t values ('2')
> insert @.t values ('2a')
> insert @.t values ('2b')
> insert @.t values ('2c')
> insert @.t values ('3')
> insert @.t values ('3a')
> insert @.t values ('3b')
> insert @.t values ('3c')
> insert @.t values ('11a')
> insert @.t values ('21c')
> select x from @.t
> order by z, y
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "ALI" <kismet110@.yahoo.co.uk> wrote in message
> news:1150111751.001833.272460@.f14g2000cwb.googlegroups.com...
> Hi
> I'm hoping this will be straightforward for you guys to point me in the
> right direction.
> Friend of mine emailed me asking the following:
> We have a table with a house plot number on it, which is varchar(5).
> Example values are:
> 1
> 1a
> 1b
> 1c
> 2
> 2a
> 2b
> 2c
> 3
> 3a
> 3b
> 3c
> 11a
> 21c
> When we sort these they come out as follows:
> 1
> 1a
> 1b
> 1c
> 11a
> 2
> 2a
> 2b
> 2c
> 21c
> 3
> 3a
> 3b
> 3c
> Is there an easy way to get them to sort as per the first example? I.e.
> 1 first, then 1a, 1b, 1c followed by 2, 2a etc and not 11a?
> I thought it'd be simple but not so! Would appreciate your advice on
> the simplest way of achieving this please.|||Thanks for your help Tom, hopefully this will get them what they want,
I don't feel totally stupid now too for thinking it would be _really_
simple!
Tom Moreau wrote:
> Try:
> declare @.t table
> (
> x varchar (5) primary key
> , y as case when patindex ('%[a-z]', x) = 0 then ''
> else right (x, len (x) - patindex ('%[a-z]', x) + 1) end
> , z as case when patindex ('%[a-z]', x) = 0 then cast (x as int)
> else cast (left (x, patindex ('%[a-z]', x) - 1) as int) end
> )
> insert @.t values ('1')
> insert @.t values ('1a')
> insert @.t values ('1b')
> insert @.t values ('1c')
> insert @.t values ('2')
> insert @.t values ('2a')
> insert @.t values ('2b')
> insert @.t values ('2c')
> insert @.t values ('3')
> insert @.t values ('3a')
> insert @.t values ('3b')
> insert @.t values ('3c')
> insert @.t values ('11a')
> insert @.t values ('21c')
> select x from @.t
> order by z, y
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Toronto, ON Canada
> .
> "ALI" <kismet110@.yahoo.co.uk> wrote in message
> news:1150111751.001833.272460@.f14g2000cwb.googlegroups.com...
> Hi
> I'm hoping this will be straightforward for you guys to point me in the
> right direction.
> Friend of mine emailed me asking the following:
> We have a table with a house plot number on it, which is varchar(5).
> Example values are:
> 1
> 1a
> 1b
> 1c
> 2
> 2a
> 2b
> 2c
> 3
> 3a
> 3b
> 3c
> 11a
> 21c
> When we sort these they come out as follows:
> 1
> 1a
> 1b
> 1c
> 11a
> 2
> 2a
> 2b
> 2c
> 21c
> 3
> 3a
> 3b
> 3c
> Is there an easy way to get them to sort as per the first example? I.e.
> 1 first, then 1a, 1b, 1c followed by 2, 2a etc and not 11a?
> I thought it'd be simple but not so! Would appreciate your advice on
> the simplest way of achieving this please.