Filtering The Parameter Content

Apr 18, 2007



Hello,



I have built a report using a Cube (and not a relational database).



I have a date as a parameter and I would like to filter its content: the parameter goes from 1900 to 2090 and I would like the user to see only from 2006 to 2090.



Can you help me by giving me tricks to do it ? There may have several ways of doing it but I can't find them.



Thank you in advance !

Alexis







View 3 Replies


ADVERTISEMENT

Text Box Content As Select Query Parameter

May 17, 2008

Hello, I'm learning about asp .net and I've created a simple application with SQLServer integration. I have 3 text boxes where I can insert text and then use them as parameters for the Select query string of a SqlDataSource which is then bound to a DataGrid.My question is: Is there any default configuration I can use with the SqlDataSource which do not add a given field as a parameter to the WHERE clause if the text box content is empty ? Sure I can sweep through all my text boxes, check if they're empty and dynamically build the WHERE clause with correct parameters, but is theres a built-in, more elegant way to solve this ?Thanks in advance.Arashikage  

View 2 Replies View Related

Filtering Datetime Parameter

Sep 21, 2013

We can use LIKE '% ...%' for character string search but how can we do the same thing to a datatime parameter like '2013-09-20 13:34:43.098'?

View 12 Replies View Related

Filtering Options In A Parameter

Aug 28, 2007



Hello, I have a report in which I would like to give the user the ability to select how a parameter is filetered.
Option 1 would be to filter by a range of value ie: WHERE member.age BETWEEN (@Start) AND (@End)
-say everyone between the ages of 50 through 80
Option 2 would be to filter by specific but multiple values ie: WHERE member.age IN (@Age)
-say anyone who is 25, 50 and 75.
How can this be done? Thanks

View 5 Replies View Related

Filtering Table Name With Parameter

Apr 2, 2006

<br><br>I obtain
table names from a database and pass them to a dropdownlist. Based on
user selection, I want to pass each table name to a query.Here is an
extract from my code:
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
ConnectionString="<%$ ConnectionStrings:ConnectionString %>"
SelectCommand="select * from @dDTable">
<SelectParameters>
<asp:ControlParameter ControlID="DropDownList1"
Name="dDTable" PropertyName="SelectedValue" DefaultValue="product"
Direction="InputOutput" Size="15" Type="String" />
</SelectParameters>
</asp:SqlDataSource>I keep getting this error: Must declare
the table variable "@dDTable".Please does anyone knows the best way to
go about this?

View 3 Replies View Related

What Value Needs To Be Passed To Parameter In WHERE To Negate The Filtering

Apr 9, 2008

I am using two drop downs, like so:
<asp:DropDownList ID="ChurchStateDrop" runat="server"                              DataSourceID="ChurchStateDropData" DataTextField="State"                              DataValueField="State" AutoPostBack="True"                              onselectedindexchanged="ChurchStateDrop_SelectedIndexChanged"                             AppendDataBoundItems="True">        <asp:ListItem Value="?????" Selected="True" Text="All States" /></asp:DropDownList>
<asp:DropDownList ID="ChurchCityDrop" runat="server"                             DataSourceID="ChurchCityDropData" DataTextField="City"                              DataValueField="City" AutoPostBack="True"                             onselectedindexchanged="ChurchCityDrop_SelectedIndexChanged"                             AppendDataBoundItems="True">        <asp:ListItem Value="?????" Selected="True"  Text="All Cities" /></asp:DropDownList>
I have ????? in the value fields because I don't know what value needs to be passed to negate filtering (to choose all). The Dropdowns have the following SQLDatasources:<asp:SqlDataSource ID="ChurchStateDropData" runat="server"                               ConnectionString="<%$ ConnectionStrings:tceDatabaseOnlineSQLConnection %>"                                SelectCommand="SELECT DISTINCT                                                                        [State]                                                             FROM [ChurchView]"                               DataSourceMode="DataReader"></asp:SqlDataSource>
<asp:SqlDataSource ID="ChurchCityDropData" runat="server"                                ConnectionString="<%$ ConnectionStrings:tceDatabaseOnlineSQLConnection %>"                               SelectCommand="SELECT DISTINCT                                                                        [City]                                                             FROM [ChurchView]                                                          WHERE ([State] = @State)"                               DataSourceMode="DataReader">                               <SelectParameters>                                 <asp:ControlParameter ControlID="ChurchStateDrop"                                                                   Name="State" PropertyName="SelectedValue" Type="String" />                               </SelectParameters></asp:SqlDataSource>
Now, lets say I wanted to pass a value to the WHERE statement in ChurchCityDropData to coincide with 'All States', what would I replace value="??????" with? Now you may think I'm crazy to do such a thing, but this actually has to do with adding a Denomination Dropdown to show Denominations from all states or all cities. I will figure out the best logic for that later, I just want to know the wildcard to pass to the parameter to choose all states (negate filtering).

