Forum Replies Created

Viewing 15 posts - 211 through 225 (of 267 total)

  • RE: Set and Remove Identity attribute

    I totally agree with Gary that the use of stored procedures is a very good idea.

    However IMO consistency in code is also important.

    If Dinesh has an application that does not...

  • RE: Set and Remove Identity attribute

    I am sure You will Chiara

    /rockmoose

  • RE: Set and Remove Identity attribute

    Hi Chiara!

    You are fast

    /rockmoose

  • RE: Set and Remove Identity attribute

    Scope problem, try this:

    connSConfig.Execute "SET IDENTITY_INSERT [AlarmClass] ON; Insert into [AlarmClass] (ID,AlarmClass,Priority,BPM,WAVFile,PlayType,VectoringGroupID,AlarmHelpStringID,AlarmMsg,AlarmTextColor,AlarmBackColor,AckTextColor,AckBackColor) Values (11,'Cleared',10,10,'','',0,1,'',16777215,16711680,0,16777215)"

    /rockmoose

  • RE: Critical Problem

    You could flatten the hierarchical data, and use this flattened view for the reporting requirements.

    I dont know enopough about the database schema and the reporting requirements, but anyway, here is...

  • RE: Anyway other faster way to do this?

    This is quicker I think

    ( roughly 20X faster on my system (tested on a random table) )

    select counts.orderid,

    MAX(CASE WHEN counts.ItemType = 'AR' THEN counts.cnt END) AS ARCount,

    MAX(CASE WHEN counts.ItemType = 'CH'...

  • RE: Set and Remove Identity attribute

    You can use the command:

    SET IDENTITY_INSERT tablename ON | OFF

    To allow for insertion of identity values.

    AFAIK You cannot with T-SQL remove the Identity Property of a table, except by recreating the...

  • RE: Select * or Select 0 when using Exists

    Well, This is straight from BOL - EXISTS

    A. Use NULL in subquery to still return a result set

    This example returns a result set with NULL specified in the subquery and...

  • RE: Select * or Select 0 when using Exists

    Actually the EXISTS( subquery ) just returns Boolean if subquery contains any rows.

    Performancewise there is no difference in the different approaches mentioned here. Sql Server does not have to bring...

  • RE: inserting using a select

    This is a neat trick:

    In QA, Objectbrowser:

    Drag and Drop the Columns folder of your table into the query window....

    How's that for saving some typing

  • RE: show all tables

    2nd question ... 1 way:

    exec sp_MsForeachTable 'exec sp_MStablerefs @tablename = ''?'', @direction = ''both'''

    /rockmoose

  • RE: Diagram Designer error

    There are Project Numbers in Crosswalks table not existant in master table

    .

    Suggest that You clean the data in the tables. ( Either removing rogue records...

  • RE: Dynamic Total?

    I have only limited experience of the VisualTotals function. We have dabbled with roles and VisualTotals in some cubes, but are not currently using it anywhere.

    The conditional sum that You...

  • RE: Running Total in Select Query

    You dont have to have an ordering sequence per se. It is enough to have a PK or Unique Constraint on the table to order by.

    In your example it seems...

  • RE: Dynamic Total?

    Visual Totals will sum the members visible to the role. And does not have anything to do with what members are visible on the report.

    So still again, I don't think...

Viewing 15 posts - 211 through 225 (of 267 total)