Viewing 15 posts - 15,001 through 15,015 (of 15,381 total)
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...
February 25, 2011 at 9:29 am
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...
February 25, 2011 at 9:26 am
AJ-636201 (2/25/2011)
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...
February 25, 2011 at 8:55 am
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...
February 25, 2011 at 8:53 am
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 =...
February 23, 2011 at 10:11 am
Craig Farrell (2/22/2011)
Sean Lange (2/22/2011)
INSERT INTO...
February 23, 2011 at 7:16 am
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...
February 22, 2011 at 3:41 pm
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...
February 21, 2011 at 2:52 pm
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...
February 21, 2011 at 12:15 pm
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.
February 21, 2011 at 8:00 am
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...
February 21, 2011 at 7:55 am
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:
February 18, 2011 at 3:26 pm
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) +...
February 18, 2011 at 2:58 pm
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...
February 18, 2011 at 2:50 pm
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...
February 18, 2011 at 2:41 pm
Viewing 15 posts - 15,001 through 15,015 (of 15,381 total)