View 3 Replies View Related

Stored Procedure Parameter Filtering

Jan 24, 2008

consider a stored procedure with a parameter @OrderID, i want to perform the following query :select * from Orders where OrderID = @OrderIDi want the condition to be true when parameter @OrderId is null so what is the syntax for that? i think there is an IF CONDITION that can be embedded with where clause.

View 6 Replies View Related

How To Set A Parameter For Filtering Not Blank Records

Feb 7, 2007

In my report I want an optional parameter to filter all records with a specific field that is not blank. I tried several scenario's without result...

In the parameter I want to set a text value like "exampletext".

In the filter I want a check: if the parameter value is "exampletext", only show the records where field "abc" is not blank.

On the tab Filters from the Table properties I can set three values: Expression, Operator and Value.

Please help!

View 1 Replies View Related

Filtering Data Using A Boolean Parameter

Apr 24, 2008



Hello, I am trying to use a boolean parameter to filter data in a table, but there is something I am missing.

Basically I want something like this:
I have a boolean parameter, "EP", and I have a filter set on my table as:

Expression Operator Value
=Fields!REFERRAL_SOURCE.Value = IIF (Parameters!EP.Value, "1297", ????)

Using the filter tab, I can't specify an expression for the 'Operator' so I was trying to work it out using either '=' or 'like'. What needs to go into the ???? in order for the referral source to be "not 1297" (i.e. the inverse of the filter)?

Or, am I completely missing an easy way to do this?

Thanks.

View 4 Replies View Related

How To Ignor Filtering Criteria If There Is A Null Value For Parameter

May 15, 2008

I have gridview and i want to ignor that filtering if that parameter is empty how do i write that query.
my query is
select * from UserMAster where UserId=@USerID and RoleId=@RoleId
if @UserId is blank then i want to select all records without filtering with user Id a
nd if i have passed null or anything as parameter in roleId then alsoi want all the records if it contain value then i want to do filetring is it possible to with query. or else send me some alternative so that i don't need to execute more query.
 

View 7 Replies View Related

Filtering A Report On A DateTM Field Using A Parameter If Possible?

Apr 13, 2007

I am currently writing a report that will use as one of the filters the date (in this case it is the date of service of a physician office visit).

however the DB developers included the date and the time of the visit in one field so my resulting data set contains 4/13/2007 4:30pm for example, so using an @date parameter as a filter on the data field doesn't work because when you run the report and enter the date in the parameter it doesn't return anything.



I am an SQL Report writer amateur so I am sure there is an easy fix, any and all help will be appreciated.



Mark



View 7 Replies View Related

Filtering Parameters Based On A Selection Of Another Parameter

Dec 28, 2007



Hi,

Im trying to create a drop down parameter whereby if i select a certain field, a different dropdown will be filtered off only the relevant selections, is this possible.

View 7 Replies View Related

Filtering Data Based On Select Parameter Values

Jun 6, 2006

Hi,

I am using SQL 2005. I have a SELECT query in a stored proc with 3 parameters:
@subaccount,@numDaysCutoff,@numDaysPcts. The proc needs to be modified to return data when subaccount values are any of these:

FRRIJ
FRRIC
FRMM
ROBECO
FRJV
MAIL
FRUKV
FRICE

Currently I use a WHERE condition and am able to get data correctly. However, for a NULL value I should get everything including those not in the above list. Should I use CASE statement instead? How?

@subaccount VARCHAR(8) = NULL
, @numDaysCutoff INT = 1
, @numDaysPcts INT = 1

