Viewing 15 posts - 1,036 through 1,050 (of 1,216 total)
Please copy the whole SQL again from my previous post, I have edited it in several places. sickid was changed to minsickid in the JOIN "ON" clause and also in...
March 31, 2005 at 8:04 am
Oops! Sorry, I forgot. You have to specify a column name for a computed column is such query.
SELECT s.sickid
FROM sickness s
LEFT JOIN
(select payroll, staffid, start_date, end_date, min(sickid) as minsickid
from...
March 31, 2005 at 7:48 am
Hmm... quite complicated, not sure whether I haven't missed something... what about this (I will write as I'm thinking, so that you can follow my reasoning and decide whether I'm...
March 31, 2005 at 7:32 am
On a table that you described I would use a clustered index, though not necessarily on the Primary Key... depending on how each column is most often referenced in the...
March 30, 2005 at 12:39 am
Problem is in the CASE statement. You can't use the column name both in definition of the CASE (CASE App.techarea) and in the WHEN conditions (WHEN COUNT(App.techarea) > 1). This should work:
SELECT...
March 29, 2005 at 1:04 am
Well, everything depends on what data you have and what is the desired result... SQLS doesn't have any table that would directly store numbers of days in all months, and...
March 25, 2005 at 5:20 am
Happy Easter, Frank!
BTW, your code adds a comma even if one is already there... Something like this should work better, but still it depends on whether there really is 'USA'...
March 25, 2005 at 1:53 am
Wayne's solution is fine, just be very careful and make a thorough check of the results before you allow this update in production. There could be various problems caused by...
March 24, 2005 at 9:06 am
If what you wrote is without typo, then there is a difference between the 2 exec statements: exec (@sql) vs. exec @sql. Missing parentheses would mean that @sql is name of...
March 16, 2005 at 4:23 am
To tell the truth, I would be afraid to do such conversion ... it seems that you can't rely much on what is written in the column. What is 1,504?...
March 15, 2005 at 2:36 am
Your SQL CREATE VIEW TotalOrdersToSpain is not preceded by existence check and DROP. Maybe this view already existed in the database?
Did you run the script in Query Analyzer? If yes,...
March 14, 2005 at 1:41 am
Set @user-id = 'IdentityCol' means that you are trying to assign the string 'IdentityCol' as a value of @userid. It is enclosed in single quotes. If...
March 14, 2005 at 1:23 am
LOL... who has that wonderful icon, banging the head on a desk? Phillcart? Well, that's how I felt when I read the explanation. In fact this was the simplest solution...
March 11, 2005 at 8:42 am
Hmmm... I really don't know... let's try to look around. What is the database you are using? Is it user or system database?
Can you run these statements and post results...
March 11, 2005 at 5:54 am
Viewing 15 posts - 1,036 through 1,050 (of 1,216 total)