Forum Replies Created

Viewing 15 posts - 16 through 30 (of 36 total)

  • RE: Round up or down IV

    Hi great qod!

    Here's a tip:

    Move the decimal point to the left by the negative number and then do a regular ROUND(d, 0). Applied to this it ends looking like...

    Hrvoje Piasevoli

  • RE: Data Type and Length

    Good question!

    Hugo Kornelis (8/9/2010)


    ...I thought there would be a very high percentage of correct answers since the confusing default lengths for character strings have already been covered in a few...

    Hrvoje Piasevoli

  • RE: Problem with AggregateFunction = None: All values are NULL

    Hi nmeseth,

    OK first: you are right that it has everything to do with parent-child dims.

    Quick answer - try the following: put .DATAMEMBER after members that belong to parent-child dimensions like...

    Hrvoje Piasevoli

  • RE: Computed Columns

    I guess now would be a good time to point to a great post by PaulWhiteNz about UDFs and SCHEMABINDING which I can not find right now. My read performance...

    Hrvoje Piasevoli

  • RE: Index Types

    Would missing and unused make it 10?:)

    Hrvoje Piasevoli

  • RE: Computed Columns

    I'm curious did you test and find that using non-persisted columns was faster than pre-calculating and storing all the permutations that you needed? (I guess it would probably depend on...

    Hrvoje Piasevoli

  • RE: Computed Columns

    ...And off it goes posted unfinished (sorry about that).

    I think it might be a good idea to have a peer-review of ones Q and A before submitting a QoD to...

    Hrvoje Piasevoli

  • RE: Computed Columns

    Now this doesn't hold true:

    Will definately use more resources.

    I am very pleased that UMG developer made a thorough explanation in the previous comment as it was exactly my...

    Hrvoje Piasevoli

  • RE: VARCHAR datatype

    This could make the Q "less confusing" but less real-life and interesting:

    DECLARE @Testvar VARCHAR;

    SET @Testvar = 'Red';

    print @Testvar;

    If only there was a remark of the collation set (as UMG developer...

    Hrvoje Piasevoli

  • RE: VARCHAR datatype

    Jamie Longstreet-481950 (7/17/2010)


    Could call it a trick... in another form:

    select * from(

    select 'red'

    union select 'red'

    union select 'blue'

    union select 'green'

    union select 'yellow'

    union select 'orange'

    union select 'purple')x

    where textfield like 'red' ...

    Hrvoje Piasevoli

  • RE: VARCHAR datatype

    Nice question. I got it right cause I made an effort to examine all kinds of default parameters after encountering something similar. Not 100% sure but I think the rule...

    Hrvoje Piasevoli

  • RE: Concatenation of two fields from Two Separate TABLES

    The following code was the cause of the error:

    SELECT

    ...

    cast(varchar(11),rxo.RX_NUMBER) + '-' + 

    cast(varchar(10),rxf.REFILL_NUMBER) AS 'RX and Refill', 

    ...

    Syntax for CAST:

    CAST (expression AS data_type [ (length ) ] )

    Syntax for CONVERT:

    CONVERT (data_type...

    Hrvoje Piasevoli

  • RE: Table Variable :Doesn't care

    Hugo Kornelis (7/7/2010)


    I doubt it. Most people consider that cheating, and try to work the answer out for themselves.

    I second that. Personally, giving the wrong answer highly motivates me to...

    Hrvoje Piasevoli

  • RE: Table Variable :Doesn't care

    BOL: Transactions involving table variables last only for the duration of an update on the table variable. Therefore...

    Hi all!

    Maybe the following code example brings some light on the above statement....

    Hrvoje Piasevoli

  • RE: Disable All Triggers

    If I need to quickly disable all triggers in the database then I use disable trigger syntax to take care of all tables and views and then append disable trigger...

    Hrvoje Piasevoli

Viewing 15 posts - 16 through 30 (of 36 total)