|
Ennis reply is the correct method, however be careful with this one, string too may together, and 7 is too many, and it can grind your query to a halt.
Best bet is to try and force some required filters and apply them first depending on your data size. I have even gone down the path of using a case statement to get the first valid filter, drop the results into a temp table and apply a secondary set of filters to the temp table to improve performance.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Hello,
I have asp.net webpage with ReportViewer control on it. I would like to maintain log for every export that occurs. Unfortunately there is no reportexport event for the web based report viewer (for windows control there is). Is there any way to log exports? Does report services maintain some internal log itself?
Thanks.
|
|
|
|
|
However, from my experience in Crystal you can disable certain buttons, including the export button. Then provide duplicate functionality of your own button. You would then be able to track the export.
Need custom software developed? I do C# development and consulting all over the United States.
If you don't ask questions the answers won't stand in your way.
Doing a job is like selecting a mule, you can't choose just the front half xor the back half so when you ask me to do a job don't expect me to do it half-assed.
|
|
|
|
|
That's an option but I was hoping for an easier/nicer solution.
|
|
|
|
|
Giorgi Dalakishvili wrote: easier/nicer solution.
You are using Crystal rght - not gonna happen. The reason we moved from CR was that it is a closed shop, you cannot extend it in any way.
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
|
Ah I missed that, I thought you were using Crystal (Ennis mentioned it)
Never underestimate the power of human stupidity
RAH
|
|
|
|
|
i am geting value from datbase with this code CONVERT(varchar(11), TH_DT_HolidayDate) AS Expr1 and output is jan 15 2009 . but i want output like jan 15,2009 .how can i do this .thnx in advance.
|
|
|
|
|
You could try something like:
SELECT ...
datename(month, TH_DT_HolidayDate)
+ datename(day, TH_DT_HolidayDate)
+ ', '
+ datename(year, TH_DT_HolidayDate) AS Result
...
|
|
|
|
|
thnx friend its working......
|
|
|
|
|
You're welcome
|
|
|
|
|
i want to know how to generate regular expressions for sql query
|
|
|
|
|
If you mean that you want to use regular expressions in the query, you can create CLR based user defined function to handle regular expressions.
But if you mean that you want to parse SQL using regular expressions, I think it's not the right way to go (if you really want to fully parse a statement). Typically parsing is done using tools like YACC[^] and lex[^].
|
|
|
|
|
To do what? If you just want to validate a query you can run with noexec on, it just parses it then.
Bob
Ashfield Consultants Ltd
Proud to be a 2009 Code Project MVP
|
|
|
|
|
|
Hi,
Tina P wrote: SQL server 2005 express edition (120) day trial
If you installed Express Edition, it's actually not a trial and won't expire after 120 days. It's free to use.
Tina P wrote: its not showing me the database that comes with the SQL server basis install (such as Northwind and Punlishers etc)
First thing is that os the database runniong. Check your services (SQLExpress...) to make sure it's started. After that, you have to create a connection:
- open server explorer
- select Data Connections , right click and select Add connection...
- in the dialog define the server name for example in format machinename\instancename. You can check the instance name from your Windows services (the instance name is in parenthesis).
After that you should have a connection.
Then another thing is that there are no sample databases shipped along the server anymore. You can download and instal AdventureWorks (which is a newer sample database) from: http://www.codeplex.com/MSFTDBProdSamples/Release/ProjectReleases.aspx?ReleaseId=18407[^]
Hope this helps,
Mika
|
|
|
|
|
Here is the problem:
I have a .net application (a button runs a stored proc, which in turn runs the SSIS package). I need to add a dialog so that each time someone wants to change or use a different flat file source, no problem they just browse to the location of the file and the flat file name and location are added to my flat file connection via the .NET application ,which all the files are in the same formatting. I am not sure where to start with the variables. >.NET dialog passed to Stored proc > passed to variable in SSIS package. I am not even sure how to do the stored proc to SSIS package in a flat file connection. Any help would be appreciated.
|
|
|
|
|
I am sending data from SQL 2005 database to AS400. What I want is, to delete all the records present in the AS400 table prior to the insertion. Is there a way to accomplish this? Something like deciding sequence for tasks.
May be a real beginner's question.
The word "politics" describes the process so well: "Poli" in Latin meaning "many" and "tics" meaning "bloodsucking creatures."
जय हिंद
|
|
|
|
|
Drop Execute Sql task and connect it to the task that actually writes task in AS400. You can execute any command you wish with execute sql task.
|
|
|
|
|
Add SQL task to the project as the first step and execute a "DELETE TableName" in that task against the AS400 connection.
|
|
|
|
|
Hello,
I'm creating a windows service that listens to a sql server database table each second when any insertion occurs this windows service make a lot of work, to accomplish this task I firstly think in the notification services but it creates an auto generated windows service which I can not edit to do my logic and in the same time it works(the notification services) just like my windows service in listening to the table every Generator Quanta.
The question is which is the best implementing my one windows service or using the notification services to send notifications to filesystemwatcher then my service check this file every second?
Thanks
Dad
|
|
|
|
|
|
Can SqlDependency detect when a row is inserted?
|
|
|
|
|
Yes, since if the result set based on the select statement is changed, the OnChange event is triggered. This actually means that all modifications (updates, inserts and deletes) are notified as long as they change the result.
Or at least this is my understanding
There's a bit old but quite good documentation about this: Query Notifications in ADO.NET 2.0
[^]
Mika
|
|
|
|