Showing posts with label view. Show all posts
Showing posts with label view. Show all posts

Friday, March 23, 2012

Promt user for criteria ?

I know it can be done with a SP but is there a way to prompt a user for
specific criteria like date range (between ? and ?) in a view.
I have a query in a view but I need to prompt the user for a date range, my
front end is access 2002 I can do it as a passthrough but it takes to long to
run and while testing I found that as a view it runs in half the time.
Thanks
Xavier
On Fri, 20 Jan 2006 07:36:05 -0800, Xavier wrote:

>I know it can be done with a SP but is there a way to prompt a user for
>specific criteria like date range (between ? and ?) in a view.
>I have a query in a view but I need to prompt the user for a date range, my
>front end is access 2002 I can do it as a passthrough but it takes to long to
>run and while testing I found that as a view it runs in half the time.
Hi Xavier,
SQL Server can't ever prompt the user. Not in a view, and not in a
stored procedure either.
If you refer to prompting for arguments in the front end, then passing
them as parameters to the back end: that is possible in stored procs,
but not in a view. But you can use variables in a SELECT statement that
queries a view.
However, I am intrigued by your statement that you found a view to be
faster than a stored procedure. While I don't doubt your observations,
I'm pretty sure that there's no such blanket statement about performance
of views vs stored procedures. I suspect that is has something to do
with the specific details of your tables, your stored procedure and your
view.
To investigate this further, you'll have to give more details: how do
your tables look (CREATE TABLE statements), how are the view and the
stored procedure defined (CREATE VIEW / CREATE PROC), what does your
data typically look like (INSERT statements for a small sample of your
data) and how do you call the view and the stored proc?
Chcek out www.aspfaq.com/5006 for some tips on how to assemble this
information.
Hugo Kornelis, SQL Server MVP
|||Hugo
You are correct I mistakenly said faster than a SP but I should has said
faster that a passthrough query from my front end which is access.
I could not run my report from access unless I add the view to my access
front ent as a linked table, is there any other way ? for an access report to
run a sql view and pass a parameter, like a date range to extrack particular
data example ()now
minus 48hrs everytime the user runs it.
Thanks
Xavier
"Hugo Kornelis" wrote:

> On Fri, 20 Jan 2006 07:36:05 -0800, Xavier wrote:
>
> Hi Xavier,
> SQL Server can't ever prompt the user. Not in a view, and not in a
> stored procedure either.
> If you refer to prompting for arguments in the front end, then passing
> them as parameters to the back end: that is possible in stored procs,
> but not in a view. But you can use variables in a SELECT statement that
> queries a view.
> However, I am intrigued by your statement that you found a view to be
> faster than a stored procedure. While I don't doubt your observations,
> I'm pretty sure that there's no such blanket statement about performance
> of views vs stored procedures. I suspect that is has something to do
> with the specific details of your tables, your stored procedure and your
> view.
> To investigate this further, you'll have to give more details: how do
> your tables look (CREATE TABLE statements), how are the view and the
> stored procedure defined (CREATE VIEW / CREATE PROC), what does your
> data typically look like (INSERT statements for a small sample of your
> data) and how do you call the view and the stored proc?
> Chcek out www.aspfaq.com/5006 for some tips on how to assemble this
> information.
> --
> Hugo Kornelis, SQL Server MVP
>
|||On Mon, 23 Jan 2006 06:36:03 -0800, Xavier wrote:

>Hugo
>You are correct I mistakenly said faster than a SP but I should has said
>faster that a passthrough query from my front end which is access.
>I could not run my report from access unless I add the view to my access
>front ent as a linked table, is there any other way ? for an access report to
>run a sql view and pass a parameter, like a date range to extrack particular
>data example ()now
>minus 48hrs everytime the user runs it.
Hi Xavier,
When using Access, you want to make sure that network traffic is kept at
a minimum. Stored procedures and pass-through queries meet this
requirement without any doubt. I'm less sure about queries on linked
tables.
I have read reports claiming that Access will fetch a complete linked
table over the network to execute the query client-side. I have also
read reports claiming that the former reports are rubbish. My personal
experience with Access is too limited to be able to tell which reports
are true and which aren't. If you want to find out, then run a profiler
trace while running Access and check what Access really sends to the
server.
I would personally use a stored procedure, but that's probably because
I'm more at ease on SQL Server - I know how to squeeze every drop of
performance out of the SP code; I'm not nearrly as proficient in
optimizing Jet SQL.
If your tests indicate that an Access query on an Access linked table
(to a SQL Server table or view) is faster than calling a stored
procedure, then by all means go for it.
Hugo Kornelis, SQL Server MVP
|||Hugo
Thank you, based on your experience with SQL can you recommend
and good books on SP and queries within sql.
We are planning on moving from access as a front end reporting tool and
replacing it with Crystal Reports, any thoughts on this you might want to
share?
We have a web based application where our users need to print certain forms
with the data that is on their screen plus a little more not seen at the
moment
that we have determined this information will print on every form allways.
The provider of our web based application which uses a propriatary tool kit
together with FrontPage to compile the forms will only support Access or
Crystal Reports.
Thanks
Xavier
"Hugo Kornelis" wrote:

