Forum Discussion
RAND() function not working in Fabric warehouse
Hello
I have a requirement to auto generate the numbers between two integers like 10 and 100. when i searched in bing for warehouse it is saying that RAND() function should work but when i actually tried its not working giving the below error.
did anyone faced it help me in resolving this issue. Thanks in advance.
SELECT RAND()*(10-5)+5;
- Anonymous2 years ago
Hi, Anonymous
Not all T-SQL function are support in Fabric Warehouse, you can try this code.SELECT ABS(CHECKSUM(NEWID())) % (100 - 10 + 1) + 10T-SQL statements in dedicate SQL pool - Azure Synapse Analytics | Microsoft Learn
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
2 Replies
- AnonymousNot applicable
Hi, Anonymous
Not all T-SQL function are support in Fabric Warehouse, you can try this code.SELECT ABS(CHECKSUM(NEWID())) % (100 - 10 + 1) + 10T-SQL statements in dedicate SQL pool - Azure Synapse Analytics | Microsoft Learn
Best Regards,
Yang
Community Support TeamIf there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly.
If I misunderstand your needs or you still have problems on it, please feel free to let us know. Thanks a lot!How to get your questions answered quickly -- How to provide sample data in the Power BI Forum
- AnonymousNot applicable
Thank you so much Anonymous it worked.