Viewing 12 posts - 31 through 42 (of 42 total)
Select {col1, Col2, ...Coln} From {Table}
Where NOT (Department = 2 And Category2 = 'B')
And NOT (Department = 2 And Category3 = 'C')
And NOT (Department = 3 And Category1 =...
May 7, 2008 at 9:43 am
Hmm I know exactly how UDF's work given that I write/use them but this question must have been worded really badly (for me).
"SELECT UDF FROM Table" - to me this...
May 7, 2008 at 8:44 am
Works fine in SQL2000.. you'd get the start date column twice (once at start, once wherever it naturally sits in the order of columns on the table.. and order by...
May 7, 2008 at 8:37 am
If you can make the assumption "Smallest MID is always the 'first' row for each code" then this should work:
-- Using MID (assumption: Smallest ID = "first")
SELECT PD.Code,
PD.Remarks,
E.Status
FROMPDetails PD
INNER...
May 7, 2008 at 2:44 am
Derek Dongray (4/30/2008)
janine.rawnsley (4/30/2008)
The table variable is only created for demo purposes..Just use ORDER BY CAST(replace (IPAddr,'.','') as int)
No, because this would place '192.1.1.1' before '19.2.1.12'.
Also addresses like '192.168.123.234'...
April 30, 2008 at 7:34 am
The table variable is only created for demo purposes..
Just use ORDER BY CAST(replace (IPAddr,'.','') as int)
April 30, 2008 at 5:41 am
Tell me I'm wrong.. if I am.. but isn't this the simplest way?
-===== Create a table to demo with
DECLARE @DemoTable TABLE (IPAddr VARCHAR(15))
INSERT INTO @DemoTable (IPAddr)
SELECT '192.168.215.1' UNION...
April 30, 2008 at 5:27 am
Well, since you appear to only be running it for a month at a time, why not simplify it and use DATEPART in your grouping?
SELECTUser_ID,
MIN(add_date) as 'First Log',
MAX(add_date) as 'Last...
April 30, 2008 at 5:19 am
I've made a few assumptions hence my larger query:
1, You won't always have a job within a category with a create date or filled date that falls within the desired...
April 30, 2008 at 4:55 am
If I'm understanding your requirement correctly, something like this? Sorry if I've over-complicated but I'm trying to cater for all possible scanrios here (including there being no jobs at all...
April 30, 2008 at 3:07 am
Viewing 12 posts - 31 through 42 (of 42 total)