> On Mon, 23 Jan 2006 06:36:03 -0800, Xavier wrote:
>
> Hi Xavier,
> When using Access, you want to make sure that network traffic is kept at
> a minimum. Stored procedures and pass-through queries meet this
> requirement without any doubt. I'm less sure about queries on linked
> tables.
> I have read reports claiming that Access will fetch a complete linked
> table over the network to execute the query client-side. I have also
> read reports claiming that the former reports are rubbish. My personal
> experience with Access is too limited to be able to tell which reports
> are true and which aren't. If you want to find out, then run a profiler
> trace while running Access and check what Access really sends to the
> server.
> I would personally use a stored procedure, but that's probably because
> I'm more at ease on SQL Server - I know how to squeeze every drop of
> performance out of the SP code; I'm not nearrly as proficient in
> optimizing Jet SQL.
> If your tests indicate that an Access query on an Access linked table
> (to a SQL Server table or view) is faster than calling a stored
> procedure, then by all means go for it.
> --
> Hugo Kornelis, SQL Server MVP
>
|||On Thu, 26 Jan 2006 18:31:01 -0800, Xavier wrote:

>Hugo
>Thank you, based on your experience with SQL can you recommend
>and good books on SP and queries within sql.
Hi Xavier,
I've learnt most from Books Online and by trial and error. But I'll give
you some titles that are often recommended in these groups by very
kowledgeable persons.
Two books specifically targetted towards coding for SQL Server:
* Advanced Transact-SQL for SQL Server 2000 (Ben-Gan/Moreau)
* The Guru's Guide to Transact-SQL (Henderson)
A book about the inner working of SQL Server - a great aid if you start
to think about fine-tuning, since knowing how things work is the best
way to tune:
* Inside SQL Server 2000 (Delaney)
An advanced book, full with tips and tricks. Definitely no easy stuff
here. And it uses ANSI standard SQL - you'll have to change some things
here and there to amke it run on SQL Server:
* SQL for Smarties (Celko)

>We are planning on moving from access as a front end reporting tool and
>replacing it with Crystal Reports, any thoughts on this you might want to
>share?
I've never worked with Crystal Reports.
Hugo Kornelis, SQL Server MVP

prompted for username and password

hi,
I've a .net app written to view reports. The app is set up in iis
with the anonymous access checked and integrated windows
authentication checked for the default web site (my app - it's a
dedicated web server) and the same with the Reports and ReportServer
virtual directories within the Default Web Site.
I can get to my app's start page fine and browse the site I've
written, but when I try to view a report from the app I am prompted
for a username and password. Why is this and how can I get rid of
it'
I've added new roles for everyone and iusr_<machinename> but still I
can't get rid of these prompts.
Any ideas'
Gearóidlook at internet explorer configuration. Security / Intranet / and deselect
"Ask for..."
"Gearoid" wrote:
> hi,
> I've a .net app written to view reports. The app is set up in iis
> with the anonymous access checked and integrated windows
> authentication checked for the default web site (my app - it's a
> dedicated web server) and the same with the Reports and ReportServer
> virtual directories within the Default Web Site.
> I can get to my app's start page fine and browse the site I've
> written, but when I try to view a report from the app I am prompted
> for a username and password. Why is this and how can I get rid of
> it'
> I've added new roles for everyone and iusr_<machinename> but still I
> can't get rid of these prompts.
> Any ideas'
> Gearóid
>|||Thanks for the suggestion but that doesn't seem to be the problem. If
I run the report server from my own machine and try to access reports
from other machines accross the network there's no problem. But if I
deploy the reports to a web server (still on the same network) I get
prompted for the username / password.
Does this sound like a firewall issue with the web server? Or an IIS
issue? Or a Report Server Config issue?
I am truly stumpted here...
"LeCroix" <LeCroix@.discussions.microsoft.com> wrote in message news:<4B95B3D1-745F-4D8F-A127-5EEA073F7626@.microsoft.com>...
> look at internet explorer configuration. Security / Intranet / and deselect
> "Ask for..."
> "Gearoid" wrote:
> > hi,
> >
> > I've a .net app written to view reports. The app is set up in iis
> > with the anonymous access checked and integrated windows
> > authentication checked for the default web site (my app - it's a
> > dedicated web server) and the same with the Reports and ReportServer
> > virtual directories within the Default Web Site.
> >
> > I can get to my app's start page fine and browse the site I've
> > written, but when I try to view a report from the app I am prompted
> > for a username and password. Why is this and how can I get rid of
> > it'
> >
> > I've added new roles for everyone and iusr_<machinename> but still I
> > can't get rid of these prompts.
> >
> > Any ideas'
> >
> > Gearóid
> >

