In SQL Server 2000 first you must create a function SSum (string sum):
CREATE FUNCTION SSum (@id AS INT)
RETURNS VARCHAR(255) AS
BEGIN
DECLARE @text AS VARCHAR(255)
DECLARE @rez AS VARCHAR(255)
DECLARE crs CURSOR
FOR SELECT TaskName FROM ... WHERE StockID = @id
OPEN crs
FETCH NEXT FROM...
Hi
MS Access 2000 (not 97) has a new project type : *.adp Access data project which permits to connect directly to a SQL Server. You may manage tables, views, stored procedures (stored in a SQL Server database) from this type of project and you may create also forms, report, modules, macros...
You may use "CASE WHEN ... ".
For example if you have a table
Product( ID , Name , Stock )
where id = primary key
SELECT ID, Name , Stock , Info = CASE
WHEN Stock >= 1000 THEN 'OK'
ELSE 'not ok'
FROM Product (SQL Server version)
is equivalent with
SELECT ID, Name...
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.