Forum Replies Created

Viewing 15 posts - 421 through 435 (of 533 total)

  • RE: SET values to same as ID from another table, WHERE values match in another column - Is returning same value for all records, please help

    Also, a lot of times when people do things like this they would be much better off not updating tables ... it is very possible it would be much better...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: After using RANK PARTITION, SP is taking too long to run

    You've provided basically zero information so all you're going to get are general guesses.

    My best guess is that the fields (in this example x and y) you are using on...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Subroutines in TSQL

    konstanddp (5/13/2010)


    Hi all

    hope this discussion is still active.

    I am sitting with exactly the scenario where I would have liked to be able to call a subroutine within a sql script.

    I...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: SSRS 2008 with report viewer and remote access

    I asked 3 questions and you didn't answer any of them so I can't really help you.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: INDEX ON TABLES

    It sounds like you've never used SQL Server Profiler. What you should first do is open Books Online and then search for 'SQL Server Profiler'. There is a...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: SSRS 2008 with report viewer and remote access

    What error do you have?

    Do you allow anonymous access on IIS? How do you have the permissions set up on the report you want your external person to see?

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: need one query to get the result as shown

    declare @t_table1 table

    (Col1int)

    insert into @t_table1

    select 11 union

    select 22 union

    select 33 union

    select 44

    declare @t_table2 table

    (Col1int,

    Col2varchar(10))

    insert into @t_table2

    select 11, 'ab' union

    select 11, 'ac' union

    select 11, 'ad' union

    select 22, 'jk' union

    select 22, 'jy'...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: query delete some part of string

    Of course ^

    ISNULL is better than doing a CASE.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: query delete some part of string

    Might be a slightly cleaner way, but this works:

    select case charindex('.', Column1)

    when 0 then Column1

    else stuff(Column1, charindex('.', Column1), charindex('\', Column1, 3) - charindex('.', Column1) - 1, '') end

    from @t_temp;

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Some way to create a deterministic computed column that only has to count once?

    shane94 (5/7/2010)


    From what I've read giving SQL as little as possible to "figure out" is always the preferred approach...

    Throw away whatever you read that said that. That is incorrect...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: query delete some part of string

    GregoryF (5/7/2010)


    bteraberry (5/7/2010)


    Mine was more efficient. Plus STUFF is simply cool and underused.

    Props on the STUFF, in 12 years of doing SQL, that's the first time I have ever...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: query delete some part of string

    Mine was more efficient. Plus STUFF is simply cool and underused.

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Some way to create a deterministic computed column that only has to count once?

    shane94 (5/7/2010)


    bteraberry (5/7/2010)


    I'd rather go with number 1 since it's a done once work forever

    and lets say for SOME reason one of the middle blocks gets deleted that means every...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: Some way to create a deterministic computed column that only has to count once?

    It's just bad design. (I would suggest doing some reading on normalization.) Basically, unless there is a compelling performance reason to do so, never store data in the...

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

  • RE: query delete some part of string

    Actually, I should do it like this so it may be more clear:

    declare @vc_string varchar(20);

    select @vc_string = '\\xyz.se.df.a.b\fgd\';

    select stuff(@vc_string, charindex('.', @vc_string), charindex('\', @vc_string, 3) - charindex('.', @vc_string) - 1, '');

    └> bt



    Forum Etiquette: How to post data/code on a forum to get the best help[/url]

Viewing 15 posts - 421 through 435 (of 533 total)