Viewing 15 posts - 136 through 150 (of 182 total)
I'd be interested in knowing how to reference either result in an ado recordset.
February 24, 2006 at 1:57 pm
--this code will set up the test data set
DROP TABLE [mytable]
GO
CREATE TABLE [mytable] (
[barcode] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,
[datetimestamp] [datetime] NOT NULL ,
[myflag] [bit] NULL ,
CONSTRAINT [PK_mytable] PRIMARY...
February 24, 2006 at 12:36 pm
maybe use a cursor to concat into a varchar() variable
February 24, 2006 at 10:19 am
sorry dude...I was in a bit of a hurry yesterday, so I wasn't able to get all my thoughts clear or do any testing. I try to understand code...
February 24, 2006 at 9:44 am
--Your IsNull is in the wrong spot
CREATE FUNCTION dbo.CurrentRevisionNo
(
@DocumentID int
)
RETURNS int
AS
BEGIN
RETURN
(
SELECT ISNULL(MAX(RevNo),0) AS CurrentRev
FROM dbo.tblRevision
WHERE (DocumentID = @DocumentID)
)
END
GO
SELECT
DocumentID,
dbo.CurrentRevisionNo(DocumentID) CurrentRevNo,
dbo.CurrentRevisionNo(DocumentID) + 1 AS NextRevNo
FROM tblDocuments
February 22, 2006 at 1:44 pm
good information to know, Michelle. thank you.
February 22, 2006 at 10:39 am
24/4 = 6
0:00-5:59 = period 1
6:00-11:59 = period 2
etc.
try on your cursor loop...
10:58 <--gets flag
12:01 <-- min in time group, but no flag
17:58 <--should get flag but doesn't
February 22, 2006 at 8:22 am
If I wrote the application and created a view called "customers", and then you came in and you were trying to learn the system.... You would think Customers was...
February 21, 2006 at 1:26 pm
it matters when you're in a team environment. are you selecting from a view or from a table?
February 21, 2006 at 10:10 am
step 1: create a mirror table with NO key.
step 2: insert distinct records into new table
INSERT INTO t2
SELECT DISTINCT key1, f2, f3
FROM t1
step 3: query to find dupes/repeats with...
February 21, 2006 at 9:32 am
I have 2 ways I do this...
WHERE ISNULL(@EmployeeID, tbl.EmployeeID) = tbl.EmployeeID
--using null is cleaner in SQL, but a pain to extract from the drop down.
WHERE CASE @EmployeeID
WHEN...
February 21, 2006 at 7:48 am
Sorry Jesper...I didn't notice the Left Join in your Sub Query. I think that does the same thing in a loop that I did in my first post (which...
February 21, 2006 at 7:31 am
I agree with Fred. If you want an approximation, there's a few quick fixes. I just figure, if you're going to do it only one time, then do...
February 20, 2006 at 8:57 pm
hey Jeff...
Is Customer a view or table?
February 20, 2006 at 1:25 pm
This is what DTS is good for. You can use a vb script on a datapump for that particular column.
February 20, 2006 at 10:59 am
Viewing 15 posts - 136 through 150 (of 182 total)