Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am loading a SQL table that has no keys. It is not a problem in itself, but I would like to add a key field on load time (something simple, like an autonumeric field):
TableWithNoKeys:
LOAD MyAutomericFieldThatIdentifiesTheLoadedRecord,
field1, field2, ..., fieldN;
SQL SELECT *
FROM "Database".dbo."TableWithNoKeys";
Can I create such a field? Many thanks in advance.
Hello, Salto
You could use RowNo() function for create incremental index for each row.
Like as:
LOAD Field1, Filed2, RowNo() as KeyLineNum
;
SQL SELECT,,,
See more details in reference manual or internal help system.
Hello, Salto
You could use RowNo() function for create incremental index for each row.
Like as:
LOAD Field1, Filed2, RowNo() as KeyLineNum
;
SQL SELECT,,,
See more details in reference manual or internal help system.
Perfect! Thank you.