Viewing 15 posts - 1 through 15 (of 22 total)
The best way to think about it as "NOT EXISTS". This is the most logical human approach. You can always convert "not exists" into "left join"
select s.* from #students s
where...
August 23, 2006 at 6:14 pm
I enjoyed reading it. My company will switch to SQL 2005 directly from SQL 7 within a couple of month and I am trying to read as much as possible about CLR...
December 19, 2005 at 10:55 am
this might help you.
http://www.motobit.com/tips/detpg_SQLWrFile/
I used this approach before and it worked well. I used cursor to loop through the result query, to format and write it into text file...
December 23, 2004 at 11:23 am
set nocount on
/* Script for Creation of Employee Table*/
CREATE TABLE [dbo].[#Employee] (
[id] [int] NULL ,
[name] [Varchar] (50) NULL ,
[salary] [Numeric](18, 2) NULL
 
December 20, 2004 at 11:44 am
Would it be just easier to save duplicated records in temp table where we have only 1 records for all duplicated records, then to delete all duplicated records in one shot from the original...
December 20, 2004 at 11:31 am
Besides performance issues, I think that typical beginners usually prefers WHERE IN or WHERE NOT IN to include or exclude something, because this logic is kind of easier to...
December 16, 2004 at 10:30 am
you should always try to use simple JOIN over WHERE IN , if it is possible.
The same goes for LEFT JOIN over Where NOT IN
December 15, 2004 at 4:09 pm
I really like this book.
http://www.bookpool.com/.x/3b9ypa4by8/sm/1893115828
Pretty good book for the programmers who want to move toward more advanced stuff
December 15, 2004 at 10:06 am
That how aggregate function works with Group by. It aggregates all records based on your grouping. Based on your query you want to count events for the entire day and...
December 14, 2004 at 7:35 pm
Try to delete and rebuild this link from scratch, do not just refresh.
MS Access will ask you about unique key, make sure you select unique key. Good luck!
December 14, 2004 at 5:18 pm
this part of your query I do not understand, it does not look that you need it at all
AND A.OpenedDateTime = (SELECT MAX(OpenedDateTime)
December 14, 2004 at 5:11 pm
It maybe because you group by A.OpenedDateTime and it has to be just date without time part
should be something like
SELECT A.UserID, A.CategoryDescript, A.ComplaintType, convert(varchar(10),A.OpenedDateTime,101), COUNT(A.ComplaintID) AS OpenedTot
FROM vwComplaintDetails A
WHERE A.OpenedDateTime...
December 14, 2004 at 5:07 pm
Update TableA
Set TableA.Flag = 'Y'
from
tableA
left join
tableB on tableA.key1 = tableB.key1 and tableA.key2=tableB.key2 and tableB.FLd ='0'
where tableB.key1 is null and tableB.key2 is null
December 14, 2004 at 2:28 pm
host_name() will return workstation IP address, the computer that calls this code. In order to get server IP, you should stick to ipconfig
December 9, 2004 at 11:22 am
sorry, I did not read the entire thread.
Obviously, using patterns is much shorter and prettier
select 'RKA10' as Data into #data from sysobjects where 1=2
union
select 'RKA100'
union
select 'KA11'
union
select 'RMX10'
union
select 'RMX100'
union
select 'RMX11'
union
select 'RSA12'
union
select...
December 2, 2004 at 11:44 am
Viewing 15 posts - 1 through 15 (of 22 total)