Forum Replies Created

Viewing 15 posts - 286 through 300 (of 359 total)

  • RE: Replace Function issue

    change the varchar(MAX) then to VARCHAR(8000) this chould work, they did say there was about 1000 charachters

    ***The first step is always the hardest *******

  • RE: Junk value getting inserted into table

    do you have any triggers on either of these tables?, can you replicate this in test or DEV? process of elimination i think needed here, sounds to me at the...

    ***The first step is always the hardest *******

  • RE: Replace Function issue

    Cast your column as varchar(MAX) first

    select REPLACE (cast(col as varchar(max)),'value','replace_value')

    ***The first step is always the hardest *******

  • RE: Trigger gives error on filre of bulk update query

    Can you paste in your trigger please and SQL to create the representative tables and data however as a work around to your issue, this is a bit ineficcient but...

    ***The first step is always the hardest *******

  • RE: Duplicate record delete

    Yer will do thanks never used CTE's as only just migrated to SQL2008r2 from 2000 🙂 the joys:w00t:

    ***The first step is always the hardest *******

  • RE: Duplicate record delete

    Yer you spotted my mistake, i wasnt offering code i was offering a method that i use to remove duplicates :):-D

    my actual SQL i used in the past to delete...

    ***The first step is always the hardest *******

  • RE: Duplicate record delete

    Bring you results into a cursor and then use rowcount -1 row to delete like for example, this will then delete all your duplicate rows bar 1

    declare @col1 datatype,

    @col2 datatype,

    @col3...

    ***The first step is always the hardest *******

  • RE: t-sql

    For the best help its always better to provide some scripts to create some smaple data however, looking at what you wrote all you need to do is inner join...

    ***The first step is always the hardest *******

  • RE: Easy way to search for a string any where within XML column?

    as promised here is what i did

    declare @start int,

    @end int,

    @st int

    set @start =1

    set @st=0

    while @start !=0

    begin

    set @start=(select cast (CHARINDEX('<baseshape ',xml_data,@st) as varchar)

    from #xml_table)

    set @end=(select cast (CHARINDEX('</BaseShape>',xml_data,@start)-@start+12 as varchar)

    from #xml_table)

    insert...

    ***The first step is always the hardest *******

  • RE: COUNT No of occurrances in a text field

    Lo here is what i used, instead of counting the number of occurances to get my while loop to only run that many times it loops untill the value is...

    ***The first step is always the hardest *******

  • RE: Easy way to search for a string any where within XML column?

    HI, i have been working on a task that sounds similar to what you suggest, i will add my code in here on what i did when i get to...

    ***The first step is always the hardest *******

  • RE: Min & Max Date from DateTime Field based on Case

    not entirly sure what you want your results to look like but i read that you want to re order the result set in your screenshot? or do you want...

    ***The first step is always the hardest *******

  • RE: COUNT No of occurrances in a text field

    Thanks guys for all you help, managed to fix my script a differnet way instead of count in numbe of occurances of a specific word for my while loop...

    ***The first step is always the hardest *******

  • RE: How to get rid of white spaces in a blank cell in a SQL Table?

    Confused NUll is NULL but a space ' ' is a value so not sure where your coming from there however, if you want to eliminate collums that only have...

    ***The first step is always the hardest *******

  • RE: How to get rid of white spaces in a blank cell in a SQL Table?

    depending where your white space is you could use replace for example if you have a string

    that looks like this 111 222 333 444 and you want it to...

    ***The first step is always the hardest *******

Viewing 15 posts - 286 through 300 (of 359 total)