Viewing 15 posts - 6,001 through 6,015 (of 6,036 total)
It's absolutely natural to create INSTEAD OF trigger on a view.
This trigger suppose to contain set of statements taking data from view fields and put it into source tables.
Query Analizer...
April 27, 2005 at 12:41 am
select subtotal, (subtotal * .05) as tax
FROM (select (quantity * price) as subtotal
from table) DT
April 13, 2005 at 7:27 pm
You can join table to itself
SELECT MT1.ID, MT1.Data as Name, MT2.Data as Address, MT3.Data as City
FROM MyTable MT1
inner join MyTable MT2 on MT1.ID = MT2.ID
inner join MyTable MT3 on MT2.ID...
April 13, 2005 at 7:03 pm
To compare data in nullable columns everytime use such construction:
isnull(u.telephone, 'NULL') = isnull(ADT.telephone, 'NULL')
I use string 'NULL' because there are definitely no telephones like 'NULL'.
For other columns if you are not...
April 13, 2005 at 6:49 pm
......
or u.c<>ADT.c
or u.l<>ADT.l
or u.st<>ADT.st
or u.postalCode<>ADT.postalCode
or u.mAPIRecipient<>ADT.mAPIRecipient
will be times faster if it will be
NOT (.....
and u.c = ADT.c
and u.l =...
April 13, 2005 at 6:39 pm
I believe problem is in format of date in string. DD/MM/YY vs MM/DD/YY. Application and SQL Server are using different formats.
So while it's 1/1/1900 everything is all right. But...
March 11, 2005 at 5:21 am
Profiler - is your best friend!!!
Start profiler and open properties for the DB. Profiler will show you the query EM used to retrieve this...
March 11, 2005 at 12:35 am
March 11, 2005 at 12:27 am
Be careful with ISNUMERIC!
Look at this:
declare @a nvarchar(50)
SET @a = '10,000.00'
select isnumeric(@A)
-- returms 1 - @a is numeric because it's valid money type value
select...
March 9, 2005 at 4:39 am
When you include "VALUE1 IN (2619) " into WHERE clause it means that every value in column VALUE1 will be converted to datatype INT and copmpared to integer value 2619....
March 7, 2005 at 10:13 pm
Sounds like a lot of job to do if to do it proper way.
You will do it anyway but there is a way to postpone this job.
Create in DB...
March 7, 2005 at 9:32 pm
Another option:
select tbl1.* from
(select top 300 * from tblX Order By keys ) tbl1
left join (select top 200 keys from tblX Order By keys ) tbl2 on tbl2.keys=tbl1.keys
where tbl2.col is...
October 14, 2004 at 8:41 pm
If you look inside of any any table with datetime field you can see that SQL server uses 4 bytes for smalldatetime (same as real) and 8 bytes for datetime (same...
October 5, 2004 at 10:48 pm
From the explanation:
"Answer C is not valid syntax."
For which language?
I thought it's about SQL Server...
September 17, 2004 at 8:00 pm
Viewing 15 posts - 6,001 through 6,015 (of 6,036 total)