Prompt for user input in criteria field of view

In Access, I use [Enter Date] in the Criteria field of the Query. I tried the same thing in SQL Server in the Criteria field of the View and it does not recognize this. Is there a comparable command in SQL to get user input into the Criteria field of a view?

Hi,

you either have to use a procedure with an input parameter or have to put a condition on the query with querying the view with:

Select * from SomeView Where SomeColumn = 'SomeValue'

But there is no GUI on SQL Server.

HTH, Jens Suessmeyer.

http://www.sqlserver2005.de

|||MSSQL as service prompts you nothing. You have to write client application to be prompted.|||

Hi Jens,

I was able to find out how to do what I needed using the @. sign (i.e. @.Date Required?). In the criteria field of the SQL view, this generates a 'Date Required?' prompt box when running the view.

Thanks anyway!

Ernie

sql

Wednesday, March 21, 2012

prompt for parameter in a view

I would like to create a view that will prompt the user for a parameter.
Much the same way a user can provide the paramenter for a query in Access.
Seems like it should be simple, but I don't know how to do it.
Any ideas?
Thanks
Tyler
Hi,
SQL Server will not prompt for a user input. Access will allow because it
have both Front end and back end.
Thanks
Hari
SQL Server MVP
"Tyler" <Tyler@.discussions.microsoft.com> wrote in message
news:CA2CA968-4B15-4ED6-AECF-FE3C17C119AB@.microsoft.com...
>I would like to create a view that will prompt the user for a parameter.
> Much the same way a user can provide the paramenter for a query in Access.
> Seems like it should be simple, but I don't know how to do it.
> Any ideas?
> Thanks
> --
> Tyler

Monday, March 12, 2012

Programmatically show & don't show texboxes

Good day!

It is possible that you can programatically show & don't show texboxes in the reports?

Coz the user can choose if he want to view ir not the names.

can it be possible?

thanx....

On the Visible propery you can place an expression under Hidden..

Like:

=iif(expression,True,False)

Saturday, February 25, 2012

programing problem

Hi i have a view structured something like this :
id catname productname
1 aa prod1
1 bb prod2
1 aa prod1
1 bb prod2
2 cc prod3
2 dd prod4
2 cc prod3
2 dd prod4
i need to insert to another table so the result will look like this :
id data
1 aa bb prod1 prod2
2 cc dd prod3 prod4
what is the best way to approach this?
currently i am using a complicated code with cursurs that does ont realy wo
rk
and i feel is not in the right direction i hope there is a knowen solution
for this problem
thanks
shay cohen> what is the best way to approach this?
Doing it in your client app / reporting tool or programming language.
AMB
"Shay" wrote:

