Hi does anyone know of a way around linking a db2 table with lots of indexes. I have a particular table that wont link and the error I get says it cannot link because the table has too many indexes
Thanks
Andy
Then its a little more complicated
SELECT DISTINCT (SELECT Max(tablename.price) AS MaxOfprice
FROM tablename
WHERE tablename.qty<=[quantity])*[quantity] AS EstCost
FROM tablename;
I am trying to create a fleixble (table driven) aggregation query and would appreciate your assistance. I have a table fo revenue values which I need to be able to simply group and change the groupings (without having to change the underlying SQL) any ideas?
e.g
I have a table contaning...
We created a system using sql asp and crystal reports. It does all you are after. You will need to purchase the crystal reports server software which is quite expensive to serve reports (in pdf format) to users but whole thing works very well
Hope this helps
Andy
need to build up the sql then execute it in asp code or create a stored procedure in sql server and execute that passing it the string of characters ntered by the usere.g.
CREATE procedure ET_SP_ClientList
@client varchar(50) ='%'--default value, returns all
as
select ClientName
from...
I found GingerRs post very helpful
I added the code environ("Username")to the default value in my table, saves coding all relevent forms etc.
Andy
you need to join the tables and create an unmatched query
something like
insert into #tblAdd
( ItemNum,
totQty,
ManagerNum,
BasePrice)
select F.ItemNum,
F.totQty,
F.ManagerNum,
F.BasePrice
from #tblFin F
left outer join #tblAdd A on
f.itemNum = A.itemnum
where...
triggers are created on tables what you might actually need is a stored procedure which will allow you to update data in tables
What are you trying to update?
Andy
Have you looked at the indexes on the underlying tables?
otherwise you might want to try and write the same query in a different way e.g. using joins rather than sub queries or vice versa
Andy
You can use DTS (Data Transfromation Services)from Enterprise Manager. I think this should create you a sample script which you can then reuse or adapt as necessary
Andy
Another way would be to create a table based on your current table (design only) and then insert the value in the text field(dept name), all numerical fields whould then be based on the default which you could set to 0
HTH
Andy
The main difference between enterpise manager (EM) and query analyzer (QA) is that EM presents you with a more user-friendly interface. As you are probably aware it is simple to add tables, define joins, select fields to return, add criteria(very similar to the Query by example grid available...
as long as you have suitable access and they are on the same server you can simply reference tables from one database to another
e.g.
select yourfield from database.owner.table
Andy
Try somehting like the following (sorry not syntax checked)
Andy
create trigger update_status_trigger on hire
for UPDATE
as
DECLARE @count_inserted int
DECLARE @count_deleted int
SELECT @count_deleted = Count(*) FROM deleted
SELECT @count_inserted = Count(*) from inserted
IF...
The basic construction you need is
--
select yourfield from (select yourfield from yourtable) view1
--
i.e. the sql in parentheses is one of your current views and aliased as view1. I'm sure It will get very confusing joining them all together but I think it is possible
Andy
Have not tried it but when you declare your recordset cant you define the sql as something like
SELECT Yourfield1, "" AS NewField
FROM yourtable
then you can use the field 'newfield' to hold data in
Andy
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.