Answer Questions
Kirk Lipscomb OUTPUT on table with a Trigger
First some background info. SQL Express Visual Studio 2005 VB.Net Data.SQLClient Namespace Well I was using the OUTPUT option in my program and it was great, i was returning my PrimaryKey from the newly inserted row. (I am using paramaters in my program and running a sqlCommand.ExecuteScalar) --Example Insert "Insert into tblInfo (fldInfo,fldDate) OUTPUT inserted.fldInfoID values (@fldInfo, @fldDate)" Then I found a problem...:( I added trigger to the tblInfo, that after a Insert,Update, Delete it would perform a audit on the table saving the old info that was overritten, type of action taken (insert, update or delete), and who did it. Well my OUTPUT didn't like that says, it can't do a OUTPUT on a table with a trigger. --Err ...Show All
megoo80 Data Migration :- SQL Server1 - SQL Server2
Hi, I have 2 similar sql server databases DB1 and DB2 with around 450 tables and much data. My problem is I need to copy specific records from all tables in DB1 to corresponding tables in DB2. What I have done right now is, running seperate INSERT scripts for each table like INSERT INTO DB2..table1 SELECT * from DB1..table1 where code='XX' I would like to know whether this is the right approach or any other better way or tool available to do so. Also since the no of records are very high, I insert it in blocks say 30,000 records each, so that log file limit will not create problem. Thanks in advance. Please help other alternatives could be define views and bcp the data out from DB1 and in to ...Show All
ahmedilyas Change property based on actual state of collapsed/expanded group
Hi, please I would like to use something like this> =IIF(table1_group2 is Collapsed,True,False) I want to generated some event based on actual state of e.g. report group. if user expand group make this event otherwise (group is collapsed) make another event. Thanks for your advice. Any Answers Please send me the link where it was disccussed or it's impossible to do it I'm also looking for a similar solution. Any luck ...Show All
Rocinante8 How to design a report with ado.net dataset in codes?
Hi,all I want to use an ado.net dataset to bind a report. I read this article <Using the WebForms ReportViewer Control >in SQL Server 2005 Books Online. reference: http://msdn2.microsoft.com/en-us/library/aa337091.aspx " Viewing Reports in Local Processing Mode The following example demonstrates how to render a report that is part of the Windows application and has not been deployed to a report server. This example also uses the Sales Order Detail report from the AdventureWorks Report Samples project." If I use the sample report "Sales Order Detail.rdlc", it is OK. But if I add a new report("report1.rdlc)" and then add fields.value on the report, It return an error sa ...Show All
Janicita Horizontal results
how can i use concatenation to query the results horizontally example output: CustomerID=1002, Name=Mr Anderson, City=NY yes. But it would be much easier to do this in your front end if you want to concat the result you can do somehting like declare @data varchar(8000) select @data = 'CustomerID = ' + CustomerID + ',' + 'Name=' + Name + ',' + 'City=' + City from table where . . . you can get the Primary key column of a table by SELECT k.Column_Name FROM INFORMATION_SCHEMA.KEY_COLUMN_USAGE k,INFORMATION_SCHEMA.TABLE_CONSTRAINTS t where t.Constraint_Name=k.constraint_name and t.CONSTRAINT_TYPE = 'PRIMARY KEY' and k.Table_Name='[Give Tablename Here]' If it is to get the rows with columnname horizondaly (as one column ) us ...Show All
that_guy sql query doubt
Hey, I was browsing the slides of Database System Concepts, when I came across this (quoting): " Some updates through views are impossible to translate into updates on the database relations create view v as select loan_number, branch_name, amount from loan where branch_name= ‘Perryridge’ insert into v values('L-99','Downtown', '23') " now... why is it impossible I really cant see the problem here... Any help Thanks Hi, see more information about this in your BOL ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/410e2812-4ebe-48b2-b95f-c7784f1c4336.htm There are some rules you will have to deal with if you want to modify data through a view. HTH, Jens K. Suessmeyer. --- http://www.sqlserver2005 ...Show All
PawanSingh Reporting Services SP2 CTP "Select All" back in preview but not on web
Hi I've installed SQL Server Express 2005 SP2 CTP specifically because I require the "Select All" checkbox to reappear in multi-value parameters. This was successful in Business Intelligence Studio and when i preview the report the MV params have Select All options. However, when I deploy to the web the MV params do not have Select All options. Why would this be Regards Adam Whitehead I have no other SQL servers. It is on my desktop machine - the same one I develop on using Business Intelligence Studio. Regards Adam Whitehead I sure hope so. It's a real shame - it is difficult enough convincing management that RS is a good platform for us to run with when it ...Show All
anantvemuri Returning "ALL" records in a query
I'm building a db to collect equip fault data in SQL 2005 and need to modify my query to be able to select/display "ALL" records. I'm currently using a sp to assign a shift to each record and then have a query to select all records by shift. I'd like to add an option to the query to be able to select ALL records, regardless of shift. I've included the sp & query I am currently using. Any help would be appreciated. Thanks ALTER PROCEDURE [dbo].[p_dtu_Store_Line_Fault_Data] -- Add the parameters for the stored procedure here @AssetID int, @Timestamp datetime, @FaultCode int, @State int AS BEGIN SET NOCOUNT ON; IF @State = 3 BEGIN INSERT LineFaultData (FaultCode, AssetID, StartTime, Duration, Shift) VALUE ...Show All
su45937 How to change the color of a bar in a bar chart?
I am having a problem setting the colors of the bars in a bar chart. It seems like it would be the simplest thing, but apparently it's not. The "series" is grouped on whether or not the value is positive -- if so, the bars are blue (by default) and if not, green (by default). I want to change it so the positive color is blue and the negative color is red. I found that I can change ALL the bars to one color by going to chart properties, Data tab, Values Edit, Appearance tab, Series Style, Fill. There I set the color to red and ALL the bars became red. But this is not what I want. I tried using a conditional statement like IIf(Fields!IsPositive.Value=True,Blue,Red) for the color, but (not surprisingly), it told me I hadn't ...Show All
BS.Chen SMO in VBScript
I've been building some applets in VB.Net and wanted to try and do some similar things in VBScript. (I like to have a collection of scripts to do repetitive tasks.) Anyway, I'm getting an error when I try to set the connection info and am at a bit of a loss to get around the problem. Note that most examples of using VBScript and SMO together only connect to a local instance of SQL Server, so I've struggled with the method to define the server I'm attempting to manage. This method works in VB.Net, but returns the error 'Object required' when I set the object parameters to their desired values. Dim srvMgmtServer Dim srvConn Set srvMgmtServer = CreateObject("Microsoft.SQLServer.Management.SMO.Server") srvConn = srvMgmtServer.Co ...Show All
Lborshard Total page count on the body
How can I use the total page count in the body area Add a textbox and edit the expression: =Globals!PageNumber.ToString() abc_acb I know =Globals!PageNumber.ToString() expression. But you must remember that Reporting Services don't allow us to use that expression in the body area. Is there anyone who has a solution ...Show All
EduardoPayan Case in SSAS2005 KPI:s
Mosha posted this interesting entry in his Blog: http://www.sqljunkies.com/WebLog/mosha/archive/2007/01/28/iif_performance.aspx MDX CASE is a performance killer in SSAS 2005 and Mosha have many useful advices in this post about how to avoid the problems. My short question is simply that I would like a follow up on this because the Adventure Works demo cube uses CASE frequently. I also now from reading the book that Edward Melomed participated in that when you write a KPI a lot of things are happening that you cannot see, like the creation of calculated members. How should I make sure that my KPI:s will not hurt performance of my cubes, if I use CASE to frequently Should I rewrite them as IIF:s Kind Regards Thomas Ivarsson ...Show All
Harish77 Textbox Properties Format Code = to General Format in Excel?
When I export a report to Excel I need most of the fields to be the general format of Excel which is what in the format properties of Reporting Services Reports I tried Default and that doesnt seem to be it either. According to Excel the General format cells have no specific number format. Any ideas would be wonderful! Thanks so much! Stokh :) Leaving the format property blank should do what you want. I'm sorry, I don't think I understand what behavior you're trying to achieve. If I have a string in a textbox, and leave Format blank, the output format to Excel is "General". Is that not what you're seeing happen, or are you trying to get a different result What format do you ex ...Show All
tonn Remove space between columns in result to text
Hello When you set the results from a query to text, very often you end up with a format like: job_id name ---------------------------------------------------------------------- ------------------------------------------------------------------------------------------------ Is there a way to get rid of the extra space between two columns Sometimes it's more than the width of my screen between columns Thanks! Worf Not really in a readable way. You can use the CSV format, but that is really ugly to read without fixed width. Fixed width values use the max length of the datatype to determine the spacing, since it has no idea how large a following value may ...Show All
Stanley1271 Errors processing after adding Computed Column to Time
SSAS 2005 SP1 I just created a computed column in my Time dimension for "Period over Period Growth %" using the Business Intelligence wizard. Now, when I try to process any cubes using this dimension or the dimension itself, I receive this error: Errors in the high-level relational engine. The 'dbo_DimTime' table is based on a named query, and contains one or more computed columns. A table based on a named query cannot contain computed columns. If the computed columns are necessary, add them to the query expression. dbo_DimeTime is not based on a named query, but all my cubes have the TimeID relationship from this dimension. 3 of these cubes are based on named queries which partion the data annually. Each cube has its ow ...Show All