> Hi i have a view structured something like this :
> id catname productname
> 1 aa prod1
> 1 bb prod2
> 1 aa prod1
> 1 bb prod2
> 2 cc prod3
> 2 dd prod4
> 2 cc prod3
> 2 dd prod4
> i need to insert to another table so the result will look like this :
> id data
> 1 aa bb prod1 prod2
> 2 cc dd prod3 prod4
>
> what is the best way to approach this?
> currently i am using a complicated code with cursurs that does ont realy
work
> and i feel is not in the right direction i hope there is a knowen solution
> for this problem
> thanks
> shay cohen
>|||What you want is a cross-tab or pivot table see the following url:
http://msdn.microsoft.com/library/d...r />
_04j7.asp|||"patrick_brisbine" <patrickbrisbine@.hotmail.com> wrote in message news:<1107464600.631695.3
6160@.c13g2000cwb.googlegroups.com>...
> What you want is a cross-tab or pivot table see the following url:
> http://msdn.microsoft.com/library/d...4j7.
asp
thanks,
this looks like a good start, now what if need to do string
manipulation
on each value so aa is XXaa and prod1 is FFprod1 etc,all values need
to go in to one target colume and the number of columns in the view
can change ?
thanks alot for you time and attention
shay

Programatically viewing the data in a particular column

This is my first attempt to create a Vb.net class as well as my first attempt to programmatically view SQL retrieved data as opposed to using the built-in data controls...so be gentle.

My question is looking at the code below which I have already put together...how do I actually see what the data is in a particular column... One of my columns for example is the "Title" which contains the Page Title for Search Engine Optomization. I need to be able to read this value so I can assign it to the Page.

'First Do a Database Connection

IfNot Page.IsPostBackThen

'Start by determining the connection string value

Dim connStringAsString = _

ConfigurationManager.ConnectionStrings("CMConnectionString").ConnectionString

'Create a SqlConnection instance

Using myConnectionAsNew SqlConnection(connString)

'Specify the SQL query

Const sqlAsString ="SELECT * FROM SEO where ParentType='Department' AND ParentLevel='0' "

'Create a SqlCommand instance

Dim myCommandAsNew SqlCommand(sql, myConnection)

'Get back a DataSet

Dim myDataSetAsNew DataSet

'Create a SqlDataAdapter instance

Dim myAdapterAsNew SqlDataAdapter(myCommand)

myAdapter.Fill(myDataSet,"SEO")

'Create a DataView

Dim myDataViewAsNew DataView

myDataView.Table = myDataSet.Tables("SEO")

'Ok...this is where I'm lost. Now how do I look up the value for the column "Title" in this Dataset

'Close the connection

myConnection.Close()

'End database connections

EndUsing

You can use the following line to get a datacolumn of a known column name or column number:
Dim myColumnValueAs DataColumn = myDataSet.Tables("SEO").Columns("Title")

To access other columns, simply replace the column name ("Title") with a respective column name

Alternatively you can use the following line to access the value inside the1st row of the coloumn
Dim strAsString =CStr(myDataSet.Tables("SEO").Rows(0).Item("Title"))

To access other rows, simply replace the row number (0) with a respective row number

Hope this helps you.

|||

I'm relatively new too.

Instead of writing the entire class as 'codeaholic' did (looks daunting), can I use the drag'n'drop methodology to place a SqlDataSource1 control onto an ASPX page and configure the datasource with an appropriate Select statement, (easy part) and then use less VB code to find the value of a column for a given record?

In other words, if I want to extract a single column of a record do I have to 'throw away' all those luxury features of design timeTongue Tied

|||

i'm personally not familier with using data controls in my pages as im currently using either 2-tier or 3-tier application development, but it's possible to do what you want.
just create the data controls one-by-one till you get a datagrid or dataview object containing the values you wanted, then use code-behind to access the datagrid or dataview objects for your values.
or you could even directly bind your values to controls using the datasource property and other respective properties.
however it may get tedious when you need a large number of data objects to access different values in different tables.

i would also advise strongly against doing so as it would affect the performance of your pages due to unneeded controls needed to be complied and loaded.
and there's always the security issue.
there's always better ways to do it.
hope this helps you.

|||

AnjinG:

You can use the following line to get a datacolumn of a known column name or column number:
Dim myColumnValueAs DataColumn = myDataSet.Tables("SEO").Columns("Title")

Hmm, just getting around to trying this and it doesn't work. Using this code above. myColumnValue.toString is simply the word "Title". Its not actually extracting the value of the column Title but simply setting this to the name of the column...

Tongue Tied

|||

Hi,

you can try doing this to directly access the particular column value
you willl need to traverse the rows in the table

Dim i as integer

For i = 0To myDataSet.Tables("SEO").Rows.Count - 1

Dim vAsString = myDataSet.Tables("SEO").Rows(i).Item(columnIndex)

Next

