Viewing 15 posts - 61 through 75 (of 114 total)
if the parent table uses an identity field for the primary key, you can assign a variable to the identity inserted with the scope_identity() function.
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 12:59 pm
Here are the steps:
1) drop the foreign keys
2) Add the identity column to the table
3) Add a field to the related tables to hold the new identity column
4) Update the...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 8:46 am
I'm still confused about how the page is full. Since data pages are 8K and we are only using 4K, how is that full?
Also, in my opinion, the question...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 8:37 am
--Removed--- 🙂
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 8:27 am
Instead of using LEFT(RTRIM(LTRIM(ARMNAME)),25)
use
LEFT(RTRIM(LTRIM(ARMNAME))+SPACE(25),25)
You'll end up with 25 characters everytime.
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 8:24 am
SQL Server 2005 only has the datetime field type. A date type field was added in SQL 2008.
Your conversion should give you a date with all zeros for the...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
March 1, 2011 at 8:20 am
I'm glad it helped!
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 28, 2011 at 5:53 am
yeah that looks like homework. If it is, ask your classmates or teacher.
drop the cursors and rethink your approach.
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 25, 2011 at 5:47 am
I would ask why you need to use a temp table at all. The CTE option described would likely help (but again we need the details.
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 24, 2011 at 1:43 pm
Let us know how it goes!
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 23, 2011 at 5:55 pm
Sounds like historical records without dates or status flags 🙂
Anyway, I hope the new version works well for you. A non-clustered index on those two fields should dramatically speed...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 23, 2011 at 5:48 pm
I'm with you on that one. I didn't want to clutter up the quick answer, but that is a great question. I think i'm afraid to hear the...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 23, 2011 at 4:32 pm
Well let's hope it helps. Just based on the numbers you replied back with they should at least look at other "options".
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 23, 2011 at 1:13 pm
This query should do what you are looking for (i think...i'm not entirely sure what you are looking for):
(I also don't see why you need the RAWH table, but i...
--------------------------------------------------------------------------
When you realize you've dug yourself into a hole....Step 1...stop digging.
February 23, 2011 at 1:08 pm
Viewing 15 posts - 61 through 75 (of 114 total)