Answer Questions
Ankini Design/load question
Hi. I am redesigning a database to be more normalized. There are 4 columns that appear in many of the tables that I plan to add to a new table. Here is what the database looks like now: table1 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. table2 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. table3 uniquecolumn1 uniquecolumn2 uniquecolumn3 samecolumn1 samecolumn2 samecolumn3 samecolumn4 uniquecolumn4 etc. If I add a 4th table with the columns that are the same in each of the tables, I'd have this: table1 uniquecolumn1 uniquecolumn2 uniquecolumn3 uniq ...Show All
Mike Greenway Performance of Time Calculations, Cross Joins and calculations
Some of our SQL Server 2000 calculations are performing poorly on SQL Server 2005, opposite of what we expect and have seen in general. The performance on SSAS 2005 is 2-3 min. compared to 10-15 sec on MSAS 2000. Are we doing something wrong in the way we have designed it, missing some settings etc The structure is fairly small, 10 dimensions, no writeback tables, 2-300000 rows of data, 1 fact table. There are some parent-child dimensions as the only thing. The SSAS 2005 MDX query looks like this: SELECT NON EMPTY crossjoin({[Measures].[ValueDKK]}, crossjoin({[Journal].[Base Input Data]}, {[Intercompany].&[X], AddCalculatedMembers ({Descendants([Intercompany].&[X], 100, LEAVES)})})) o ...Show All
MuscleHead sql update query question
Hello, I have a table t1 that has the following fields: T1 ** ID WELL_ID SAND_ID 1 1 1 2 4 3 3 6 8 4 7 9 T2 ** ID WELL_ID SAND_ID ... 1 1 2 4 3 6 4 7 Thanks in advance, Marco set nocount on declare @t1 table (id int, well_id int, sand_id int) declare @t2 table (id int, well_id int, sand_id int) insert into @t1 values (1,1,1) insert into @t1 values (2,4,3) insert into @t1 values (3,6,8) insert into @t1 values (4,7,9) insert into @t2 (id, well_id) select id, well_id from @t1 --select * from @t1 --select * from @t2 update @t2 set sand_id = b.sand_id from @t2 a inner join @t1 b on a.id = b.id and a.well_id = b.well_id select * from @t2 -- ------ SAMPLE OUTPUT: ---- ...Show All
Stefan Wachter How to show running totals
I have a cube with many dimensions including one called WorkDate YMD. I also have a measure called Hours. At the moment I can see hours against any level of the WorkDate dimension, but I have a requirement now for running totals. For example, the data at the moment is this Jan 4 hours, Feb 5 hours March 6 Hours As well as the actual Hours the users now want to see the running totals. So the data will be Jan 4 hours, Feb 9 hours March 15 hours I know this should be easy as a calculated member in the cube using MDX and therefore visible in excel pivot tables but I cannot see how to accomplish this correctly ans easily. TIA Hi Neil. Thanks for the explanation. I provided very query specific solution to your ...Show All
S4lbullet Do not delete things, it bites
Hello, I noticed that when you delete things or substitute tables, you get in trouble. - Delete a named query used in a partition before deleting the partition - Delete a named Calculation from a table in the Ds view, whathever you do - Replace a table with another table which has less columns even if none of the lesser columns are used nowhere. The XML do not get updated accordingly leading in all kinds of errors, some requiring restore from an older version. Just a FYI. BTY, I do not know how to submit bug reports. Philippe Build 9.00.2175.00 go to connect.microsoft.com A bug means that the software is not doing what it is supposed to do in ...Show All
Steve1999 Help for Dynamic Grouping!!
Hello to everyone. I face a problem for gouping. I want to make dynamic grouping in report. Dynammic Grouping means, I want to provide a parameter named Group By with mutivalues. I can't hide this parameter so that user can select any one value from this dropdown and when he is click View Report, takes that value and group table rows as per parameter selection. So i want to ask if it is possible to change <groupexpression> in XML code of report dynamically as per selection. <Grouping Name="table1_CODE"> <GroupExpressions> <GroupExpression>=Fields!CODE.Value</GroupExpression> </GroupExpressions> </Grouping> This is default grouping, when i select a value from Gro ...Show All
Henny question on using median to aggregate a measure
Hey all, I'm still learning SSAS + MDX and am not sure how to go about using the MEDIAN function (instead of sum or avg) to aggregate my measure. In my dataset, I have Geography, Time, and 'Use Type' dimensions that splice a Sale Value measure. I'd like to construct a measure that uses the Median instead of the traditional avg or sum aggregations. I read the MSDN page on the median function (http://msdn2.microsoft.com/en-us/ms145570.aspx), but I'm still lost on what to do in the SSAS designer to add this measure. Any suggestions Thanks! Hi Deepak, Yeah - I figured out how to use the Median function when creating arbitrary MDX expressions, but why can't you create preprocessed cubes using an arbitrary ...Show All
Igor Grozman Tsql script to connect to another database
Hi. I am in database db1. in the middle of a stored procedure i want to connect to database @db2 (it is a variable) and i want to execute some commands in it. How is it possible to do that in t-sql Thanks take a exp. if u are in db1 and fatch the datafrom db2, then db2..tablename. Use something like this; but dynamic sql isn't the best way to go or just execute from databasename..tablename declare @db varchar ( 100 ) declare @fv nvarchar ( 100 ) sp_executesql ( 'use ' + @db '; insert into mytable where mycolumn = '' + @fv + ''' ) i didn't get what you mean. Could you explain further ------ i have wrote below what i want to get..thanks -- ...Show All
VSSiva MICR Font Issue When Exporting to PDF
Hi, I'm using Reporting Service to print checks. Everything seems ok when I design and deploy and view the reports. But when I try to export to pdf, the MICR font I'm using does not work. I've tried a couple of different MICR fonts from the web and they either get replaced by a standard font or disappear altogether. I would love to know why that is. Thanks in advance, Tom anyone have a answer for this Microsoft tech support says the font must be a True Type font. Also, for some reason, the fonts seem not to work at 12pt or above. 10 and 11 pt seems to work fine. Ok... we found a solution. Increase the height and width of th ...Show All
shwasasin Including Views in Replication
I have a three server peer-to-peer replication setup that includes articles for tables and views. As I understand the BOL, scheme changes -- which I take to mean changes, amont other things, changes in the design of a table or view -- should automatically replicate to the other servers in the topology. Here are my quesitons: When including a view as part of the publication, what is it, exactly, that is getting replicated If all the tables supporting a given view are being replicated, and the view exists on all three boxes, whatelse, besides the view schema (and changes thereto) is being replicated Secondly, if in fact schema changes are replicated, why can't I modify a view that is part of a publication When I try to make a change t ...Show All
Stephen Bowman import AS to BID project - how to change cube storage location
After import of AS database to a new project I need to change the cube storage location because it probably points to a location on the server that is not valid in dev. How can I change the cube storage location in the project (not from management studio) Regards, Sorry. Back from the golf course. I have tried the same thing without any problems. You say that you are unable to deploy the solution, it is not about file directories. You cannot deploy with standard settings Do you have security roles in your imported project that does not match the location /server that you would like to deploy to Next, are you using a network share for your data folder, like \\server\logicaldisk\program files .... Regards Thomas ...Show All
RolfWiki Changing Article Properties without a new Snapshot
In our replication environment, the subscriber is initially set up with an snapshot of the publisher database. However, after that, the subscriber and publisher are different and we can never re-initialize from a snapshot again (we purge data on the publisher to reduce the database size but do not purge the same data on the subscriber; we do this by stubbing out the stored procedures on the subscriber that purge data on the publisher). If an article is added or dropped from the publication, using snapshot and synchronize, just these changes are propagated to the publisher (without an entire new snapshot). However, if an Article Property is changed (change SCALL to MCALL under Statement Delivery options for the UPDATE statement), the ...Show All
Kamii47 Image with sorting
Hi, In my report for the columns iam providing sorting feature.In the report header i have one image. Image disappears when using sortable columns.That image originally appears when opening report, but disappears after sorting columns. Why this happens. Please help me. Thanks in advance ...Show All
Maxim Michtchenko how to change the data label in SQL?
I have the following SQL statement.. select month ( dbo . udfAddUTCBias ( start_date_time , 180 )) as report_month , direction as direction , count (*) as total_records from traffic with ( nolock ) where dbo . udfAddUTCBias ( start_date_time , 180 ) >= '2/24/2007' and dbo . udfAddUTCBias ( start_date_time , 180 ) < DateAdd ( dd , 1 , '2/24/2007' ) group by month ( dbo . udfAddUTCBias ( start_date_time , 180 )), direction but the result of the direction field is 1 and 0.. however, I need to show inbound when the result is 0 and outbound when the result is 1 without changing the actual data in the table. You could use CASE keyword: http://msdn2.mic ...Show All
Noremac The cursor does not include the table being modified or the table is not updatable through the cursor
I am getting the error "The cursor does not include the table being modified or the table is not updatable through the cursor" when i try to execute some statements using cursors. I am using SQL Server 2005 Enterprise Edition Can any one suggest the solution or is there any alternative to avoid this error. Post the code for more information, the cursor is updateable for that table then you should be able to do it. ...Show All
