Showing posts with label input. Show all posts
Showing posts with label input. Show all posts

Friday, March 30, 2012

HELP!!-Jump to URL

I input for "Jump to URL".
But I don't want to open URL on same page.
Is it possible to open new window for that URL page after click one which
have a "Jump to URL".Yes it is, something like this:
="javascript:void(window.open('" & Globals!ReportServerUrl &
"?%2fJBOSC%2fJLRRS%2fworkorder%2fwondetail&WON=" & Fields!COL2.Value &
"','_blank'))"
"Ken" wrote:
> I input for "Jump to URL".
> But I don't want to open URL on same page.
> Is it possible to open new window for that URL page after click one which
> have a "Jump to URL".
>
>

Monday, March 26, 2012

Help! SQL Express, Standard or Enterprise? or Access?

I'm not a developer and would like your input to compare against what a sales rep is telling me.

I'm managing a small web project that will have a database with a max of 20,000 records with less than 50 field each. It will be hit by anything from 200 to 500 people in a day (max) via Internet connection from all over with all sorts of speed.

The users will select less than 50 filters to obtain the results of the info they are looking for among the 20000 records. Most users will only choose less than 10 filters per search.

That's all that the database will do...seems to me enterprise is way too much, but since I'm not expert, need one of you to help with your input.

Thanks very much!


Hi,

you already said, thats this is a quite small web project. I would sugest using the SQL Server Express edition, also for the reason that it can be used for free. If you are experiencing speed problems which are based on the restrictions of Express (limitation in CPU and RAM) you can later easily upgrade to Standard Edition with just a backup and restore. You will have to keep in mind that if you are using Standard or Enterprise edition you will need either user CALs for named users or named machines. So as the rules of thumbs you will have to get CALs for very user connecting to the SQL Server. (Which is quite expensive if the server is accessible through the internet). The other option would be to get a processor license. Based on the per unit prices you can calculate the breakeven for each of the models. Be also aware that although you are using a web frontend where theoretically on one users accesses the database (e.g. the service account for the webserver) the licensing from above applies (multiplexing)

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

What about using a hosted solution? That would be cheapest and easiest way if it's available. You could get that for $5-10 a month.

|||

Thank you very much. We need user CALs for named machines, so I guess I need further research on cost for that.

I truly appreciate you the taking time to answer.

|||

Tricky part I found on that is that the services that seem to meet some of our need also limit what we can do. I'm still searching this possibility, but so far, we haven't found a packaged solution. We are in Denver and are scheduling to visit a couple of host sites in the next few weeks and see how well that fits us. Once all the phases of the deployment are completed, will have users throughout the state (potentially 15K-20K) so the host site can address our cpu demands...

Txs. for the response. I'll let you know if this route works...

Help! SQL Express, Standard or Enterprise? or Access?

I'm not a developer and would like your input to compare against what a sales rep is telling me.

I'm managing a small web project that will have a database with a max of 20,000 records with less than 50 field each. It will be hit by anything from 200 to 500 people in a day (max) via Internet connection from all over with all sorts of speed.

The users will select less than 50 filters to obtain the results of the info they are looking for among the 20000 records. Most users will only choose less than 10 filters per search.

That's all that the database will do...seems to me enterprise is way too much, but since I'm not expert, need one of you to help with your input.

Thanks very much!


Hi,

you already said, thats this is a quite small web project. I would sugest using the SQL Server Express edition, also for the reason that it can be used for free. If you are experiencing speed problems which are based on the restrictions of Express (limitation in CPU and RAM) you can later easily upgrade to Standard Edition with just a backup and restore. You will have to keep in mind that if you are using Standard or Enterprise edition you will need either user CALs for named users or named machines. So as the rules of thumbs you will have to get CALs for very user connecting to the SQL Server. (Which is quite expensive if the server is accessible through the internet). The other option would be to get a processor license. Based on the per unit prices you can calculate the breakeven for each of the models. Be also aware that although you are using a web frontend where theoretically on one users accesses the database (e.g. the service account for the webserver) the licensing from above applies (multiplexing)

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

What about using a hosted solution? That would be cheapest and easiest way if it's available. You could get that for $5-10 a month.

|||

Thank you very much. We need user CALs for named machines, so I guess I need further research on cost for that.

I truly appreciate you the taking time to answer.

|||

Tricky part I found on that is that the services that seem to meet some of our need also limit what we can do. I'm still searching this possibility, but so far, we haven't found a packaged solution. We are in Denver and are scheduling to visit a couple of host sites in the next few weeks and see how well that fits us. Once all the phases of the deployment are completed, will have users throughout the state (potentially 15K-20K) so the host site can address our cpu demands...

Txs. for the response. I'll let you know if this route works...

Sunday, February 19, 2012

Help with user defined function

I have a UDF that takes my input and returns the next valid business day date. My valid date excludes weekends and holidays.

It works perfect except for one issue. It doesn't check to see if today's date is a holiday.

I pass a query to sql server like so " select dbo.getstartdate('01/ 10/2007',2)"

It then moves ahead two business days and returns that date.

Here is the current code. Hopefully someone can tell me how to do the holiday check on the current date.

I really don't want to rewrite the whole script .

Code------------------

SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS OFF
GO

--DROP FUNCTION GetStartDate

--declare function receiving two parameters -
--the date we start counting and the number of business days

CREATE FUNCTION GetStartDate (@.startdate datetime, @.days int)
RETURNS datetime
AS
BEGIN

