Showing posts with label creating. Show all posts
Showing posts with label creating. Show all posts

Monday, March 26, 2012

Question regarding creating If Else functions in my report

Hi, I'm new and i'm having trouble trying to create this query at the "DATA" tab of my rdl.

What i'm trying to do here is passing 2 employee name from two drop

down text box(doing a filtering with "From Employee" and "To

Employee"), and assign it to a global variable which i declared.

Is there something i miss out or i did worng which cause a error

"Incorrect syntax near the keyword 'BEGIN'. (.Net SqlClient Data

Provider)".

It would be so helpful of you if links of website or previous post or

any reference are provided, which give some basic tutorial on how to

create codes as shown below.

Thanks in advance

DECLARE @.G_StartEmp AS CHAR(10), @.G_EndEmp AS CHAR(10)


IF @.StartEmp > @.EndEmp

BEGIN

Set @.G_StartEmp = @.EndEmp

Set @.G_EndEmp = @.StartEmp

END

ELSE

BEGIN

Set @.G_StartEmp = @.StartEmp

Set @.G_EndEmp = @.EndEmp

END IF


BEGIN

select * from EMPLOYEE

where employeename between G_StartEmp and G_EndEmp

END

DId you wrap that code in a stored procedure ?

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||Hi, after spending some time again on this, i realize i added an extra "IF" , which is the cause of this error.

Thanks for taking your time to reply me Jens K. Suessmeyer.

DECLARE @.G_StartEmp AS CHAR(10), @.G_EndEmp AS CHAR(10)


IF @.StartEmp > @.EndEmp

BEGIN

Set @.G_StartEmp = @.EndEmp

Set @.G_EndEmp = @.StartEmp

END

ELSE

BEGIN

Set @.G_StartEmp = @.StartEmp

Set @.G_EndEmp = @.EndEmp

END (Originally was "END IF")


BEGIN

select * from EMPLOYEE

where employeename between G_StartEmp and G_EndEmp

END

Friday, March 23, 2012

Question on user-defined hierarchies

Hi, all,

Just suddenly dont see a big deal of creating user-defined hierarchies. As user-defined hierarchies are used for navigation purpose only. But you wont complete all possible hierarchies where users may want to browse? What I mean is users can alwyas feel it more flexible to browse the cube data by simply drag and drop any attributes into any way of levels they want to see. Does this make more sense?

Just a bit confused about the big deal of user-defined hierarchy and looking forward to hearing from you shortly for your guidance and advices.

Thanks a lot in advance.

With best regards,

Yours sincerely,

Well, it is pretty much a matter of taste whether you create user hierarchies or you let users use individual attribute hierarchies. However while user hierarchies are less flexible in terms of querying they are arguably more user-friendly, they make defining several types of common calculation much easier (for example if you have a user hierarchy on your Time dimension going Year->Quarter->Month it's very easy to work out what Year any particular Month is in; it's a bit more complex just using attribute hierarchies) and I've heard there are performance benefits to using user hierarchies although I've never noticed any significant different myself.

Chris

|||

Hi, Chris,

Thanks a lot for your advanced ideas.

With best regards,

Yours sincerely,

Question on SSIS and .NET 1.1

We are migrating our databases from SQL Server 2000 on Win2k to SQL Server 2005 on Win 2k3 machines. Our applications useDTS packages , like creating dynamically in the (application) front end dynamically and sometimes just passing global parameters.

Now with SQL Server 2005 , we have decided to move to SSIS, as SQL Server 2005 has limited support for DTS. Now we were using a com+ assembly from microsoft for using these DTS packages from the front-end(Application). Can we accomplish the same with SSIS using applications developed in .Net Framework 1.1? Are there any work arounds? If not how can we accomplish this in 1.1 framework. Does SSIS expose any API that can be leveraged using .NET 1.1?

Did anyone face any other problems apart from these trying to make 1.1 apps talk to SQL 2005?

I guess this is more of a question to Microsoft experts, or programmers who already had similar experience already migrating to 2005.

It is hard to find information online on this subject. If anyone has valuable information regarding this, please reply with links..

Thanks in advance,

S

My understanding is that a .NET 1.1 application cannot interoperate directly with .NET 2.0 libraries such as the SSIS API. A web service should fit the bill nicely, though as far as just executing packages and passing in variables. If you're actually generating packages, that logic would probably need to be moved completely into the service which would also help insulate your application against future SSIS API changes. Your .NET 1.1 app could talk to the .NET 2.0 service, which could in turn automate the SSIS APIs.

In general, a .NET 1.1 application should not have much trouble making the switch from SQL Server 2000 to 2005, especially if you're using managed providers and calling stored procedures. If the app is calling the database with direct SQL queries, then you may have some minor syntax issues. If you're using procedures the Upgrade Advisor should be able to notify you of any problems, otherwise you'll have to test thoroughly.|||

In addition to nice Jay's wrap up, some mode ideas:

http://blogs.msdn.com/michen/archive/2007/03/22/running-ssis-package-programmatically.aspx

|||Thanks for all the replies..

Monday, March 12, 2012

Question on multiserver environment in SQL Server 2005

I am creating a backup strategy for our non-production SQL Server 2005 data. We wish to utiliza the Master/Target Server scenario avaible in SQL Server 2005 with events directed to the Master Server. The question I have is what is the symptoms from the Target Servers if the Master Server fails and is unavailable for whatever reason there might be? I can change the event notification back to local server, but what other impact is there and are there any recommendations as to handle a Master Server outage so Maintenance plans can continue to execute as scheduled on Target Servers.

Thank you!

Here's a response, but one that you won't like. Virtually nobody I know uses the Master/Target option. I am sure there must be some people who do, but it is rare. It is not used because the feature is not very robust or flexible.

Most people use a third-party monitoring program to accomplish what are want to do. There are many available. In addition, there are various third-party backup programs that include backup monitoring built-in.

Question on multiserver environment in SQL Server 2005

I am creating a backup strategy for our non-production SQL Server 2005 data. We wish to utiliza the Master/Target Server scenario avaible in SQL Server 2005 with events directed to the Master Server. The question I have is what is the symptoms from the Target Servers if the Master Server fails and is unavailable for whatever reason there might be? I can change the event notification back to local server, but what other impact is there and are there any recommendations as to handle a Master Server outage so Maintenance plans can continue to execute as scheduled on Target Servers.

Thank you!

Here's a response, but one that you won't like. Virtually nobody I know uses the Master/Target option. I am sure there must be some people who do, but it is rare. It is not used because the feature is not very robust or flexible.

Most people use a third-party monitoring program to accomplish what are want to do. There are many available. In addition, there are various third-party backup programs that include backup monitoring built-in.