Forum Replies Created

Viewing 15 posts - 15,001 through 15,015 (of 15,381 total)

  • RE: Table variable does not take part in Transaction

    Gianluca Sartori (2/25/2011)


    Sean Lange (2/25/2011)


    ...there is not a table to log against. This is no different than any other variable type.

    Not true: operations on table variables are logged, but don't...

  • RE: Table variable does not take part in Transaction

    Carlton Leach (2/25/2011)


    My 5 cents is always use a temp table. It behaves more like a real table than a table variable does.

    Carlton.

    There are perfectly valid reasons to use a...

  • RE: Table variable does not take part in Transaction

    AJ-636201 (2/25/2011)


    Hi,

    I am a bit confused about the table variables. As transaction does not affect the table variable operations. So is there any way to force table variable to...

  • RE: Table variable does not take part in Transaction

    Variables are not part of a transaction. If you are using a table variable it will not be part of the transaction as there is not a table to log...

  • RE: Computed columns

    Something like this.

    Select a.Id, Sum(b.quantity) as Total, Sum(c.quantity) as Total2, Sum(b.quantity) * Sum(c.quantity) as GranTotal

    from TableA a

    join TableB b on b.Id = a.Id

    join TableC c on c.Id =...

  • RE: Trigger help

    Craig Farrell (2/22/2011)


    Sean Lange (2/22/2011)


    Just a comment that will save you untold hours of pulling your hair out in a few months when the columns in tblSource get modified...

    INSERT INTO...

  • RE: Trigger help

    Just a comment that will save you untold hours of pulling your hair out in a few months when the columns in tblSource get modified...

    INSERT INTO tblHistorySource

    select *, getdate()

    Don't use...

  • RE: Number of rows processed by a cursor

    You could create a variable and increment it on each pass through the cursor. Of course the preferred method would be to rework your code to a set based approach...

  • RE: large report / large XML file delivery to web users (any date range)

    Aside from the totally ridiculous notion that a user may want a report that is 500MB I am surprised you worried about how long the transformation takes. The download time...

  • RE: removing extra spacees and updating rows. How to?

    My first suggestion would be to separate these 4 pieces of data into their own columns. Barring that you will have to update using the substring function.

  • RE: sql trigger get incoming SQL

    What I meant was that you could create a stored proc that would do you insert for you. Instead of inserting into the table you would use the stored proc...

  • RE: String Manipulation/Character Removal

    David - yours is about half as much typing as mine but has a lot more +1 -1 than mine. They both certainly work equally well. :hehe:

  • RE: String Manipulation/Character Removal

    something like this should get you there

    declare @name varchar(50) = 'IA_JAMESF_1-6YHSAT'

    select Reverse(SUBSTRING(REVERSE(SUBSTRING(@name, CHARINDEX('_', @name) + 1, DATALENGTH(@name))), CHARINDEX('_', REVERSE(SUBSTRING(@name, CHARINDEX('_', @name) + 1, DATALENGTH(@name)))) + 1, DATALENGTH(REVERSE(SUBSTRING(@name, CHARINDEX('_', @name) +...

  • RE: String Manipulation/Character Removal

    Jody Claggett-376930 (2/18/2011)


    Once you remove the IA_, use CHARINDEX to find the next unserscore, subtract 1 from that position and that will give you the length of the substring you...

  • RE: sql trigger get incoming SQL

    It sounds like you are wanting to change some of the values under certain circumstances on insert? If so, you could accomplish this with an insert sproc instead of a...

Viewing 15 posts - 15,001 through 15,015 (of 15,381 total)