Viewing 15 posts - 496 through 510 (of 529 total)
I don't think this is possible either.
The only solution I can see is using a cursor to loop through all the possible groups. You can use the syntax from 'Tame...
August 13, 2002 at 7:17 am
Depends on what the types of columns are.
One solution is setting a database wide parameter :
sp_dboption 'database', 'concat null yields null', 'FALSE'
Or you can use the ISNULL function as in
col001...
August 13, 2002 at 6:52 am
You can use the following statement.
select max(number) from sysobjects o, syscomments c where o.name = 'mySP' and o.id = c.id
August 13, 2002 at 12:24 am
If the fields are not strings
SELECT cost FROM table
WHERE low < 10.00 and high > 10.00
Are the fields strings?
Then it might be necessary to cast to floats.
SELECT cost FROM table
WHERE...
August 12, 2002 at 8:38 am
Never thought of solving this problem using only a single table.
Typically, I opt for adding a 'history' table in which the non-active records get archived. But this becomes a hassle...
August 12, 2002 at 3:55 am
You could use :
select v.vehicle_id, u.property, u.value
from vehicles v,
(select vehicle_id, 'chain', chain from vehicles
UNION
select vehicle_id, 'spacing', spacing from vehicles
UNION
select vehicle_id, 'teeth', teeth from vehicles
) u
where v.vehicle_id = u.vehicle_id
August 12, 2002 at 1:10 am
Same here.
We try to add a prefix to 'all' the objects in our database, to indicate the owner-module of the object.
August 12, 2002 at 1:01 am
Check the articles 'Tame Those Strings'.
One article (part 4) is about numeric conversions, and should get you pointed in the right direction :
http://www.sqlservercentral.com/columnists/sjones/20010422115809_1.asp
August 9, 2002 at 8:24 am
Try this :
CREATE TRIGGER ClientUpdatesTrigger ON Table1
FOR UPDATE
AS
DECLARE @MyID nvarchar(50)
if exists(select id from inserted where status = 'Taken')
insert into testtrig2 (id)
...
August 9, 2002 at 8:16 am
How did you detach the file? (Same server, other server, what version of SQL Server, ...)
Do you have any reason to be suspicious about file corruption? (E.g. disk crash)?
August 9, 2002 at 6:17 am
I can see no reason why the trigger is fired again. Some tests here revealed no problem...
Can you post your trigger's code
August 7, 2002 at 9:27 am
You can also just use the IsNull function as in :
SELECT IsNull(F1,F2) F11, IsNull(F2,F1) F22
FROM #Test1
August 7, 2002 at 7:51 am
If possible at all, you should try to avoid the cursor loop. This is probably a greater cost than executing the query itself. You can test this, just by timing...
August 7, 2002 at 2:29 am
Viewing 15 posts - 496 through 510 (of 529 total)