Viewing 15 posts - 241 through 255 (of 1,347 total)
Yep, definitely backwards. Good catch.
Must ... drink ... more ... caffeine.
November 30, 2006 at 10:51 am
>>we can select just any one row.
So it's arbitrary then ?
If so, just locate 1 other data element that uniquely identifies the row to act as a tie-breaker. Looks...
November 30, 2006 at 10:16 am
-- return the total number of products using an OUTPUT variable
SELECT @HowManyProducts = COUNT(ProductID) FROM Products
Shouldn't you be returning the...
November 29, 2006 at 1:33 pm
>>doesn't SELECT...INTO lock the database
Database lock ?
Creation of a table requires locks on the system tables that contain the table/column definitions. Pages in tempdb's sysobjects and syscolumns may be...
November 29, 2006 at 12:59 pm
What is the data source ? SQL or non-SQL ?
Instead of a long-running row-by-row DTS process, you can minimize Insert/Update duration and duration of locks by pulling the data into...
November 29, 2006 at 9:57 am
Join to a derived table that aggregates the required MAX() data:
Select t.Item, t.Locn, t.Sales, t.[#Months], dt.MaxMonths
From YourTable As t
Inner Join
(
Select Item, Max( [#Months] ) As MaxMonths
Group By Item
) dt
...
November 28, 2006 at 3:41 pm
Remi's solution and diagnosis was dead on. Please re-read it.
>>i guess that is not the solution because see when i do the insert in the table Transactioncountss it is...
November 28, 2006 at 1:54 pm
Create a linked server and perform the operation as 1 set-based UPDATE. Assuming you've named the link "DB":
UPDATE orcl
SET
EMP_SK = sq.emp_sk
-- Use linked server. Careful - Oracle names are...
November 28, 2006 at 11:42 am
In addition to re-thinking, it can't hurt to learn the correct syntax for assigning multiple variables at once, using SELECT and not SET:
Instead of:
set @var1 = (select mytable.field1 from mytable...
November 23, 2006 at 9:59 am
The issues are:
- performance
- locale safety
Testing over large data volumes will show that SELECT DATEADD(dd, DATEDIFF(dd,0,@mydate), 0) is the fastest way to strip off time.
Use of string converts can lead...
November 22, 2006 at 1:36 pm
Creating a temp table inside a proc causing a recompile ?
Cardinality ? Is DocPhrase in a 1 to 1 relationship with the table you're deleting from ? If not, JOIN...
November 22, 2006 at 1:30 pm
>>why did he design the code that way
I usually see this alternative time stripping method coded using Floor() rather than cast as int. I expect it was a lack of...
November 21, 2006 at 2:51 pm
This explains the "why" of what you're seeing:
http://vyaskn.tripod.com/searching_date_time_values.htm
November 21, 2006 at 2:11 pm
>>3. Delete entries in RespondentLOV that do not exist in Respondent
That wasn't the requirement. Hence the complexity. RespondentLOV records were not to be deleted, they were to be remapped to...
November 21, 2006 at 1:32 pm
Select @GUID = NewID()
November 21, 2006 at 1:26 pm
Viewing 15 posts - 241 through 255 (of 1,347 total)