Viewing 15 posts - 421 through 435 (of 582 total)
I agree that for trivial UPDATEs - those involving just one table instance, you needn't use a FROM clause - except that if you do the SELECT first, you will already have...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
You can track a server cursor by its cursor id which is generated when the cursor is opened, and referenced in all subsequent calls to that cursor. The call to...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
(Jeff-) I agree re writing the SELECT first.
re using full names for aliased tables, I'm sure I remember that in a previous version you could not reference the base table...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
I versions before 9, I think an insert into a table that has an identity column has to have a column list:
So Jules's answer...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
But if our hapless meat packer discovers he's been given a 2lb beef wrapper for a three pound sirloin, I doubt whether his employer will look kindly on it if he instead wraps...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
I would get in the habit of always using a FROM clause in your updates. then for any UPDATE statement, you can just replace the first part to convert it...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
I don't understand why it would differ between servers, but looking at the code, I notice that this field:
c.clientid AS CovastID,
is inserted into this column:
CovastID VARCHAR(36),...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
You can write a stored procedure to run the query, which work well if your view represents a finished free-standing query which is going to be returned to client:
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Re the previous two posts, the IN subquery will be equivalent to a where clause in the main query (and therefore to an inner join) if and only if FE_Code...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Not relevant under the described circumstances, but note odd overflow behaviour of STR():
select
str(999, Tim Wilkinson "If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Normalisation improves OLTP performance, ensures consistency and exposes the true nature of your data model's subject matter.
Many-to many tables shouldn't just be rgarded as link or join or association tables...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Unless you are going to have unlimited sub-sub-sub-...categories in your item numbers, you would ideally decompose this data into cat, subcat, subsubcat. you could then order properly, as well as...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Can you post the data from those three records then?
Also try running the query with a left join, as a select without variables. Do you get more records?
You could also...
Tim Wilkinson
"If it doesn't work in practice, you're using the wrong theory"
- Immanuel Kant
Viewing 15 posts - 421 through 435 (of 582 total)