SELECT Subaccount = ISNULL(h.subaccount, lo.subaccount)
, SecurityID = ISNULL(h.security_id, lo.security_id)
, SecurityName = s.name
, QtyHeldAndPending = ISNULL(h.quantity, 0) +
(CASE WHEN lo.type = 1 THEN lo.resulting_quantity * (-1)
WHEN lo.type = 2 THEN lo.resulting_quantity
ELSE 0 END )
, L.AverageDailyVolume
, XDaysVol = L.AverageDailyVolume * @numDaysPcts
, CutoffVol = L.AverageDailyVolume * @numDaysCutoff
, DaysVolHeld = h.quantity / NULLIF(L.AverageDailyVolume, 0)
, HeldPctNDaysVol = h.quantity / NULLIF((L.AverageDailyVolume * @numDaysPcts), 0) * 100
, TargetedHoldingsUSD = tm.ApprovedPortfolioTarget * iv.value_usd
, CutoffVolUSD = L.AverageDailyVolume * @numDaysCutoff * s.price_usd
, TargetedPctNDaysVol = (tm.ApprovedPortfolioTarget * iv.value_usd) /
NULLIF((L.AverageDailyVolume * @numDaysPcts * s.price_usd), 0) * 100
, DaysVolTargeted = (tm.ApprovedPortfolioTarget * iv.value_usd) /
NULLIF((L.AverageDailyVolume * s.price_usd), 0)
, NDaysCutoff = @numDaysCutoff
, NDaysPcts = @numDaysPcts
FROM subaccount_positions_table h --vGlobalHoldings h
JOIN iv_subaccount_table iv ON iv.subaccount = h.subaccount
FULL OUTER JOIN LiveOrders lo ON lo.subaccount = h.subaccount AND lo.security_id = h.security_id
FULL OUTER JOIN TM_DerivedSecurityTargetDetail tm ON tm.Subaccount = h.subaccount AND tm.SecurityID = h.security_id
LEFT JOIN dbo.security_table s ON s.security_id = COALESCE(h.security_id, lo.security_id)
LEFT JOIN dbo.SecurityLiquidity L ON L.SecurityID = h.security_id AND SourceID = 99
WHERE (h.subaccount = ISNULL(@subaccount, h.subaccount)
OR lo.subaccount = ISNULL(@subaccount, h.subaccount) )
AND status = 1
AND ( h.quantity > (L.AverageDailyVolume * @numDaysCutoff) -- qtyHeld > XDaysVol
OR -- Targeted Vol exceeds cutoff
ISNULL((tm.ApprovedPortfolioTarget * iv.value_usd), 0) >
ISNULL((L.AverageDailyVolume * @numDaysCutoff * s.price_usd), 0) -- Target > XDaysVol
)
ORDER BY ISNULL(h.subaccount, lo.subaccount), ISNULL(h.security_id, lo.security_id)

Thanks in advance!!!
sqlnovice123

View 2 Replies View Related

Gridview - SqlDatasource - How Do You Get All Values For A Like Text Parameter Or A Boolean Field When Filtering?

Mar 18, 2008

I have a gridview connected to a sqldatasource, and it works pretty good.  It gives me the subsets of the information that I need.  But, I really want to let them choose all the companies and/or any status.  What's the best way to get all the values in the gridview...besides removing the filters :)
I thought the company would be easy, I'd just set the selected value to blank "", and then it'd get them all....but that's not working.  And, for the boolean, I have no idea to get the value without having a separate query.
(tabs_done=@tabsdone) and (company like '%' + @company + '%')1 <asp:DropDownList ID="drpdwnProcessingStatus" runat="server">
2 <asp:ListItem Value="0">Open</asp:ListItem>
3 <asp:ListItem Value="1">Completed</asp:ListItem>
4 </asp:DropDownList>
5
6
7 <asp:DropDownList ID="drpdwnCompany" runat="server">
8 <asp:ListItem Value="">All</asp:ListItem>
9 <asp:ListItem Value="cur">Cur District</asp:ListItem>
10 <asp:ListItem Value="jho">Jho District</asp:ListItem>
11 <asp:ListItem Value="sea">Sea District</asp:ListItem>
12 <asp:ListItem Value="san">Net District</asp:ListItem>
13 <asp:ListItem Value="sr">Research District</asp:ListItem>
14 </asp:DropDownList>
15
16
17 <asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:HRFormsConnectionString %>"
18 SelectCommand="SELECT DISTINCT [id], [lastname], [company] FROM [hr_term] hr where (tabs_done=@tabsdone) and (company like '%' + @company + '%')">
19 <SelectParameters>
20 <asp:ControlParameter ControlID="drpdwnProcessingStatus" DefaultValue="0" Name="tabsdone" PropertyName="SelectedValue" />
21 <asp:ControlParameter ControlID="drpdwnCompany" DefaultValue="" Name="company" PropertyName="SelectedValue" />
22 </SelectParameters>
23 </asp:SqlDataSource>
24

 

