Sql server function not allow to use NEWID() function.
Solution:
-> Create view in same database from following query:
CREATE VIEW [dbo].[GetNewID] AS SELECT NEWID() AS new_id
Now you can use SELECT new_id FROM [dbo].[GetNewID] instead of NEWID() in your query in sql server function.
Solution:
-> Create view in same database from following query:
CREATE VIEW [dbo].[GetNewID] AS SELECT NEWID() AS new_id
Now you can use SELECT new_id FROM [dbo].[GetNewID] instead of NEWID() in your query in sql server function.
0 comments:
Post a Comment