Viewing 15 posts - 931 through 945 (of 1,217 total)
Or, if you prefer to use SET for setting of one variable:
Declare @Name varchar(30)
SET @Name = (SELECT TOP 1 CustName
From Customer
Order By CustName)
October 24, 2005 at 7:30 am
Well, that's something you have to know (or find out) - I don't know who will use the result and for what it will be used. But... let's analyze it. If you...
October 21, 2005 at 2:05 am
A new column has pros and cons... If later more people have to be reported sometimes here and sometimes there, like James now, it will be easier to implement it....
October 20, 2005 at 10:05 am
No, the first query in my post is (or should be, if I didn't make any mistake) the same query you are using now - taken from your post, just...
October 20, 2005 at 6:42 am
A bit risky IMHO... what if the mail fails one day and sends nothing? The user won't get this info any more unless you run a special query. We monitor several things...
October 20, 2005 at 5:54 am
I am not sure, since my orientation in the old syntax is not good, but translated into JOINs it should be something like this:
select AOofficeName as Office, count(ARid) as totReferrals
from...
October 20, 2005 at 5:33 am
The most interesting thing is, why the result column is labelled "day of week"... probably to confuse enemy agents
October 20, 2005 at 4:57 am
Sreenath,
your first post is a bit inconsistent. You want to select the 2nd highest value, but for D3 there is only 1 value. That means, D3 should not appear in...
October 20, 2005 at 3:42 am
As it seems to me, as long as they only require the marks, without any other specification of the case, it makes no difference if there is a tie precisely at the Nth...
October 19, 2005 at 6:22 am
As far as I can remember, you get this error message if one of the strings to be converted:
1) does not result in a date at all (incorrect entry)
2) does...
October 18, 2005 at 1:34 am
Well, you should check carefully how the states are stored in the concatenated column. Are the state abbreviations always 2 letters? If you have branches in Canada and have it stored as...
October 14, 2005 at 2:26 am
Well, generally I agree, and I never write SELECT * in any SQL that is used repeatedly. But from a practical viewpoint, it is fine that the structure of a table...
October 11, 2005 at 1:52 am
Take care with ISNUMERIC... it isn't what it seems :-). If what you want is to check whether all chracters in a string are numbers, then this is not 100%...
October 11, 2005 at 1:27 am
phillcart,
your solution is set-based, but it has one serious flaw... it doesn't work as expected (or at least not as I understood the question). You check holidays table first, and...
October 10, 2005 at 1:14 am
And what about this? Using standard format for datetime (YYYYMMDD); taking into account how the question was formulated("datepart between 2 and 6"), I decided to use a SET DATEFIRST 7 setting.
create table...
October 7, 2005 at 8:21 am
Viewing 15 posts - 931 through 945 (of 1,217 total)