|||Yeh, I just used the row syntax you indicated as the "second" possibility. Since there is only one row, we don't have to loop it. Thanks.

Programatically View / Stored Procedure with N fields

We have a table that has 10 fields of which say 5 are either non textual. We
want to have a resultant view with 7 fields, namely 1 numeric field and the
5 non-numeric fields (textual) and one additional field for the non textual
field name. In the example below the last 5 field names are Prod1, Prod2,
Prod3, Prod4, Prod5.
E.g.
Original
SA, Sales, Man1, Actual, Jan, 100, 200, 300, 400, 500
SA, Sales, Man2, Actual, Jan, 1, 2, 3, 4, 5
Result
SA, Sales, Man1, Actual, Prd1, Jan, 100
SA, Sales, Man1, Actual, Prd2, Jan, 200
SA, Sales, Man1, Actual, Prd3, Jan, 300
SA, Sales, Man1, Actual, Prd4, Jan, 400
SA, Sales, Man1, Actual, Prd5, Jan, 500
SA, Sales, Man1, Actual, Prd1, Jan, 1
SA, Sales, Man2, Actual, Prd2, Jan, 2
SA, Sales, Man3, Actual, Prd3, Jan, 3
SA, Sales, Man4, Actual, Prd4, Jan, 4
SA, Sales, Man5, Actual, Prd5, Jan, 5
In essence the size of the table will end up as
n records * 5 fields.
Thanks in advance.Avril
I'm not sure understood you.
Have you tride using UNION ALL to get what you wanted?
"Avril" <Avril@.ppp.com> wrote in message
news:effVz3oZGHA.1220@.TK2MSFTNGP02.phx.gbl...
> We have a table that has 10 fields of which say 5 are either non textual.
> We want to have a resultant view with 7 fields, namely 1 numeric field and
> the 5 non-numeric fields (textual) and one additional field for the non
> textual field name. In the example below the last 5 field names are Prod1,
> Prod2, Prod3, Prod4, Prod5.
>
> E.g.
> Original
> SA, Sales, Man1, Actual, Jan, 100, 200, 300, 400, 500
> SA, Sales, Man2, Actual, Jan, 1, 2, 3, 4, 5
> Result
> SA, Sales, Man1, Actual, Prd1, Jan, 100
> SA, Sales, Man1, Actual, Prd2, Jan, 200
> SA, Sales, Man1, Actual, Prd3, Jan, 300
> SA, Sales, Man1, Actual, Prd4, Jan, 400
> SA, Sales, Man1, Actual, Prd5, Jan, 500
> SA, Sales, Man1, Actual, Prd1, Jan, 1
> SA, Sales, Man2, Actual, Prd2, Jan, 2
> SA, Sales, Man3, Actual, Prd3, Jan, 3
> SA, Sales, Man4, Actual, Prd4, Jan, 4
> SA, Sales, Man5, Actual, Prd5, Jan, 5
> In essence the size of the table will end up as
> n records * 5 fields.
> Thanks in advance.
>|||Avril,
In SQL Server 2005, you can use the UNPIVOT operator for this.
In SQL Server 2000, you can use a CROSS JOIN like this:
select
column1, column2, column3, column4,
'Prd' + Nch as Prd,
column5,
case Nch
when 1 then Prod1 when 2 then Prod2 when 3 then Prod3
when 4 then Prod4 when 5 then Prod5 end as LastColumn
from yourTable
cross join (
select '1' as Nch union all select '2' union all select '3'
union all select '4' union all select '5'
) as F
There may be some typos, since you didn't give the create table
statements and sample data as INSERTs to test with, and you
will have to fix column names for the columns whose names
you didn't provide.
Steve Kass
Drew University
Avril wrote:

