Actually i need to use the following lines of TSQL queries to know the total date formats available in sql server. So i used the Variable called @count.
declare @count int=0;
While @count<500 begin
select convert(varchar,GETDATE(),@count)
set @count+=1;
End;
When i start execute this query. It is iterating from '0' to '14' and stop for 15. Because 15 is not the supported style in sql server. Though it is supported for 121, 130 and other numbers, I want to run the code upto 500 numbers.(Leaving the Non supported values) Can anyone tell me a suggestion to run this query an error Free One.
Thanks inadvance :-)