I have to FTS 50+columns across 3 joined tables. The search returns the appropriate result-set, however I need to know which columns contained the search criteria. So while my Select will have 50+ columns I need to idntify which casused them to be returns. We're using Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05 Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 3) Here is the (large) T-SQL statement Thanks inadvance Chuck SELECT AssetID, AssignedRC, LocBldg, LocFloor, LocOther, TrackingNum, CityAssetTagNum, MassPlantIDNum, SerialNum, VendorPartNum, Comments, RMANum, RMAReason, RetireReason, PreviousAssetID, MaintVendor, ServAgreeNum, NetName, PrintServer, ORI, VTAM1, VTAM2, SMART_Asset.Memory, SMART_Asset.MemoryUnits, SMART_Asset.Storage, SMART_Asset.StorageUnits, SMART_Asset.OS, DomainName, AKA, BusinessImpact, NonCatItemDesc, SMART_Asset.EnterBy, SMART_Asset.UpdateBy, SMART_OrderCatalog.CatalogID, AssetType, AssetSubType, Owner, Description, ExtendDesc, Model, Version, ManPartNum, SMART_OrderCatalog.Memory as OrderCatalog_Memory, SMART_OrderCatalog.MemoryUnits as OrderCatalog_MemoryUnits, SMART_OrderCatalog.Storage as OrderCatalog_Storage, SMART_OrderCatalog.StorageUnits as OrderCatalog_StorageUnits, SMART_OrderCatalog.OS as OrderCatalog_OS, WarrantyDuration, User_ID, Legal_Name, Employee_ID, Preferred_Name, Department_Name, Division_Name, Location_Name, Bus_Address, Bus_Phone, SMART_Asset.ReceivedDate, SMART_Asset.GrantExpDate, SMART_Asset.RetireDate, SMART_Asset.WarrExpDate, SMART_Asset.EnterDate, SMART_Asset.UpdateDate, SMART_Asset.LastAuditDate FROM dbo.SMART_Asset LEFT JOIN dbo.SMART_OrderCatalog ON dbo.SMART_Asset.CatalogID = dbo.SMART_OrderCatalog.CatalogID LEFT JOIN dbo.City_Workers ON dbo.SMART_Asset.AssignedEmplID = COALESCE (dbo.City_Workers.Employee_ID , dbo.City_Workers.Employee_ID) WHERE CONTAINS (dbo.SMART_Asset.*, @Var1) OR CONTAINS (dbo.SMART_OrderCatalog.*, @Var1) OR CONTAINS (dbo.City_Workers.*, @Var1) OR CAST(AssetID AS VARCHAR(50)) = @Var1
Thanks for your promt reply Not the answer I wanted thought, I suppose I could always fill a cursor with the results and then evaluate each row in the cursor column by column Regards
this function is not exposed in SQL FTS. [quoted text, click to view] "ChuckCraig" <chuckcraig1@yahoo.com> wrote in message news:1F5E7802-9A02-4393-8E6A-31DB44453801@microsoft.com... > I have to FTS 50+columns across 3 joined tables. The search returns the
appropriate result-set, however I need to know which columns contained the search criteria. So while my Select will have 50+ columns I need to idntify which casused them to be returns. [quoted text, click to view] > > We're using > > Microsoft SQL Server 2000 - 8.00.760 (Intel X86) Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 3) [quoted text, click to view] > > Here is the (large) T-SQL statement > > Thanks inadvance > Chuck > > SELECT AssetID, > AssignedRC, > LocBldg, > LocFloor, > LocOther, > TrackingNum, > CityAssetTagNum, > MassPlantIDNum, > SerialNum, > VendorPartNum, > Comments, > RMANum, > RMAReason, > RetireReason, > PreviousAssetID, > MaintVendor, > ServAgreeNum, > NetName, > PrintServer, > ORI, > VTAM1, > VTAM2, > SMART_Asset.Memory, > SMART_Asset.MemoryUnits, > SMART_Asset.Storage, > SMART_Asset.StorageUnits, > SMART_Asset.OS, > DomainName, > AKA, > BusinessImpact, > NonCatItemDesc, > SMART_Asset.EnterBy, > SMART_Asset.UpdateBy, > SMART_OrderCatalog.CatalogID, > AssetType, > AssetSubType, > Owner, > Description, > ExtendDesc, > Model, > Version, > ManPartNum, > SMART_OrderCatalog.Memory as OrderCatalog_Memory, > SMART_OrderCatalog.MemoryUnits as OrderCatalog_MemoryUnits, > SMART_OrderCatalog.Storage as OrderCatalog_Storage, > SMART_OrderCatalog.StorageUnits as OrderCatalog_StorageUnits, > SMART_OrderCatalog.OS as OrderCatalog_OS, > WarrantyDuration, > User_ID, > Legal_Name, > Employee_ID, > Preferred_Name, > Department_Name, > Division_Name, > Location_Name, > Bus_Address, > Bus_Phone, > SMART_Asset.ReceivedDate, > SMART_Asset.GrantExpDate, > SMART_Asset.RetireDate, > SMART_Asset.WarrExpDate, > SMART_Asset.EnterDate, > SMART_Asset.UpdateDate, > SMART_Asset.LastAuditDate > FROM dbo.SMART_Asset > LEFT JOIN dbo.SMART_OrderCatalog > ON dbo.SMART_Asset.CatalogID = dbo.SMART_OrderCatalog.CatalogID > LEFT JOIN dbo.City_Workers > ON dbo.SMART_Asset.AssignedEmplID = COALESCE (dbo.City_Workers.Employee_ID , > dbo.City_Workers.Employee_ID) > WHERE CONTAINS (dbo.SMART_Asset.*, @Var1) > OR CONTAINS (dbo.SMART_OrderCatalog.*, @Var1) > OR CONTAINS (dbo.City_Workers.*, @Var1) > OR CAST(AssetID AS VARCHAR(50)) = @Var1 > >
Don't see what you're looking for? Try a search.
|