0

T-SQL is nice. But I need a more flexible scripting language in Sql Server like javascript.

Can anyone help?

Rob
  • 45,296
  • 24
  • 122
  • 150
ehsan
  • 787
  • 3
  • 13
  • 26

2 Answers2

7

You can try looking at CLR in SQL Server.

You can use any .NET language and import assemblies to SQL server, using the public functions in those assemblies.

You may even have success with this using javascript that compiles to CLR (see this SO question on that subject).

Community
  • 1
  • 1
Oded
  • 489,969
  • 99
  • 883
  • 1,009
  • hi thanks for answers. i know about clr. but i want something that do not need compilation. – ehsan Jul 31 '10 at 06:44
  • 3
    @ehsan - The native language of SQL Server is SQL. Anything else will require compilation. It does not support javascript out of the box, and probably never will. – Oded Jul 31 '10 at 06:47
0

You could make a thin wrapper for IronJS to expose that functionality to Sql Server. Should be easy to do, but you would be coding in Sql strings, and it would probably become a mess.

EDIT: I was thinking of doing this for fun, that's how I found your question. Here's what I've been doing for the last hour: JSql

Robert Jeppesen
  • 7,837
  • 3
  • 35
  • 50