View 3 Replies View Related

SQL Vs XML Page Content

Apr 2, 2008

I want to create the most effective way (google) to have content displayed on a web page. 
Currently, we are updating to SQL and populating to web via calling SQL statements hardcoded to page.  I want to know if this is ok to do, or should we be reading from a static XML file that is updated? 
 I think the XML is the way to go being that i may have answered my own question, but i was curious to what the experts on asp.net had to say.
Thanks,Nick

View 9 Replies View Related

Moving Content From One Db To Another

Mar 9, 2007

an outside developer has sent us a mdf file that contains the need updates to a database.

here is where the problem comes in, how can i append the contents of the mdf file to an existing db?

there are about a dozen tables, 50 stored procs, and one new user.

View 2 Replies View Related

How To Store A Content Into Database

Aug 22, 2006

Hi everyone,
 
I'm just using TEXTBOX control to save data into my DB. My question is, if I have multiple lines of sentences, it does not store as what it looks like. For example;
 
Hello, Mike
 
It stores into the database as "Hello, Mike" and if I read from the database, it does not have seperate lines and shows it like this;
Hello, Mike
 
How can I store the contents into database and make the contents as original? (Sorry for the poor English, but I hope you understand it.)

View 2 Replies View Related

Automatic Content Expiry

Jun 21, 2007

Hi All,I have a job coming up which involves me creating a  vacancy system for our website.I (think) I'll only need one table:ID (PK)JobTitleJobLocationSalaryHoursJobDescriptionValidFrom (Date/Time)ValidTo (Date/Time)I'll display this data using a C#.Net repeater but I was wondering how I can automatically strip the page of the jobs that have gone past their expiry date? Is is straightforward to achieve?Thanks in advance,Brett 

View 2 Replies View Related

How To Modify Xml Content In SQL 2000

Jan 14, 2008

HiI have developed a sql procedure for updating some xml content using SQL 2005 xQuery features.For example:Declare @xmlContent = '<books><book name="asp"/>< book name = "sql"/></books>'--Now I want to add attribute "book_id" to the xml content.SET @xmlContent.modify('insert attribute book_id{"1" } into (/books/book[@name="asp"])[1] ')SET @xmlContent.modify('insert attribute book_id{"2" } into (/books/book[@name="sql"])[1] ')SELECT @xmlContent--OUTPUT will be<books><book name="asp" book_id="1"/><book name="sql" book_id="2"/></books>QUESTIONQ1. Do we have any extension or plugin such that this SQl 2005 xquery feature can be incorporated in SQL 2000?Q2. If the answer for Q1. is no (as I expect), then do we have any TSQL feature in SQL 2000 for modifying xml content?I found all examples in SQl 2000 related with "openxml" function which performs the select kind of operations only. Like selecting data in XML format OR converting xml data in to tabular format. But I couldn't find any xml modification TSQL in SQl 2000 which can add element/attributes or change values.one workaround could be to consider xml content as string and use string functions to modify the content.But is there any more sensible approach available in SQL 2000?    

View 1 Replies View Related

SQL Server As Content Store

Dec 29, 2003

Okay, moving to developing a small site that will be storing articles - that is a site largely consisting of html marked up articles with images. We already have an SQL Server so it is becoming the back-end.

So, since I'm not an SQL Server expert, some general advice on this would be appreciated? The articles, as I say in HTML (largely just markup for titles, and general text) would be stored in the DB? As Text datatypes?

How about the images...on disk or in SQL?

View 3 Replies View Related

Cannot Able To See The Content Of A Column In A Table?

Nov 12, 2001

hi everybody,

The problem is, I have a table with one column of varchar(8000) datatype. It has got 1000's of records. Through Query Analyzer, I am not able to view my records after 257 columns in my table, even I increased my textsize by using 'set textsize' command.

Any other setting is available to correct this. Any help is appreciated.

thanks,
Vasu

View 2 Replies View Related

Table Empty Of Content

Sep 10, 2001

I have a particular production database that on a few recent occasions has suddenly had one of it's tables empty of content. Now there are no jobs or triggers in place neither is any stored procedures that could perform a delete or alter table operation in place. The permissions have been set not to allow this either. The datatype is text only. What is intriguing is the QA server has an exact mirror and this dosen't happen. Has anyone come across this sort of phenomenon?

View 2 Replies View Related

Field Content Alteration

