Viewing 15 posts - 1,591 through 1,605 (of 3,544 total)
Only if there is a unique key which you can use as part of the select to get greater than the value in the last row retrieved. I don't think...
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2007 at 3:00 am
As far as I can tell the insert will always take place as @RetCode is never set to zero because you
declare @InvoiceCheck and @InvoiceDetailCheck but do not set their values...
Far away is close at hand in the images of elsewhere.
Anon.
April 20, 2007 at 2:52 am
Don't know about slick but
SELECT MyGroup,MIN(MyMonth) AS [MyMonth]
FROM (SELECT a.MyGroup,a.MyMonth,SUM(b.MyUnits) As [MyUnits]
FROM #MyHistory a
INNER JOIN #MyHistory b
ON b.MyGroup = a.MyGroup
AND b.MyMonth >= a.MyMonth AND...
Far away is close at hand in the images of elsewhere.
Anon.
April 19, 2007 at 7:42 am
What is the delimiter for the csv file (hard to tell from the post)
The data you posted is formatted as 6 char columns (although one maybe date) before the numbers,...
Far away is close at hand in the images of elsewhere.
Anon.
April 19, 2007 at 7:21 am
Unless there is more complex validation, I would not use regx, I would
create errormicrtable to contain invalid data
create micrtable containing valid MICR codes
and use the following to validate and test...
Far away is close at hand in the images of elsewhere.
Anon.
April 19, 2007 at 7:09 am
The update statement I posted will retrieve the latest value (@before), update the value (+1) and retrieve the new value (@after) in one go.
I presume you want the current value...
Far away is close at hand in the images of elsewhere.
Anon.
April 18, 2007 at 7:20 am
What is the purpose of ldoclock, is it to stop other processes updating the record
What do the values 0 and 1 for ldoclock indicate
How many rows are there in wdoctyp...
Far away is close at hand in the images of elsewhere.
Anon.
April 18, 2007 at 7:02 am
Avoid the use of double quotes and use single quotes
select 'exec sp_dropuser ' + '''' + [name] + '''' from sysusers where sid > 0x01 and (isntuser = 1 or...
Far away is close at hand in the images of elsewhere.
Anon.
April 18, 2007 at 6:46 am
It works for me ![]()
Are you sure you are creating and using the two temp tables and inserting your current data into them...
Far away is close at hand in the images of elsewhere.
Anon.
April 17, 2007 at 8:32 am
DECLARE @TableA TABLE (rowid int IDENTITY(1,1),portid ...)
INSERT INTO @TableA (portid,acid,adDate,adTime,adPort,adType)
SELECT portid,acid,adDate,adTime,adPort,adType FROM [TableA] ORDER BY portid ASC
DECLARE @TableB TABLE (rowid int IDENTITY(1,1),portid ...
INSERT INTO @TableB (portid,acid,adDate,adTime,adPort,adType)...
Far away is close at hand in the images of elsewhere.
Anon.
April 17, 2007 at 7:26 am
Yes, lookup sp_executesql in BOL
Your example would like like this
DECLARE @count int
EXEC sp_executesql N'SELECT @count = count(*) FROM mytable', N'@count int output', @count OUTPUT
SELECT @count
Although you do...
Far away is close at hand in the images of elsewhere.
Anon.
April 16, 2007 at 7:19 am
| I'm confused when you say Charindex can't be used on this datatype |
Because CHARINDEX only works with short 'character...
Far away is close at hand in the images of elsewhere.
Anon.
April 13, 2007 at 10:19 am
Add a timestamp column to the table
and use
SELECT TOP 1 * FROM ORDER BY [timestampcolumn] DESC
to find the last row inserted or updated
Far away is close at hand in the images of elsewhere.
Anon.
April 13, 2007 at 10:08 am
One way
SELECT COUNT(*)
FROM a
INNER JOIN [Number] n
ON SUBSTRING(a.[ntextcolumn],n.N,3) = N'xyz'
AND n.N < (DATALENGTH(a.x) / 2)
providing number table contains numbers upto max len of column
not...
Far away is close at hand in the images of elsewhere.
Anon.
April 13, 2007 at 9:58 am
You could try this
SELECT pid,part,dos,MAX(post) AS [post],DATEDIFF(day,dos,MAX(post)) AS [lag],SUM(volume),SUM(charges)
FROM
GROUP BY pid,dos,part
HAVING SUM(charges) <> 0
It will give you the greatest lag for pid,part,dos and since you...
Far away is close at hand in the images of elsewhere.
Anon.
April 13, 2007 at 7:17 am
Viewing 15 posts - 1,591 through 1,605 (of 3,544 total)