I'm trying to create an index on a table variable, is this possible?
DECLARE @RDTABLE TABLE (TLCDE VARCHAR(12), TLTYP VARCHAR(2), TLEFFDAT DATETIME, TLRATFCT DECIMAL(29,6))
INSERT INTO
@RDTABLE
SELECT
TLCDE
, TLTYP
, TLEFFDAT
, TLRATFCT
FROM
BT_TR
WHERE
TLTYP = 'TX'
Normally I would create the index like so:
CREATE NONCLUSTERED INDEX IX_RDTABLE ON RDTABLE ([TLTYP],[TLEFFDAT])
INCLUDE ([TLCDE],[TLRATFCT])