Viewing 15 posts - 991 through 1,005 (of 1,491 total)
COALESCE can be used as a general query hint. (ie Non tsql specific.)
You should look a the query plans to see what is going on.
In this case putting a function...
March 31, 2009 at 5:41 am
SELECT A.Id
FROM TableA A
WHERE NOT EXISTS
(
SELECT *
FROM TableB B
WHERE B.Id = A.Id
)
or
SELECT A.Id
FROM TableA A
LEFT JOIN TableB B
ON A.Id = B.Id
WHERE B.Id IS NULL
March 31, 2009 at 4:23 am
Or you could re-write the view to avoid the problem:
CREATE VIEW TODOS2
AS
SELECT A.rgt, A.codctt, D.CIF, D.morada, D.dta_alteracao, D.bictb
FROM allt AS A
JOIN
(
SELECT B1.codctb, B1.CIF, B1.morada, B1.dta_alteracao, B1.bictb
FROM contribuintesest AS B1
UNION ALL
SELECT...
March 31, 2009 at 3:43 am
Glad to be of help.
If this is an internet application it is common practice to assign each user an uniqueidentifier and use the NEWID() function.
If you really want an integer,...
March 26, 2009 at 8:47 am
musab (3/26/2009)
Please suggest me some solution.
I have.
March 26, 2009 at 8:17 am
Use sp_executesql as it does not require you to convert any parameters to strings.
March 26, 2009 at 8:00 am
It may be best if you re-think your design.
If you really want to do this then:
1. Less Blocking
DECLARE @Counter int
-- No need for explicit transactions
UPDATE CounterTable
SET @Counter = Counter =...
March 26, 2009 at 7:47 am
You may also like to try OUTER APPLY.
If you have a large amount of data, I would be interested in knowing if it is quicker than Chris's solution:
UPDATE M
SET M.DaysSinceLastRun
=...
March 26, 2009 at 5:48 am
Tables have no order so the only way I can see of ordering you data is by Col1, Col2.
(ie 1,4 will come before 1,11)
If this is OK, then something like...
March 26, 2009 at 5:13 am
The problem has been solved by re-booting the machine.
I am feeling particularly dense today – more coffee required.
Thanks for you help.
Ken
March 19, 2009 at 10:03 am
Hi Brandie,
Thanks for the info.
Unfortunately Local Help was already checked. I tried removing and re-adding it to no avail.
I will have to look into this in more detail tomorrow -...
March 19, 2009 at 9:24 am
Thanks for the replies.
Please could you explain how to enable local help?
My development machine does not have internet access. I have not changed anything on it recently although I am...
March 19, 2009 at 7:36 am
Why not just pass name to your function? The function will then not need to do a lookup.
March 3, 2009 at 6:15 am
You should derive the shifts from a Calendar table and then join to your data.
(Look up Calendar table on this site)
For simplicity I have just used a shifts table here:
DECLARE...
February 26, 2009 at 5:33 am
Also, are there any user defined functions in the query?
February 25, 2009 at 6:05 am
Viewing 15 posts - 991 through 1,005 (of 1,491 total)