Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 tempt Table to hit front-end application

Author  Topic 

osupratt
Posting Yak Master

238 Posts

Posted - 2010-07-14 : 10:28:00
Not sure I have the right forum group, but here goes. I'm having a heck of a time trying to run an Update script from my front-end application (MS Access). Anyhow, after struggling for a bit I found that if I create a table on my back-end Sql Server 2005 that the info that I want can be edited. The issue involved having a GROUP BY or using a DISTINCT on the front-end when pulling a query.

My question is that I have created a table using this script:


CREATE TABLE MSAccessSO(
Misc_Text_Field1 [nvarchar] (10) NULL,
MiscCode [nvarchar] (55) NOT NULL,
TaxSchedule [nvarchar] (25) NOT NULL,
TaxClass [nvarchar] (5) NOT NULL,
TaxRate [numeric](17,6) NOT NULL
)

INSERT INTO MSAccessSO
(Misc_Text_Field1,MiscCode,TaxSchedule,TaxClass,TaxRate)

SELECT
Misc_Text_Field1, MiscCode, MAX(TaxSchedule)TaxSchedule,
MAX(TaxClass)TaxClass, MAX(TaxRate)TaxRate
FROM dbo.MercerDailyWorkTicketInv
WHERE Misc_Text_Field1 IS NOT NULL
GROUP BY Misc_Text_Field1, MiscCode
ORDER BY Misc_Text_Field1, MiscCode

SELECT
Misc_Text_Field1 AS SONumber, MiscCode,TaxSchedule,
TaxClass, TaxRate

FROM MSAccessSO
------------------------------------------------------------

Is there a way to keep this table updated on a timely basis (every minute or so)? As you can see I'm grouping the information before it goes into the table; so once in the table I can edit it which means the end-users can edit this on the front-end. Thanks for any help.

   

- Advertisement -