Using Sql 'In' Operator within .NET 2.0 DataTable Filter expression - .net-2.0

Does the .NET 2.0 Framework DataTable filterexperssion property support the SQL "IN" operator? If you have a solution to this please provide example code. Thank you.

The RowFilter property of a DataView doesn't support SQL in any way. Is this what you were referring to?

Related

SELECT ##VERSION in Progress OpenEdge?

I havent been able to find this in the docs so it may not exist - does openedge have a SELECT ##VERSION type of query to return the DB version?
Thanks!
You can get the version indirectly by querying _dbstatus._dbStatus-ShmVers
The mapping of _dbStatus-ShmVers to actual version numbers is described in this kbase: https://knowledgebase.progress.com/articles/Article/P39456
No, there is no such query that returns the OpenEdge database version. As an alternate, a User Defined Function (UDF) can be written to return the version information. This article describes the ways to get OpenEdge database version. You can use one of these approaches in the UDF to get the database version. UDF examples can be found here.

On laravel using builder query whereRaw ?&

I have problem using query whereraw on laravel 5.5 postgresql, for this case i want to select data by colors. Data example
Source postgresql documentation postgres. I'm success to try on execute sql like this success example execute query. But fail using laravel example source code. Error on laravel
The problem is that your statement contains a question mark. When using the whereRaw method, the question mark is an expected parameter, which aren't providing in your call.
However it seems that there isn't a real solution for this issue. I suggest you take a look at Question mark operator in query, it handles about a similar issue.

How to execute a raw sql query from LINQ to Entities 4.5?

Problem
I need to execute a raw SQL query from LINQ to Entities and retrieve the result. The query returns the current date/time from the SQL Server instance, and looks like this:
SELECT GETDATE()
[Edit]
I'm using a data model that was created database-first.
[/Edit]
What I've Tried
I've researched this issue on the interwebz and been unable to find a technique to do this. I was able to learn how to do this using LINQ to SQL, but since I'm not using that, it's of no help.
Heres what you are after
var time = context.Database.SqlQuery<DateTime>("SELECT GETDATE()").FirstOrDefault();
You can read more about raw sql and EF here http://msdn.microsoft.com/en-us/data/jj592907.aspx

Does Eclipselink support queries containing regular expression?

I've seen that DBMS like MySQL supports query containing regular expressions. Does Eclipselink support this?
I have to retrieve entities having some String attribute matching some regular expression as
SELECT X FROM Person X WHERE X.name <some keyword> (A-Z)*
MySQL uses REGEX or RLIKE for regular expression queries. JPQL does not support these operators, so you can use a native SQL query.
In EclipseLink you could define your own ExpressionOperator for these, and use it in an Expression query, but not currently with JPQL. JPQL does support calling database functions using FUNC, but these have different syntax than functions. You could extend the MySQLPlatform to make #like us REGEX or RLIKE.
Please log a bug for this on EclipseLink. Most databases now support regex, so this support should be available in JPQL.

Zend Order by Cast with mysql

I am using Zend Framework with a MySQL database.
Can zend select produce something like this ?
SELECT * FROM `abc` ORDER BY CAST( `something` AS SIGNED ), `other` ASC
at the moment i give raw sql query since don't know how to make zend use $select->order(..) and obtain that query...
I'm thinking maybe not all db support this so zend doesn't has it or why ?
U can use Zend_Db_Expr class instance and pass it to order method
There is no such keyword in zend. We cannot make casting at the time of fetching the data but we can make casting after the fetching the data.
A ZF2 2019 answer:
$select->order(new Expression("CAST($orderColumn AS CHAR) $orderDirection"));
Since new Zend_Db_Expr do not work anymore ("renamed")