help with interesting 'query'
Date: 1998/08/17
Message-ID: <MPG.1041f693d2d4a9fc9896a6_at_news.idt.net>#1/1
hi
i need the 'groups' help with a query. hopefully someone will be
able to help. i have two tables ...
create table foo
create table fooExtended
one is obviously a copy of the other. the contents of foo will be
overriden on a daily basis - we purchase our data from an outside
provider. however, we extend the data by changing the value of some
(
id varchar (10)
f1 varchar (5)
f2 int
f3 varchar (5)
f4 int
f5 varchar (5)
f6 int
f7 varchar (5)
f8 int
)
(
id varchar (10)
f1 varchar (5)
f2 int
f3 varchar (5)
f4 int
f5 varchar (5)
f6 int
f7 varchar (5)
f8 int
)
i realize that one way of solving this is to make fooExtended a complete copy of foo when and if we extend any of its values - but that is expensive in terms of storage. i'm hoping to use a more efficient/elegant solution.
here's another question....
is it possible to programmatically supply a table name, the fields and predicates used in a query ? for instance
exec doQuery 'employee', 'emp_id, fname, lname', 'where fname like a%'
doQuery is a stored procedure that programmatically 'builds' a query. the above will result in the following query being built
select emp_id, fname, lname
from employee
where fname like 'a%'
for what its worth i'm using ms-sql server 6.5.
any help would be greatly appreciated.
thanks
dave
Received on Mon Aug 17 1998 - 00:00:00 CEST