This blog consists of daily routine SQL hacks which are beneficial for versatile requirements:
To get ENUM-Values with its corresponding integer:
select t1.NAME,t2.ENUMID,t2.ENUMVALUE,t2.NAME EnumValueName from ENUMIDTABLE t1inner join ENUMVALUETABLE t2 on t1.ID=t2.ENUMID
where t1.NAME = 'VSD_SALESORDERWORKFLOWSTATUS'
To get ROW number for the records:
SELECT * FROM
(SELECT *, ROW_NUMBER() OVER (ORDER BY Recid) R FROM SALESORDERHEADERCDSSTAGING) As sq
WHERE R BETWEEN 72340 and 146995
Comments
Post a Comment