Feb 24, 2000

Hello,

I have a field in a table called 'CourseId' - the course Id should always contain a backslash somewhere in the list of numbers eg :

12342322
11231131

Unfortunately, some of the course Ids have a forward slash instead of a backslash eg :

462322/1
23/232323

How can I update the field to replace the / with a

Any help is very much appreciated.

Thanks in advance,

Anthony

View 1 Replies View Related

How Can I Read The Content Of Transaction Log

Oct 30, 2006

How can I read the content of transaction log?

View 2 Replies View Related

How To Extract Content From Email

Feb 22, 2012

I want some way to extract email content from email that we send/receive in account.....

This question is in context to Text Analytic

View 4 Replies View Related

Content Of Sp From System Tables

Jun 4, 2008

Hi,

Anyone plz do tell me what s the query to see the text content of stored procedure from system database tables..

from which table we get the content of sp


Thanks & Regards

ARV

View 9 Replies View Related

What Express Content Do You Want MS To Provide?

Dec 14, 2005

Folks,

I'm the project lead for SQL Server Express in Microsoft (as well as owning the Storage Engine). I'm going to make sure that threads on this forum get answered - I see a bunch with no answer so far.

Now to the point - we’re in the process of assessing the content that exists to help people learn and use SQL Server Express. This includes demos, tutorials, whitepapers, Webcasts, Starter Kits, and any other type of content you could imagine. So this is a great chance to TELL US WHAT YOU WANT! We’ll integrate your feedback and make sure that we try and address the most requested areas of content. Please be as specific as you can.

Thanks in advance for your feedback.


Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
(Legalese: This posting is provided "AS IS" with no warranties, and confers no rights.)

View 9 Replies View Related

Field Content Reversal

Apr 9, 2007

I have a field 'LastName' in a SQL 2000 table 'customers' that is populated with all our customer's full names in this order:

Smith John M

I need to flip the information around so that it can be exported into a CSV file for an automated email notification program to notify them their items are in and having it in first, last, MI format is much more professional.

I've been playing with charindex and stuff routines and am spinning my wheels. Is there a canned routine for something like this - this must have been done a hundreed times out there in SQL somewhere (or it's so easy to do that everyone (but me) just cranks it from scratch).

Thanks in advance for your help.

ronanpcs

View 8 Replies View Related

Content OF Stored Procedure ??

Mar 31, 2008

Hi ,

Cay anyone tell me where is the content of Stored Procedure
stored in the database.. in which table


Thanks & Regards

Arv

View 12 Replies View Related

Merge Database Content

Jul 23, 2005

hi,i have a sqlserver CE and a sqlserver database.The tables are exactly the same on both databases.the sqlserver CE database Content will be synchronized with thesqlserver database with insert orders..is there a way to merge the two databases?this would be great cause different content will be inserted in bothdatabases. After a synchronisation both databases should have the samecontent..i hope you understood my problem. my english is not very well..christian

View 1 Replies View Related

Formatting Database Content

May 16, 2006

HiI have set up a SQL database to contain alist FAQ's for our company andthen plan to pull this info off using a web page.So far I have entered the data but I am unable to control how it isdisplayed inside SQL ie I cannot enter new blank lines I have triedusing lots of spaces but this does not work when I use the website todisplay the info.Is there a way of formatting and editing the data in the sql databaseas I am unable to do this, if I try to edit the data in the database Ihave to copy it to notepad delete what is in the database, edit thetext in notepad then paste it back in.There must be a better way.Please helpalamb200

View 8 Replies View Related

Web Content Database. Is There A Limit?

Jul 20, 2005

HiI've developed a simple web service that lets people easily set up their ownwebsites, and keep them up-to-date themselves.I'm storing all the content, including images in the SQL 2000 database. Sofar it's working well enough. Is there likely to be a performance orreliability problem as the system grows?You can see it in operation here: www.up-to-the-minute.comIt's early days and any comments and ideas are welcome.John SouthPangbourne UK

View 1 Replies View Related

Best DataType For Content System

Jul 20, 2005

Hello,On our corporate website, we will be using email notifications forvarious things. I would like for our marketing guy to be able to editthe email templates over the web so that I don't have to keep updatingthem myself for every little change. I want to store the templateswithin the database (since they will be small). The templates will beHTML based and not more than a few thousand bytes in length. Should Iuse a VARCHAR or VARBINARY, or what? I would assume VARCHAR, but I'mnot sure.Thanks,Will

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved