How To Use Wildcard Characters With Control Parameters
Jul 27, 2006
Hi guys,
I have a gridview and textbox. I can filter the grid just fine with the textbox, but I would like to allow the user to type in part of a name.
I thought something like this would work but it doesn't:
Emp_Name LIKE '%'+@Emp_Name+'%'
Thank you.
View 3 Replies
ADVERTISEMENT
Feb 1, 2006
to reference columns.
i have a table that has a column that is repeated 25 times, sort of.
table_1
tbl_ID (PK)
tbl_c_1 char 5
tbl_c_2 char 5
tbl_c_3 char 5
tbl_c_4 char 5
tbl_c_5 char 5
....
tbl_c_25 char 5
everytime i want to query for any of tbl_c_? that contain a specific value i have to reference all 25 in my query. is there a better way?
I cannot change the table.
View 6 Replies
View Related
Nov 11, 2005
Hi
First interaction to the forum.
My Query is :
I had a User Management module in my application where I created a user with name
`~!@#$@%^&*()[_]+|}{":?><-=[[]];',./
Now I have a functionality to search for the user existing. For that give the search string or a single character and it finds out all the records containing the character.
How do I go about it as the SP i created for it gives correct results except the following
1. Search for % - Gives all record
2. Search for _ - Gives all records
3. Search for [ - Gives NO record
4. Search for the whole string - Gives NO Record
I handeled a few issues
1. replaced [ by [[]
2. replaced _ by [_]
So issues 2 & 3 are resolved.
Tried replacing % by [%] but did not work
Could someone plz help
Thanks in advance
Ashutosh
View 11 Replies
View Related
Jun 15, 2015
I am developing for a customer and they want a search facility that uses boolean logic and special characters. So they want to be able to add "AND" "OR" "NOT" "*" and "?". And for this to effect the search in the predicted way and ranked. I was wondering if there is any examples of this type of search implemented?Â
View 3 Replies
View Related
Oct 24, 2007
The where statement on my stored proc is as follows:
Where actv.ProjID + '-' + actv.Activity = @project
@project is something the user provides in the form of "xxxx-xx-xx-xx". I would like to use a wildcard, so I changed my where statement to the following:
Where actv.ProjID + '-' + actv.Activity = @project + '%'
But this returns nothing and I am not sure why. I don't get any errors, just no results. Anyone got any ideas as to why?
Thanks in advance!
View 9 Replies
View Related
Mar 7, 2001
I have a stored proc which will be fed a value that is compared to a char value for a selection. One of the choices might be 'all' for which I want to return all records. Something like this
create procedure name @location char(40)
as select ----------------
where locname like @location
I tried using LIKE COALESCE but no luck. Any ideas
Thanks
View 1 Replies
View Related
Oct 10, 2005
Beyond my control: I am finding control characters (likely tab) ismaking its way into address fields of our operational system. This ismessing me up when I load the data into our warehouse w/ BCP (fieldsget shifted).Is the a nifty way to strip control characters from data?TIARob
View 1 Replies
View Related
Jul 20, 2005
I have been testing our SQL Mail setup in SQL Server 2000 (sp3a) andhave found that when I attach results as a file, every other characteris a control character which causes each real character output on aseparate line. I have no idea why this is happenening, I've never seenit before.The code looks like this;EXEC master.dbo.xp_sendmail@recipients = '<email address>',@dbuse = 'TestDB',@query = 'select top 50 descr from AdTable',@message = 'nathan email test',@subject='SQL Mail test',@attach_results = 'true',@width = 100,@separator = ','The results look like this! -descr-----etc.When I view the result text file with an advanced text editor I cansee that every other character is a control - these characters are notin the data, I have already checked this, so it looks like its theyare being created by SQL Server or the mail system? Any advice muchappreciated.Nathan
View 6 Replies
View Related
May 12, 2008
SelectCommand="SELECT [id], [ref_id], [ref_name] FROM [ref] where [delete_flag] = 'N' AND [flag_transmit] = 'N' AND [ref_name] = @ref_name ">
<asp:ControlParameter Name="ref_name" ControlId="SrchRefName" PropertyName="Text" ConvertEmptyStringToNull="false"/>
The gridview of all the records is displayed on the page by default. There is a lookup of SSN and Name and putting values in those fields should filter the records and display only the row containing entered Name.I have trouble with the SelectCommand. No gridview is displayed with the above command even if value is entered in the Lookup textBox (SrchRefName).But when I change the selectcommand to- (using OR) SelectCommand="SELECT [id], [ref_id], [ref_name] FROM [ref] where [delete_flag] = 'N' AND [flag_transmit] = 'N' OR [ref_name] = @ref_name "> <asp:ControlParameter Name="ref_name" ControlId="SrchRefName" PropertyName="Text" ConvertEmptyStringToNull="false"/> the default gridview is displayed with all the records even though a value is entered in the lookup text box. Please help.
View 2 Replies
View Related
Oct 26, 2006
Hi All,
I have not heard any news on this topic elsewhere so thought I would ask here....
I would like to gain control over parameters in terms of:
1. Parameter placement as in how many parameters on a row, not just 2. It would be nice to be able to specify a row number in the defintiion of a parameter for example.
2. Access to the parameter text via a custom assembly to support multi-langauge reports.
I know other folks have talked about these things and some of us 'hope they are coming one day'...I was wondering if that day might be any closer now?
Thanks
View 3 Replies
View Related
Sep 17, 2007
Hello,
I'm trying to do something simple but can't make it work. I want to use the result of this sql "Select MAX(Stoptime) AS LatestStop FROM Stoptime" and use it in "Delete from Stoptime Where Stoptime > ?" but here with just the date. How do I set this up with parameters in the Control Flow in Integration Services?
Regards,
Kristian
Sweden
View 3 Replies
View Related
Mar 11, 2008
I have reportviewer control into the aspx page and i want to save the parameters informations to the database. but i also want to stick with reportviewer parameter UI instead of my own UI.
Is that possible using ReportViewer?
Thanks in Advance
Rohit
View 1 Replies
View Related
Jun 20, 2007
Hi.
Is it possible to set Parameters for the reportViwer control in remote mode.
I tried doing this
ReportViewer1.ServerReport.SetParameters(Session("ClientId")) and got this error
Unable to cast object of type 'System.Int32' to type 'System.Collections.Generic.IEnumerable`1[Microsoft.Reporting.WebForms.ReportParameter]'.
View 3 Replies
View Related
May 24, 2015
I am just wondering if i can control the access of range of variables from users' logins.
To be more specific, if i a parameter alpha has five values (1,2,3,4,5) and then i have 3 users A, B C, what i need is:
1. A can access Vaues(1, 3)
2. B can access Values (2, 4)
3. C can access Values(3,5)
Is there anyway i can do this either from the stored procedure i am getting the data or i can do it on SSIS development side?
View 4 Replies
View Related
May 22, 2015
I have a third party app that passes parameters (main dataset query) from the app to SSRS. Â Unfortunately, when the parameters are passed from the app they will contain equal signs ("=") in front of each parameter. Â For example, the parameters that may be passed to the main dataset query should be:
"HYDRO, OKO, ONEPL, TECHNI"
However, the parameters that are passed from the app, get to SSRS as:
"=HYDRO, =OKO, =ONEPL, =TECHNI"
Again, this is for the main dataset query and there may be one parameter or there may be any number of them.
Basically, I need to strip the "=" signs from the parameters. whether there is one parameter or ten.
I believe that I will need a custom function to strip the equal signs?
View 5 Replies
View Related
Jan 4, 2008
I'd like the state of the function bars to stay at whatever it was as the user moves from one report to the next rather than opening to full each time a new report is opened. Can this be done through a setting or programatically at teh report level? Is there a <default_toolbars_OpenState> tag or something?
Thanks in advance.
View 4 Replies
View Related
Sep 6, 2015
I am passing a field value from main report to a parameter in a drill through sub report. But some field values contain 'special characters'. Those field values that contain special characters are not working for drill through. Javascript code to include special characters to pass to sub report parameter?
View 3 Replies
View Related
Jan 25, 2008
Hello,
I am passing the partameters to MS Report Viewer control to view the report. It is working fine with normal parameters like 'abc', 'Jon' etc.
But fails with parameters having special characters like 'abc+', 'Version 1.1 Part 1', 'R1.8 RC' throws error "
The parameter is missing a value"
Could anyone please help on this.
Thanks,
Chandroday
View 1 Replies
View Related
Feb 19, 2008
In my application I must store over 16000 character in a sql table field . When I split into more than 1 field it gives "unclosed quotation mark" message.
How can I store over 16000 characters to sql table field (only one field) with language specific characters?
Thanks
View 3 Replies
View Related
Jan 27, 2008
Hi All,
I am placing a Matrix inside the table control for grouping requirements,but when we export the report to the Excel, the contents inside the table cell are ignored. Is there any way to get the full report exported, as per the Requirement.Please help me with this issue.
With Thanks
M.Mahendra
View 5 Replies
View Related
Oct 25, 2007
does any one have and example of how to embedd a flash swf file onto a report.??? Is it possable? any examples would be helpful.
View 1 Replies
View Related
Mar 5, 2008
Hi everybody,
I would like to know if there is any property in sql2000 database to separate lowercase characters from uppercase characters. I mean not to take the values €˜child€™ and €˜Child€™ as to be the same. We are transferring our ingres database into sqlserver. In ingres we have these values but we consider them as different values. Can we have it in sqlserver too?
Hellen
View 1 Replies
View Related
Jul 19, 2006
Good day experts,
I wonder if i got an answer for this.
How can i iliminate a letters from a set of integers and characters using a SQL Statement
for ex:
ABC9800468F
is that possible?
is there a function that i can use to iliminate them?
View 3 Replies
View Related
Jun 30, 2006
Hello everyone and thanks for your help in advance. I am working on an application that does a property search off of a database that contains approximately 40000 records. The search criteria allows the use to specify a minimum and maximum price, subdivision name, number of bedrooms, etc. I set up a stored procedure to query the databse. if one of the parameters is not specified, i simply pass it a "%". However, when i execute this sproc in Query Analyzer, it takes in excess of 10 seconds to return the records, even if only one or two are returned. I am assuming this is due to the use of the wildcard character when the user does not have a preference, but I am not sure of any other way to do this. Any help on this topic would be grealy appreciated.
View 3 Replies
View Related
Sep 9, 2006
hi,i have an sqldatasource a gridview and dropdownlistthe gridview is updated on the selectedIndexChanged Event of the dropdownlistmy goal is to add an item in the dropdownlist with the name ALLwhich should matches all the records in the databasei tried to put the value of the all item = * and % but neither seems to workany help on what could be going wrong would be appreciated
View 7 Replies
View Related
May 23, 2003
hi,
how do i contsruct a SQL query to search for the % character in a data field?
thanks
View 1 Replies
View Related
Oct 29, 2007
Is it a good idea to have multiple contains? I have this query:Select * from myTable where contains (Col1, 'Africa') or (Col2, 'Africa')Also, I tried this, didn't return anything:Select * from myTable where contains (Col1, 'Africa*') or (Col2, 'Africa')Both Col1 and Col2 has the string 'Africa' and 'African' in it.--sharif
View 2 Replies
View Related
Aug 22, 2006
alter procedure sp_ADsearch @tbname varchar(1000),@searchproduct nvarchar(500)
as
declare @sqlstr nvarchar(1000)
set @sqlstr='select * from '
set @sqlstr= @sqlstr + @tbname
set @sqlstr= @sqlstr + ' where name like '
set @sqlstr= @sqlstr + '%' + @searchproduct + '%'
exec sp_executesql @sqlstr
--
exec sp_ADsearch product,ee
when executing the procedure i am getting an error "Incorrect syntax near 'ee'.".
whats wrong with the syntax? how to use % along with variables
View 5 Replies
View Related
Mar 20, 2007
UPDATE #2: When it said "Do you want to install Microsoft SQL Server" I said "yes" and that caused it to work. I exited and re-ran and now the print runs w/o the "install SQL Server" (If the prompt had said "Do you want to install the print dialog" we wouldn't be having this discussion...)
UPDATE: After posting this i discovered that the same thing occurs when attempting to print the report direct from IE6: First a dialog pops up "Do you want to install this software?" Name: Microsoft SQL Server. When I click "Don't Install" I get the dialog "unable to load client print control." Since this happens direct from IE6 I suspect it's browser settings. I'll resume tomorrow and post a followup.
My WinForm C# app integrates Reporting Services by calling them from WebBrowser controls. The problem is attempts to print cause a dialog: "unable to load client print control."
I've read prior posts that say "enable Active-X in your browser" - I don't know how to do that from a WebBrowser control.
Any ideas how to support Reporting Services "Print" from within a WebBrowser control?
RELATED THREADS
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=332145&SiteID=1
http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=264478&SiteID=1
View 1 Replies
View Related
Dec 30, 2006
I am trying to control how users view records. I want to create a solution that would, for instance permit:user A to view Store 1user B to view store 2 and store 3user C to view store 5 and store 6and User D to view all stores even if more stores were added in the future (in other words user D would have access to all records)
I want to create an 'authorization table' so that different users can see different records. I think the easiest way to do this is to pass a parameter to the where clause, but the problem that I face is the how can I use a wildcard in a SQL 'IN' clause? Does anyone have any suggestions. Perhaps I am taking the wrong approach. I would appreciate any guidance.
View 2 Replies
View Related
Jan 28, 2007
Hello,
I'm trying to pull some data from a table with the option to filter on 2 columns.
I've set up my sql statement to accept 2 parameters and I'd like to be able to send 1 or 2 wildcards if needed. My statement looks like this:SELECT *
FROM City WHERE CityName= @CityName AND State= @State
ORDER BY CityName
For example, if you wanted all of the cities in all of the states I would pass (*,*) as parameters.
Or if I wanted to see all of the states that have a city named Richmond, I'd pass (Richmond,*) as the parameters.
The wildcards are not returning anything and I don't know why. It works fine if I pass something like (Indianapolis,Indiana) as parameters so I think it's in my use of the wildcards that is wrong.
Thanks.
View 4 Replies
View Related
Dec 10, 2001
I'm writing a stored procedure where one of the arguments (WHERE area) really only needs to be used in some circumstances. I.e., when the procedure is passed a USER_ID it needs to check that against the database, but in some instances I'll send 0 instead of a real USER_ID, and in those cases it should return all records regardless of the ID.
Here's what I've got:
...
and b.user_ID = CASE @user_ID WHEN 0 THEN '%'
ELSE @user_ID
...
...the problem being the '%' part. That won't work on an integer column.
Does anyone have any ideas here?
Thanks,
Al
View 2 Replies
View Related
Oct 5, 2006
I've got a text field with a list of dates in this format:
10/31/2006
11/2/2006
11/4/2006
11/5/2006
The field can contain multiple dates (as listed above). I need to query the db and retrieve dates by month and year. For example, all fields containing 10/%/06 or 11/%/%06.
My query:
SELECT * FROM tblCalData WHERE visible='1' and approved='1' and eventDates LIKE '11%06%' ORDER BY eventDates DESC
so even though a field contains dates in October and November, selecting all November dates, in this example, don't appear. The query seems to be looking only at the first date.
Is this possible? Is there another/better way to do this?
Thanks!
:grimey
View 14 Replies
View Related