I have a following code to "draw" a "histogram" :-)
use tempdb go
declare @temp table (id int identity(1,1) ,valuess int)
insert into @temp (valuess) values (64) insert into @temp (valuess) values (12) insert into @temp (valuess) values (23) insert into @temp (valuess) values (45) insert into @temp (valuess) values (30)
select id ,valuess ,histogram = cast(replicate('*', valuess*0.4) as nvarchar(50)) ,length = len(cast(replicate('*', valuess*0.4) as nvarchar(50))) from @temp
order by valuess desc
Is there any better way to do it; maybe even a function?
i wanna create two line types on the same graph. I'm using the following queries.
Code Block select count(l.created) as LoanOriginationNumberPreApproved , convert(char( 11), l.Created) as PreApprovedDate from LoanApplication l where l.Status <> 'Cancelled' Group by l.Created
and
Code Block select count(l.SubmittedOn) as LoanOriginationNumber , convert(char( 11), l.SubmittedOn) as SubmittedDate from LoanApplication l where l.Status <> 'Cancelled' Group by l.SubmittedOn
I combined these queries. I add clumns of the second query to select statement of first code. also added group by l.submittedon to group by l,created as group by l.created, l.submiited on. This is the problem.(I mean grouping)
But then SSRS does not allow me to put preaaproveddate and submitteddate to drop category filed? Does anyone know how to do that?
I am working on a report which requires me to draw two polygons (rectangles) on a scatter chart to visually indicate "good" and "bad" ranges of plotted data. Is there a way to do this out-of-the-box?
Otherwise, if I must create a custom report item, how do I draw on the chart surface? I have looked at the following articles on Custom Report Items, but when I open the sample solutions I can't put the custom report items on the chart surface.
Our CLR stuff is running OK, as long as we do not touch the line:
using System.Drawing;
However, we do some image manipulation and then we get the error from SQL Server as
TITLE: Microsoft SQL Server Management Studio ------------------------------
Create failed for SqlAssembly 'ASP.IMAGE.CLR'. (Microsoft.SqlServer.Smo)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+SqlAssembly&LinkId=20476
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Assembly 'system.drawing, version=2.0.0.0, culture=neutral, publickeytoken=b03f5f7f11d50a3a.' was not found in the SQL catalog. (Microsoft SQL Server, Error: 6503)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3042&EvtSrc=MSSQLServer&EvtID=6503&LinkId=20476
I have a report that I need to export to PDF, when I do so and re-open the report, I get a message stating "A Drawing Error Occurred".
Plus when I have a textbox with a large amount of data, it always kicks to a different page, instead of print what it can fit on the previous page and the rest on the next page.
I am getting the a big redX when attempting to open a report in VS.NET 2005, "Deserialization failed: The type initializer for "Microsoft.ReportDesigner.Drawing.Language" threw an exception". Has anyone else get this error? Would you please share your solution to me?
Hi: I did the following query on SQL Server A and got the following result. Input: select replace('10/10/00', '/', '') Result: 101000 (1 row(s) affected) However, I did the same query on SQL B and got a different result. Input: select replace('10/10/00', '/', '') Output: 10 10 00 (1 row(s) affected)
Both Servers are SQL 7.0 with SP2. I checked the setting, it seems to be identical. Does anyone know what could be the problem or have any hint what I need to check? I beleieve the correct result should be the first result.
I have 3 paramaters@value1, @value2,@value3 being passed into a stored proc and each of these parameters can be blank. If one of them is blank and the rest of them have some valid values, then I should just exclude the column check for the value that is blank.
For e.g if all my parameters being passed are non- empty then I would do this select * from tblName where column1 like @value1 and column2 like @value2 and column3 like @value3
else if I have one of the parameter being passed as empty, I should ignore that parameter like if@value1 is empty then my sql should be
select * from tblName where column2 like @value2 and column3 like @value3
I don't want to do a dyanmic sql because of rights and security issue. I want it through a stored procedure only.
Also, all the three columns can have null values in the table. Please let me know what is the best possible way to do this. Thanks in advance !.
I am doing performance tuning of SP/Query in Dev-Test environment.
I found that SQL Server caches plan between successive executions.
So if I test/execute SP 10 times, after 1st or 2nd execution, SQL server will pull-up plan-info from CACHE...Not from SQL SERVER Or Database...
Means i am not getting correct answer...
I found this 2 commands:
DBCC FREEPROCCACHE
DBCC DROPCLEANBUFFERS
But they say that executing above command might interfere/bother other people executing other query/sp on this server.
They also say that: Freeing the plan cache causes, for example, a stored procedure to be recompiled instead of reused from the cache. This can cause a sudden, temporary decrease in query performance.
Part of query was using Dynamic-SQL executed with EXEC command.
I replaced that with SP_EXECUTESQL.
How can I start testing of each SP-run with Fresh/Blank CACHE ?
I have VS2003 and VS2005 installed as well as SQL Server 2000 and SQL Server 2005 Tools. I have RS2000 and RS2005 installed. RS2000 works fine in VS2003. When using VS2005 and opening a Microsoft sample project for 2005, I get the error listed in the subject line.
When trying to create a new project and connecting to an Oracle database or a SQL Server 2005 database, I get the following error: "A connection cannot be made to the database. Set and check the connection string." The connection works fine when the test button is clicked, but fails when continuing in the wizard.
Any suggestions. We are trying to migrate from RS2000 to RS2005 and nothing in 2005 works.
I am writing a two step process where the record is created and half of the fields are populated. The second step will populate the remaining fields. Between steps they will run queries against the table and the empty fields are <NULL>.When the field is <NULL> it won't return data on "WHERE Field LIKE '%'". I could just pass "" as data to the remaining fields however since MS SQL allows you to set a default value on a field. Is it possible to set the default value to a blank instead of <NULL>. This would help keep my code a little more streamline. Or is there an easy way to write a fuzzy search that will include <NULL> fields. Thanks
I'm having a problem with my database. I have a users table where the username and password fields are set to Not Allow Null values, but, when somebody signs up to the site they can put a blank value ' ' and register. That is not Null, how can I set up the server so that it can not accept blank values like that?
I have developed a report that when displayed in page layout view is giving me blank pages with only heaer & footer information even though none of my groups have page breaks designated. This also occurs when exported to PDF.
Can anyone provide some information on why this is occurring and how to remedy it ?
I've been getting a messagebox with the error: "Microsoft Visual studio for applications has lost the link to" -->correct, it doesn't say to what? I also noticed all my variables are no longer showing on the variable tab. I have a number of package level variables. The System variables have disappeared also???
I have a report with a document map and when I run the report through IE 7.0, the Document Map is blank. Running that same report through IE 6.0 and it is fine.
Both instances are run against the same server via Report Viewer so there is no difference other than the client IE version.
Is this a known issue - blank spaces caused by KeepTogether property being implicity set for Lists/Subreports/Rectangles in Reporting Services? If so, will there be a fix soon?
Good Morning friends. I am using MS SQL Server Reporting Services version 9.00.2047.00 and I have a problem and i would like your help:
I have one report (Cuadro de Mando) and 4 subreports (subquadro, subquadro2, subquadro3, subquadro4):
Note: Nome of the subreports above, have a page break after showing the records and neither the report. The subreports are perfectly designed in the main report (Cuadro de Mando).
There is no space free between the desgin of the 4 subreports.
Each subreport are designed in only one page. I tested each one of the subreports individually and the preview of each is ok in olnly one page.
But when i test the report (€śCuadro de Mando€?) with contains the 4 subreports, one page in blank always appears between the previous page and the next page of the 4 subreports.
I want to create a clean copy of my DB now that it is done. So it can be moved to another Server. It has some sample data in some tables that I would like to keep and some in other table that I don't. How can I do this?
When I start SQL Server Management Studio (Sql 2005), a blank dialog box pops up with nothing in it. The title in the dialog box is "Microsoft SQL Server Management Studio" and it has a yellow triangle with an explanation point in it but there is no message just an OK button. I have to click the OK button to continue on to connect to the Sql databases. It does this everytime I open it. Anyone else getting this and how can I get rid of it?
Why would some of my servers that I have registered not show a green arrow (or any connection status for that matter). It's just a blank white circle. Is there some sort of connection error happening between me and the server?
It's sort of annoying to click on these servers and have the error "SQL Server xxxx is not known to be running. Are you sure you wish to connect?" Any way to get around that?
I put a blank or ‘0’ in one of column of a text file and then I used BCP to load this file to a table of SQL server 6.5. The field in SQL server table is char type with size 1. After I run this process, all rows with this column received ‘0’ and no blank or null at a black value place. Could you please help me to fix this problem and make some of rows in the column get a blank or null value.
Does anyone know the trick when inserting an empty variable into a MSSQL table for it to show as null and not a blank or a zero? It is a php variable. Thanks
here's my stored proc and i will tell you what I'm trying to do. I'm passing in a form value. It should handle anything. But it doesn't.... I have tried: ="", ='', <>"", <>'', isNull, IS NULL, IS NOT NULL and now the isNumeric() function. Can anyone help me please?!?!
DECLARE @ROWCOUNT as int select @ROWCOUNT = count(*) from tPostageProduct where productid=@ProductID
if @ROWCOUNT > 0 if isNumeric(@ScaleID) <> 1 delete from tPostageProduct where productid=@ProductID else update tPostageProduct set scaleID = @scaleID where productid=@ProductID
else if isNumeric(@ScaleID) = 1 INSERT INTO tPostageProduct (productId,scaleID) VALUES (@ProductID,@ScaleID) GO
I am using BCP to export the contents of a view into a text file. Everything is running jsut ifne, except the resulting file has a blank first line. Is there a way to preven this?
BCP statement is as follows:
bcp "select pospay from son_db.dbo.vw_pos_pay order by account desc, code asc" queryout D:eliteUSbankPositivePay_Currentx340.d150364i. d100.txt -T -c
so far, i'd read a lot of books and search from internet, i still don't very understand the difference between of NULL and balnk value. can anybody help to explain on it?