Forum Replies Created

Viewing 15 posts - 14,656 through 14,670 (of 15,381 total)

  • RE: Parse String to find a letter...

    jarid.lawson (5/20/2011)

    I would love to see different / faster ways to do this.

    Looping is definitely not the way to go about this. It is painfully slow. If you are trying...

  • RE: Parse String to find a letter...

    Something like this?

    declare @MyString varchar(max) = '----A375475960dkgjfkfkgjfkvkl!!!!!-------DAfkdfk55500---!'

    select len(@MyString) - len(replace(@MyString, 'a', ''))

  • RE: Need TSQL to get record count by time intervals..

    sql_jr (5/20/2011)


    If I was sure how to go about this, I would have posted my code. I don't have any b/c I need help. I figured this is...

  • RE: Very very new to sql:changing m to f in the table

    You should NOT use a loop for an update statement. Try something like this.

    update MyTable set Gender = case Gender when 'M' then 'F' when 'F' then 'M' end

  • RE: Remove cursors without using while loop

    You know editing your original post and creating a new thread for the same thing isn't going to generate any new help. Your data is too sensitive and the question...

  • RE: dynamic sql

    Like I said, if you want us to help you, you have to provide us some information. There are very few cases where set based logic can't replace a cursor....

  • RE: Which Bugs Do You Find?

    GSquared (5/20/2011)


    I've spent a lot of time recently fixing bugs caused by a prior database dev who didn't actually understand SQL as well as he thought.

    For example, an insert that...

  • RE: Which Bugs Do You Find?

    We have the occasional bug (where something actually doesn't do what is it supposed to do) but most of the time it is changing requirements. I can't begin to count...

  • RE: dynamic sql

    I'm sorry but your logic is Severely flawed.:w00t:

    I figured that when I saw

    @col_name= column name coming rom cursor

    at the very top.

    If you really want some help you need...

  • RE: Find and replace an Integer in a specific column of a table.

    That won't really get what this guy is after. For example that would turn '17' into '182'. You probably just need to

    update table set col = '82' where col...

  • RE: Removing duplicates from a subset of fields

    brent 82845 (5/19/2011)The Primary key for the main table is (Supplier, Terminal, Branded, Product, Eff_Date, Eff_Time)

    You can see in the data that Supplier2 sent a second price change for the...

  • RE: Get Unique Rows

    This would get you the whole row.

    select MyTable.*

    from MyTable

    join

    (

    select GroupID, max(DateStamp) as DateStamp

    from MyTable

    group by GroupID

    ) groupList on groupList.GroupID = MyTable.GroupID and groupList.DateStamp = MyTable.DateStamp

    order by MyTable.GroupID

    Depending...

  • RE: Chance expired password

    When establishing a connection if the username/password is correct but the password is set to expired sql will raise an error that the login in failed.

    Login failed for user '[user...

  • RE: NOT NEED

    Is there a question here somewhere?

  • RE: Generating Data-String dynamically by using control table

    SMB2010 (5/18/2011)


    i have updated my question. I hope it is clear enough for you to understand

    You kind of missed the whole point about posting ddl and sample data that is...

Viewing 15 posts - 14,656 through 14,670 (of 15,381 total)