Viewing 15 posts - 2,026 through 2,040 (of 3,544 total)
SELECT Employee, [DateTime], Status
FROM @table a
WHERE NOT EXISTS(SELECT * FROM @table b
WHERE b.Employee = a.Employee
AND b.[DateTime] = a.[DateTime]-1
AND b.Status = a.Status)
ORDER BY Employee, [DateTime]...
Far away is close at hand in the images of elsewhere.
Anon.
January 5, 2006 at 4:05 am
First insert_offset is zero based
Second your patindex will only find occurrance if the column ends with 123456789123456789
Try this
WHILE 1=1
BEGIN
SELECT @ptrval_s = TEXTPTR(Text_Column),
@patptr=PATINDEX('%123456789123456789%',Text_Column)-1
FROM #MyTable where...
Far away is close at hand in the images of elsewhere.
Anon.
January 4, 2006 at 7:22 am
It means the table has been altered in the diagram but the diagram has not been saved.
Far away is close at hand in the images of elsewhere.
Anon.
January 4, 2006 at 6:20 am
If the 'column' may or may not contain spaces then this should work
SET column = LEFT(REPLACE(column,' ',''),9)
When you state this would 'violate the primary key constraint' then any modification of...
Far away is close at hand in the images of elsewhere.
Anon.
January 4, 2006 at 2:13 am
OK if we're playing at guessing the query ![]()
I got out my ouija board and got this ![]()
Far away is close at hand in the images of elsewhere.
Anon.
December 22, 2005 at 3:10 am
Not sure what you are asking for but
WHERE trandate < @ENDDATE
seems right as long as @ENDDATE is set correctly
So, today is Thursday 22 Dec, midnight tonight would be
'2005-12-23 00:00:00.000'
Therefore this...
Far away is close at hand in the images of elsewhere.
Anon.
December 22, 2005 at 2:56 am
| I enjoyed the "urn" joke! |
and what's a "grecian" "urn"
a damn sight more than me ![]()
Far away is close at hand in the images of elsewhere.
Anon.
December 16, 2005 at 7:42 am
As stated in the link you will not be able to replace your temp table with a table variable and even if you could I doubt there would be any...
Far away is close at hand in the images of elsewhere.
Anon.
December 16, 2005 at 7:15 am
Yep, if you put a valid path to a filename in the 'Output File' field then all the output of the DTSrun will be in that file including any errors....
Far away is close at hand in the images of elsewhere.
Anon.
December 16, 2005 at 2:28 am
Don't need to use a cursor
CREATE FUNCTION fn_GetDays(@Secs As int)
RETURNS varchar(36) AS
BEGIN
DECLARE @GetDays varchar(36)
-- Get the Days, Hours, Minutes, Seconds returned with input in Seconds
--...
Far away is close at hand in the images of elsewhere.
Anon.
December 14, 2005 at 8:42 am
I think this is what you mean
UPDATE h
SET h.codsuc = 'AT'
FROM ventven h
INNER JOIN (SELECT l.nofact
FROM vligven l
WHERE l.codart IN ('TOT PPO01Z', 'TOT PPO000Z')
GROUP...
Far away is close at hand in the images of elsewhere.
Anon.
December 14, 2005 at 7:45 am
Also remember that non fatal errors will not stop/abort a proc unless you set XACT_ABORT otherwise you will have to trap non fatal errors after each statement.
Far away is close at hand in the images of elsewhere.
Anon.
December 14, 2005 at 7:05 am
Viewing 15 posts - 2,026 through 2,040 (of 3,544 total)