Viewing 15 posts - 5,896 through 5,910 (of 6,036 total)
SELECT t2.data,t2.id,t1.data
from table2 t2 left outer join table1 t1
on t1.id=t2.id and t1.data=5
where t2.data=2
Having "t1.data=5" in where clause you eliminate NULLs and make it INNER JOIN.
October 25, 2005 at 3:35 pm
Any subquery is actually "sort of cursor logic".
But here you do group by TableId first, so it's mix of "cursor" and "set" logic.
Nothing to worry about.
October 20, 2005 at 4:39 pm
SET @MeetingName = '1st Trace Reminder for ' + @MeetingName
EXEC MASTER..xp_sendmail @Recipients = 'jbloggs',
@Message = @Message,
@Subject = @MeetingName
Would help?
October 18, 2005 at 8:36 pm
And even better create computed columns
CALLTME_HDW%7 (for weekly periods) and
CALLTME_HDW%1(for dayly periods)
and set up indexes on it.
October 18, 2005 at 8:11 pm
Are you sure everybody can see images from your local folder?
October 18, 2005 at 7:57 pm
What do you mean "decimal format"?
Is it number of days from any "zero day"?
If yes, there is no any problem.
1. Don't convert data in column you are filtering. SQL Server...
October 17, 2005 at 3:10 pm
SELECT '' as AccountID, '' as AccountName
UNION ALL
SELECT convert(varchar(20), AccountID), AccountName
WHERE AccountID Between 1 AND 100
ORDER BY AccountId
October 16, 2005 at 10:26 pm
LEFT JOIN dbo.employee E ON E.id = E1.mag_id
October 12, 2005 at 5:11 pm
Can you actually read your post?
October 11, 2005 at 7:59 pm
"Computed columns don't store their value." - where did you read this?
If value is not deterministic and cannot be used in index it does not mean this value does not...
October 7, 2005 at 8:23 pm
If result of the function will be stored in computed column it will not affect SELECT performance at all.
And clustered index is not mandatory because this function counts only rows...
October 7, 2005 at 7:06 pm
I probbly did not understand you dat right, but there must be something what can distinguish one WorkOrder from another.
I assumed it is WorkOrderId, but you set them equal in...
October 7, 2005 at 6:55 pm
Join table to itself and filter data for each joined part of the table.
Select WO1.SiteId, ...
FROM WorkOrders WO1
INNER JOIN WorkOrders WO2 on WO1.SiteId = WO2.SiteId
INNER JOIN WorkOrders WO3 on WO1.SiteId...
October 6, 2005 at 5:20 pm
Wrong by design.
It must be like this:
Material | Action | Product | Usage
---------------------------------------
After this you may join rows in order you like and do whatever calculations you need.
October 6, 2005 at 2:57 pm
Viewing 15 posts - 5,896 through 5,910 (of 6,036 total)