Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. haroldholt

    Couting rows in hierarchical dataset

    Solved it - sort of Created another measure WITH MEMBER [Measures].[RowCount] AS 'Descendants([My Dimension].[All]).Count' Then used this in the report First(Fields!RowCount.Value, "ReportingPeriodReportingPeriod") to return the actual number of rows in the result set... There has to be...
  2. haroldholt

    Couting rows in hierarchical dataset

    Hi, I am having a problem with the counting of rows in Reporting Services hierarchical result set when using a cube as a data source. I am trying to get my multi-valued report parameter to only display 'All' when I use the '(Select All)' option. This is the expression (which works in all my...
  3. haroldholt

    Alternative for UNION

    Hi, UNION does a select distinct, if you use UNION ALL instead then you will get both results sets back - with duplicates.
  4. haroldholt

    SQL Standings

    Try this SELECT Division, Team, COUNT(*) AS GP, SUM(ScoreFor) AS TotalGoalsFor, SUM(ScoreAgainst) AS TotalGoalsAgainst, SUM(CASE WHEN ScoreFor > ScoreAgainst THEN 1 ELSE 0 END) AS Wins, SUM(CASE WHEN...
  5. haroldholt

    Exec SP within another SP Performs Poorly

    Yes, my apologies, you are quite correct, I completely missed that bit - still like to see what happens when SP1 is called from SP2 without any insert...
  6. haroldholt

    Exec SP within another SP Performs Poorly

    This is merely restating what others have described above (so all of you please forgive me for this!) but I guess your next step would be to run SP2 with just Declare @Today Varchar (12) Declare @Entity Varchar (5) Declare @DBName Varchar (5) Set @Today = GetDate() Set @Entity = 'EM1' Set...
  7. haroldholt

    select record when based on previous records

    ...and if you have SQL 2005 then you can use a CTE (untested code)... ;with recordCTE (id, record_date, record_value, row_num) as ( select id, record_date, record_value, row_number() over (partition by id order by record_date) from mytable ) select id, record_date, record_value from ( select...
  8. haroldholt

    Exec SP within another SP Performs Poorly

    What do your execution plans look like when you run SP1 by itself and then via a call from SP2 - are they different ? Are you using defaults for SP1's parameters, if so are they typical values and are these values the same as those passed in when you call it from SP2 ?
  9. haroldholt

    count difference on tables

    Perhaps there are 26460 rows in B that do not exist in A ?
  10. haroldholt

    PK violation on Insert - why?

    My apologies, I posted the code before the analysis. [select * into TransTable from MasterTable where 0=1] will not generate identical tables, e.g. the TransTable will not have the same PK constraint as the MasterTable using this method therefore I thought of the possibility of the TransTable...
  11. haroldholt

    PK violation on Insert - why?

    Just a thought. What happens when you issue this ? select PKField, count(PKField) from TransTable group by PKField having count(PKField) > 1
  12. haroldholt

    Export package progress

    Thanks guys for pointing me in the right direction... hh
  13. haroldholt

    Export package progress

    Hi all, I would like to be able to see how much time was spent on running each task within a package, is there any way to easily export this information from SSIS Designer into a text file after running the package so I can review this information at a later date ? thanks
  14. haroldholt

    Any way to get IB to assign a key # automatically?

    As you can see I have changed my name from unclejimbob to haroldholt to reflect the fact that this will be my last post in this forum due to my new non-InterBase status. Good luck with InterBase.
  15. haroldholt

    Any way to get IB to assign a key # automatically?

    Sure, you need to terminate the proc, IB usually uses the caret ('^') by default so something like this should work: CREATE TRIGGER GAMES FOR CUSTNUM BEFORE INSERT AS BEGIN NEW.CUSTNUM = GEN_ID(SetKey, 1); END ^ You can also set your own terminator if you like using SET TERM. "what's...
  16. haroldholt

    expression help

    Why are you returning two different data types, a string and an int ? The iif evaluates better if it sees this... ((Fields!FieldNameDescription.Value = "ABC") AND (Fields!ReportFieldValue <> Nothing)), don't ask me why, I just tried a perfectly good set of ORs in some similar code and it would...
  17. haroldholt

    &quot;Order by&quot; doesn't work with characters and numeric

    Many thanks, this has now been added to my ever-expanding SQL expressions toolbox :-) left(name, patindex('%[0-9]%',name) - 1), Right('0000000000' + substring(name, patindex('%[0-9]%',name), 11), 11)
  18. haroldholt

    Row count based on condition

    What about taking the other tack and altering the confirm column so that it becomes a meaningful value in the result set that you can then report on ? e.g. (assuming Confirm datatype is a string) something like SELECT COALESCE(t2.Confirm,'Y') AS Confirm FROM Table1 t1 LEFT JOIN Table2 t2 ON...
  19. haroldholt

    Report UI design

    Thanks for this - dos and don'ts are fine, without wishing to seem ungrateful I guess having worked with SSRS for the past 4 years or so I know pretty much all of these by now (my starting point being www.ssw.com.au) and I have a standard set of templates which I now use when I move from...
  20. haroldholt

    report totals for different groups

    I had a similar issue, I resolved it by creating another table for the report footer using the same dataset I used for the report itself. In your case this would mean creating a second table with 2 groupings, first by division and then by sub division and creating the appropriate aggregates and...

Part and Inventory Search

Back
Top