Forum Replies Created

Viewing 15 posts - 346 through 360 (of 427 total)

  • RE: a=b=c?

    @Yin Halen, thanks for having us in your thread. My day wouldn't have been as much fun without it.

    @jeff, your audience must be on a more...

  • RE: a=b=c?

    I know, the example was far fetched. And as I said: there are far better ways to implement the example. Still I don't share your idea that readability is always...

  • RE: a=b=c?

    Jeff Moden (8/16/2011)


    what else could you use ALL for? I ask because I've never found the need to make sure that multiple column values in the same row were...

  • RE: a=b=c?

    It can be usefull, but only in very specific situations. But then, when people get to those situations, they tend to use alternative solutions since they are not familiar with...

  • RE: a=b=c?

    Sean Lange, I hadn't yet seen the additional requirement of skipping 0's when I wrote my reply. That is why yours looked over complicated to me. Sorry about that.

    Of course...

  • RE: a=b=c?

    Sean Lange (8/15/2011)


    The ALL operator is interesting. Seems to make this awfully complicated though. Try this.

    DECLARE @a int = 102733019,

    @b-2 int = 102733019 ,

    @C...

  • RE: a=b=c?

    The ALL operator might be helpfull too (I always wondered when it would be helpfull and this is when 🙂 ):

    declare @a int;

    declare @b-2 int;

    declare

  • RE: On the Trail of the ISO Week

    I needed the iso week number too in SQL 2005. Looked for it in all the usual places (bol, forums, google, etc) and found many different implementations. Most however have...

  • RE: speed up and lean up my SQL Statement that will be come a view

    As an example of Eugence's tip an excerpt of your query, but now using a left join (so you will still get an order listed even if its freight charge...

  • RE: T-SQL Question

    I've read from your request that you want one long string returned for the entire file: i.e. each row is stored in 47 characters with no row separator in between....

  • RE: How to convert this 'dd-mm-yyyy' to 'yyyy-MM-ddTHH:mm:ss.fff' string format?

    This has been answered above by skcadavre already? What don't you understand of it?

    skcadavre (8/5/2011)


    Not sure what ".fff" is, but the "T" is ISO8601 -> code 126

    SELECT CONVERT(VARCHAR(100),GETDATE(),126)

    If you really...

  • RE: How to construct a Select query from INFORMATION_SCHEMA.COLUMNS

    select (

    STUFF(

    (select N', ' + cols.COLUMN_NAME as [text()]

    from Razor_3_Snapshot.INFORMATION_SCHEMA.COLUMNS cols Where cols.TABLE_NAME= 'TradeContributionSummary'

    order by cols.ORDINAL_POSITION

    for xml path('')

    )

    ,1,1,'')

    ) Probably you won't notice this as a problem, but this version also...

  • RE: How to construct a Select query from INFORMATION_SCHEMA.COLUMNS

    Not only is it missing the value(), it is also missing the ", type" clause on the for xml path(''). Adding ,type makes the for xml path() clause return a...

  • RE: use REPLACE with like

    I think you intend to use LIKE to find all instances that have one of the 'invalid' characters and then use the replace sequence to 'fix' the issue. Is that...

  • RE: How to construct a Select query from INFORMATION_SCHEMA.COLUMNS

    And a tip: when constructing queries, you will want to investigate the quotename() function.

Viewing 15 posts - 346 through 360 (of 427 total)