Doubts of an Access developer (and SQL Server dummy)

  • Hi,

    I have a table (140000 records) and i must get info of different "types" and "subtypes":

    In MsAccess I do:

    Query_1= select * from MyTable where X=1111 and T=2222

    Query_2= select * from MyTable where Z=3333

    Query_3= select * from Query_1 where W=9999

    and so on...

    I would like to get the info doing something like:

    getInfo(Type:=1,SubType:=9)

    How is the more efficient way to do it?

    Create a view for every type/subtype and a parametrized sp that selects the view??

    Is faster create a view or embed the SQL in the sp??

  • I would create a stored proceure for this, to make the query efficent and as fast as possible, uou shoud create the appropriate indexes and not use select * unless you absolutley need the data from all the columns returned

Viewing 2 posts - 1 through 1 (of 1 total)

You must be logged in to reply to this topic. Login to reply