Viewing 15 posts - 1,351 through 1,365 (of 1,491 total)
I am glad my efforts sort of worked!
You are correct, those horrible multi-valued columns need to be dealt with. The following link may give you some...
November 16, 2006 at 3:56 am
Asim,
>>can you tell me how should i take care about this logic below in my stored procedure
As you have failed to give a cogent description of what you are trying...
November 15, 2006 at 12:05 pm
Asim
Microsoft SQL Server is a relational database so rows in a table should have NO order. (Basic theory.) There often is some order but this cannot be guaranteed!
The...
November 15, 2006 at 11:37 am
If the accuracy of a FLOAT is alright, then just force a FLOAT by adding a decimal point to one of the numbers.
eg. set @Size...
November 15, 2006 at 11:09 am
Carl,
I see no need for dynamic SQL here as the only thing you are adding to the string is @Crit_Label.
To speed this procedure up I suggest you:
1. Convert to static...
November 15, 2006 at 10:54 am
If possible, normalize the schema although a reporting tool should be able to cope with the current table structure.
To get the output requested, something like the following should work:
SELECT
T.Item_ID
,T.Year_ID
,N.Nbr AS...
November 13, 2006 at 10:59 am
Farrell,
I think the difference is that your quick age calculation just uses the difference in years. As all your BirthDates are in December you should really minus one from the...
November 13, 2006 at 9:55 am
You need to group by the formula for TableValue:
INSERT INTO ClaimCounts (Month_of_file, CalcAction, TableValue, CalculatedValue)
SELECT
@Month_of_file_filter AS Month_of_file
,'Record Count by Loss Month' AS CalcAction
,CONVERT(varchar(4), LossDate, 120) AS TableValue -- change...
November 13, 2006 at 9:11 am
You cannot assign a value to a function. Try something like:
UPDATE CUSTOMERS
SET [DATE] = DATEADD(year, 100, [DATE])
WHERE YEAR([DATE]) BETWEEN 1900 AND 1999
November 13, 2006 at 8:08 am
There are probably better ways, but something like this should work in both SQL2000 and SQL2005:
SELECT CASE
WHEN D.Age BETWEEN 20 AND 29 THEN '20-29'
WHEN D.Age BETWEEN 30 AND 39 THEN...
November 13, 2006 at 7:35 am
You can do it via a derived table:
SELECT
D.UM
,D.UM_DIV
,D.UM_DIV * D.QTYORD AS UnitNum
FROM (
SELECT S.UM
,S.QTYORD
,CASE S.um
WHEN 'ea' THEN 1
WHEN 'bx' THEN 10
ELSE 2 END AS UM_DIV
FROM Sales S ) D
November 10, 2006 at 10:16 am
You could try checking to see if any of the VIEWs point to a different server.
Also, as you do not seem to be using any aggregate functions, you could remove...
November 10, 2006 at 9:22 am
Using LEFT JOINs instead of INNER JOINs should solve your immediate problem. Age should always be calculated from DateOfBirth.
November 10, 2006 at 3:00 am
AMacKay,
You really need to redesign your tables so that the <Customers> table has a PRIMARY KEY called something like customerID int. Then you will need to add customerID as a...
November 9, 2006 at 11:36 am
The following should work but, like all triangular joins, if you have a lot of rows it would be better to use a cursor. Somewhere between 5000 and 10000 rows...
November 8, 2006 at 11:08 am
Viewing 15 posts - 1,351 through 1,365 (of 1,491 total)