Support for SQL Variables [IMP !!]

465 views
Skip to first unread message

SHIVAM MAHARSHI

unread,
Dec 23, 2013, 12:34:19 PM12/23/13
to h2-da...@googlegroups.com
Hi,

I am evaluating some in-memory databases. I need to know wether H2Database supports SQL variables? 

Statements like: "DECLARE @clientAppInstId VARCHAR(50)"

My Query works in the SQL database and I need a InMemory database for test cases purpose which can run this query given below:

DECLARE @clientAppInstId VARCHAR(50)
SET @clientAppInstId = (SELECT ClientAppInstanceId FROM core_securityToken WHERE TokenId = '1234')
IF(@clientAppInstId is null)
SELECT cst.UserId
FROM 
dbo.core_SecurityToken cst (NOLOCK)
ELSE
SELECT
cst.Uri
FROM
dbo.core_SecurityToken cst (NOLOCK)

This query will require the support of SQL Variables and IF/ELSE keywords.

Need to know is this supported in H2Database on an urgent basis? I am in the middle of a sprint. Quick answer will be highly appreciated.

Best,

Shivam

Atul Chowdhury

unread,
Dec 23, 2013, 1:58:46 PM12/23/13
to h2-da...@googlegroups.com
Hi -
 
Who knows?  You'd have to try on your own to really know for sure.
 
H2's concept of procedural language SQL manifests itself through UDF and pluggable Table Engines - both extremely powerful and infinitely configurable.
 
You can start here.
 
 
Let us know how it goes - we're very curious to know if H2 satisfies your test case (and more importantly, if you were able to meet your "urgent" deadline).

 

--
You received this message because you are subscribed to the Google Groups "H2 Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email to h2-database...@googlegroups.com.
To post to this group, send email to h2-da...@googlegroups.com.
Visit this group at http://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/groups/opt_out.

Rami Ojares

unread,
Dec 23, 2013, 2:03:34 PM12/23/13
to h2-da...@googlegroups.com
>
I am in the middle of a sprint.

That's cool. I have heard of walking mats combined with computer desks so one can walk while coding (instead of sitting).
But I never would have guessed that some people sprint while coding. That's wicked!

- Rami

Thomas Mueller

unread,
Dec 24, 2013, 3:34:54 AM12/24/13
to H2 Google Group
Hi,

H2 is not 100% compatible with Microsoft SQL Server. It is not 100% compatible with any other database either. It does support those features that are documented.

Regards,
Thomas



--
Reply all
Reply to author
Forward
0 new messages