If it is MSSQL2000, I have created some list functions (I've mentioned them
on cf-talk before). One of them takes a list and returns a table with 2
columns the item position in the list and the value of that item.
If you are interested, I can send them to you.
The functions I created are:
1) listAppend
2) listDeleteAt
3) listFirst
4) listGetAt
5) listInsertAt
6) listLast
7) listLen
8) listPrepend
9) listSetAt
10) listToTable
I would post them to the internet, but I don't have an ftp server at the
moment. I will work on that this weekend.
Steve
-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: Friday, September 26, 2003 10:06 AM
To: CF-Talk
Subject: RE: OT : SQL List Comparison
Managed it via this SQL :
declare @List1 varchar(255),
@List2 varchar(255),
@sql varchar(255)
set @List1 = '1,2,34,12,43,21,5,9,10'
set @List2 = '34,12,43,21,23,35,19,5,10'
create table #List1 (item varchar(10))
create table #List2 (item varchar(10))
select @sql = 'insert #List1 select ' + replace(@List1,',', ' union select
')
exec (@sql)
select @sql = 'insert #List2 select ' + replace(@List2,',', ' union select
')
exec (@sql)
select 'Removed', * from #List1 where item not in (select item from #List2)
select 'Added', * from #List2 where item not in (select item from #List1)
drop table #List1
drop table #List2
-----Original Message-----
From: A.Little [mailto:[EMAIL PROTECTED]
Sent: 26 September 2003 14:49
To: CF-Talk
Subject: RE: OT : SQL List Comparison
If you need to track what's been inserted/deleted, then! you could (before
you do any db inserts/deletes) loop through the old list and find which
values aren;t in the new list - to find whats been deleted, then loop though
the new list and find which values aren;t in the old list to find what's
been inserted. Then at least you'll have the history - still need to be CF
though!
Alex
-----Original Message-----
From: Robertson-Ravo, Neil (RX)
[mailto:[EMAIL PROTECTED]
Sent: 26 September 2003 14:40
To: CF-Talk
Subject: RE: OT : SQL List Comparison
Yep, I think I will have to do things in CF, though unfortunately for
logging purposes I need to know a little more about what they have
selected/removed before the deletion / insertion occurs.
_____
[ Todays Threads
_____
[ Todays Threads
[Todays Threads] [This Message] [Subscription] [Fast Unsubscribe] [User Settings]