--declare a counter to keep track of how many days are passing
declare @.counter int

/*
Check your business rules. If 4 business days means you
count starting tomorrow, set counter to 0. If you start
counting today, set counter to 1
*/
set @.counter = 1

--declare a variable to hold the ending date
declare @.enddate datetime

--set the end date to the start date. we'll be
-- incrementing it for each passing business day
set @.enddate = @.startdate

/*
Start your loop.
While your counter (which was set to 1), is less than
or equal to the number of business days increment your
end date
*/
WHILE @.counter <= @.days

BEGIN

--for each day, we'll add one to the end date
set @.enddate = DATEADD(dd, 1, @.enddate)

--If the day is between 2 and 6 (meaning it's a week
--day and the day is not in the holiday table, we'll
--increment the counter
IF (DATEPART(dw, @.enddate) between 2 and 6) AND
(@.enddate not in
(
select HolidayDate
from tFederalHoliday
where [HolidayYear] = datepart(yyyy,@.enddate)
)
)
BEGIN
set @.counter = @.counter + 1
END

--end the while loop
END

--return the end date
RETURN @.enddate


--end the function
END


GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO

----------------------------

You can have a table with a list of holidays (both your company declared holidays and public holidays) and have the query check against the table in your UDF. This gives you the flexibility of adding/removing new holidays each year. You can either put the holidays in a table or even hardcode them in the UDF, whichever works best for you.

Help with TSQL where clause syntax

Hey everyone I want a where clause based off a variable input and I'm having some trouble with the syntax. My current code(incorrect) is below but it shows what I am aiming for. Does anyone have any suggestions?

Code Snippet

(CASE
WHEN @.inIndustry = 'ALL' THEN
WHERE EXISTS (SELECT 1 FROM sysdba.C_PROJECTREVENUE
WHERE OpportunityID = op.OpportunituID AND monthyear LIKE '%' + @.Year1)
ELSE
WHERE (acIF.Industry <> 'Defense' OR acIF.Industry IS NULL)
AND EXISTS (SELECT 1 FROM sysdba.C_PROJECTREVENUE
WHERE OpportunityID = op.OpportunituID AND monthyear LIKE '%' + @.Year1) END)


Maybe this:

Code Snippet

(CASE

WHEN @.inIndustry ='ALL'AND

EXISTS(SELECT 1 FROM sysdba.C_PROJECTREVENUE

WHERE OpportunityID = op.OpportunituID AND monthyear LIKE'%'+ @.Year1)

THEN 1

ELSE

CASEWHEN(acIF.Industry <>'Defense'OR acIF.Industry ISNULL)

ANDEXISTS(SELECT 1 FROM sysdba.C_PROJECTREVENUE

WHERE OpportunityID = op.OpportunituID AND monthyear LIKE'%'+ @.Year1)

THEN 1

ELSE 0

END--inner case

END)-- outer case

|||Hey. Thanks for the help but I dont see how that would work. I'm trying to make the WHERE clause dynamic in a way. It's all based off whatever the var @.inIndustry is equal to. So if @.inIndustry is equal to 'ALL' then is uses a certain where clause. I dont want to base the equivalence off of the entire statement there.|||

Code Snippet

WHERE(CASE

WHEN @.inIndustry ='ALL'AND

EXISTS(SELECT 1 FROM sysdba.C_PROJECTREVENUE

WHERE OpportunityID = op.OpportunituID AND monthyear LIKE'%'+ @.Year1)

THEN 1

WHEN(acIF.Industry <>'Defense'OR acIF.Industry ISNULL)

ANDEXISTS(SELECT 1 FROM sysdba.C_PROJECTREVENUE

WHERE OpportunityID = op.OpportunituID AND monthyear LIKE'%'+ @.Year1)

THEN 1

ELSE 0

END)

= 1

|||Ahh I see how it works now. I plugged it in and it works like a charm. Thanks for the help!
|||

No problem; my pleasure.

Much appreciated if you can mark the solution as the answer Smile

|||Actually it didnt work exactly as it should... This is the code i have at the moment.

Code Snippet


WHERE
(CASE
--MASTER
WHEN @.inIndustry = 'ALL'
AND EXISTS (SELECT 1 FROM sysdba.C_PROJECTREVENUE WHERE OpportunityID = op.OpportunityID AND monthyear LIKE '%' + @.Year1)

THEN 1

--ENERGY AND UTILITIES
WHEN @.inIndustry = 'EU' AND acIf.Industry = 'Energy and Utilities'
AND EXISTS (SELECT 1 FROM sysdba.C_PROJECTREVENUE WHERE OpportunityID = op.OpportunityID AND monthyear LIKE '%' + @.Year1)
THEN 1

-- NONGOV - E&U + OTHER
WHEN (acIF.Industry <> 'Defense' OR acIF.Industry IS NULL)
AND EXISTS (SELECT 1 FROM sysdba.C_PROJECTREVENUE WHERE OpportunityID = op.OpportunityID AND monthyear LIKE '%' + @.Year1)
THEN 1

ELSE 0
END) = 1

Now comparing original code and the code i wrote aboveI know that it performs the the last case statement no matter what i input for @.inIndustry. Is there any way to fix this?
|||

Nest CASE statements

CASE WHEN @.inIndustry = 'ALL' ..

ELSE

CASE WHEN ...

ELSE

END

END

|||I ended up adding checks to the last statement to make sure @.inIndustry wasn't equal to EU, ALL etc.. and it works fine now.

Thanks for all the help!