Viewing 15 posts - 556 through 570 (of 582 total)
You may be pleased (kind of!) to know that the reason you have had so much trouble is that what you are trying to do is logically impossible.
You don't have...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 24, 2003 at 3:09 am
David,
true. I was assuming that the tables don't contain duplicate rows, but are in the usual kind of many-to-one (master-detail, parent-child) relationship.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 10:24 am
Just reread your last post, and the answer to your question
quote:
in one table there are duplicate case no.s and in...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 10:04 am
So you haven't actually got duplicate rows.
I suspect what you've got is a so-called 'fan trap'.
This happens when you have two many-to one relationships. Lokking at your query, this may...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 9:58 am
OK - sorry, wasn't trying to nitpick, but I use a similar method - I literally and figuratively see red when I open a stored procedure to find it is...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 3:31 am
The answer to your last question is yes. Commit and Rollback are alternative ways of closing a transaction. Once you have rolled back (or committed) a transaction, there is of...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 3:11 am
Sorry to deviate, but a quick question for DaveB:
"AND(@param12 IS NULL OR (@param12 IS NOT NULL AND [on hold code] = @param12))"
-Is there any particular reason for including the redundant...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 23, 2003 at 2:55 am
Need more info - can you show us the DDL from the accidents table?
Exactly what is it that you are trying to work out? Are you trying to calulate the...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 20, 2003 at 7:26 am
Nothing very original - a suggestion for implementing the ideas already given, and for amnding the SQL to run as a simple SELECT statement:
--DDL:
create table custlist(id int identity(1,1), custid int,...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 20, 2003 at 6:00 am
No - I think it *is* the way to go. Joins are the standard and normally the best method, and Steve Jones' suggestion is certainly the way I, and most...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 20, 2003 at 3:30 am
That's in SQL 7 - SQL 8 might be different. we haven't upgraded...yet.
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2003 at 12:41 pm
Oh I see. OK - from memory, you can use:
declare cr_ViewText
cursor fast_forward
for
select c.text from syscomments c
join sysobjects o
on c.id = o.id
where o.name = @ViewName
order by c.colid asc
That...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2003 at 12:39 pm
If you want to compare only using column names, replace the whole section of code with
IF 1=2
Tim
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2003 at 12:26 pm
you can amend the script lowell refers to. At line 302, you will see the following code:
IF EXISTS(SELECT COLUMN_NAME,
DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,
CHARACTER_OCTET_LENGTH,
NUMERIC_PRECISION,
NUMERIC_PRECISION_RADIX,
NUMERIC_SCALE,
DATETIME_PRECISION,
COUNT(*) AS NUMBERS
FROM #TableColumns
GROUP BY COLUMN_NAME,
DATA_TYPE,CHARACTER_MAXIMUM_LENGTH,CHARACTER_OCTET_LENGTH,
NUMERIC_PRECISION,NUMERIC_PRECISION_RADIX,
NUMERIC_SCALE,
DATETIME_PRECISION
HAVING COUNT(*)=1)
If...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2003 at 12:23 pm
ian - i don't see how what you describe can happen unless the query is more complex than the one shown. I assume you are not suggesting that the query...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
June 19, 2003 at 11:20 am
Viewing 15 posts - 556 through 570 (of 582 total)