>We have a table that has 10 fields of which say 5 are either non textual. W
e
>want to have a resultant view with 7 fields, namely 1 numeric field and the
>5 non-numeric fields (textual) and one additional field for the non textual
>field name. In the example below the last 5 field names are Prod1, Prod2,
>Prod3, Prod4, Prod5.
>
>E.g.
>Original
>SA, Sales, Man1, Actual, Jan, 100, 200, 300, 400, 500
>SA, Sales, Man2, Actual, Jan, 1, 2, 3, 4, 5
>Result
>SA, Sales, Man1, Actual, Prd1, Jan, 100
>SA, Sales, Man1, Actual, Prd2, Jan, 200
>SA, Sales, Man1, Actual, Prd3, Jan, 300
>SA, Sales, Man1, Actual, Prd4, Jan, 400
>SA, Sales, Man1, Actual, Prd5, Jan, 500
>SA, Sales, Man1, Actual, Prd1, Jan, 1
>SA, Sales, Man2, Actual, Prd2, Jan, 2
>SA, Sales, Man3, Actual, Prd3, Jan, 3
>SA, Sales, Man4, Actual, Prd4, Jan, 4
>SA, Sales, Man5, Actual, Prd5, Jan, 5
>In essence the size of the table will end up as
>n records * 5 fields.
>Thanks in advance.
>
>|||Steve
Thanks that worked for me. Now if I wanted to extend that to say
If Column3 = 'Man2' then multiply the amounts by 0.15 or
If Column3 = 'Man3' then multiply the amounts by 0.3
How would this affect the statement below.
Column1 Column2 Column3 Column4 Column5
Prd1 Prd2 Prd3 Prd4 Prd5
SA Sales Man1 Actual
Jan 100 200 300 400 500
SA Sales Man1 Actual
Jan 1 2 3 4 5
SA Sales Man2 Actual
Jan 100 200 300 400 500
SA Sales Man2 Actual
Jan 1 2 3 4 5
SA Sales Man3 Actual
Jan 100 200 300 400 500
SA Sales Man3 Actual
Jan 1 2 3 4 5
select
column1, column2, column3, column4, column5,'Prd' + Nch as Prd,
case Nch
when 1 then Prd1
when 2 then Prd2
when 3 then Prd3
when 4 then Prd4
when 5 then Prd5
end as Amount
from dbo.Sheet1$
cross join (
select '1' as Nch union all select '2' union all select '3'
union all select '4' union all select '5'
) as F
Thanks in advance.
"Steve Kass" <skass@.drew.edu> wrote in message
news:uAu7oipZGHA.5000@.TK2MSFTNGP05.phx.gbl...
> Avril,
> In SQL Server 2005, you can use the UNPIVOT operator for this.
> In SQL Server 2000, you can use a CROSS JOIN like this:
> select
> column1, column2, column3, column4,
> 'Prd' + Nch as Prd,
> column5,
> case Nch
> when 1 then Prod1 when 2 then Prod2 when 3 then Prod3
> when 4 then Prod4 when 5 then Prod5 end as LastColumn
> from yourTable
> cross join (
> select '1' as Nch union all select '2' union all select '3'
> union all select '4' union all select '5'
> ) as F
> There may be some typos, since you didn't give the create table
> statements and sample data as INSERTs to test with, and you
> will have to fix column names for the columns whose names
> you didn't provide.
> Steve Kass
> Drew University
> Avril wrote:
>|||On Mon, 24 Apr 2006 06:55:21 +0100, Avril wrote:

>Steve
>Thanks that worked for me. Now if I wanted to extend that to say
>If Column3 = 'Man2' then multiply the amounts by 0.15 or
>If Column3 = 'Man3' then multiply the amounts by 0.3
>How would this affect the statement below.
(snip)
>select
>column1, column2, column3, column4, column5,'Prd' + Nch as Prd,
>case Nch
>when 1 then Prd1
>when 2 then Prd2
>when 3 then Prd3
>when 4 then Prd4
>when 5 then Prd5
>
END * CASE Column3
WHEN 'Man2' THEN 0.15
WHEN 'Man3' THEN 0.3
ELSE 1

>end as Amount
>from dbo.Sheet1$
>cross join (
>select '1' as Nch union all select '2' union all select '3'
>union all select '4' union all select '5'
> ) as F
(Untested - see www.aspfaq.com/5006 if you prefer a tested reply)
Hugo Kornelis, SQL Server MVP|||Thanks
"Hugo Kornelis" <hugo@.perFact.REMOVETHIS.info.INVALID> wrote in message
news:vmgq42tjek1ur7ru4velvtv3hiqnv7gekq@.
4ax.com...
> On Mon, 24 Apr 2006 06:55:21 +0100, Avril wrote:
>
> (snip)
> END * CASE Column3
> WHEN 'Man2' THEN 0.15
> WHEN 'Man3' THEN 0.3
> ELSE 1
>
> (Untested - see www.aspfaq.com/5006 if you prefer a tested reply)
> --
> Hugo Kornelis, SQL Server MVP