Icon View Thread

The following is the text of the current message along with any replies.
Messages 11 to 12 of 12 total
Thread Varchar to date
Thu, Nov 29 2012 2:53 PMPermanent Link

Raul

Team Elevate Team Elevate

Linda,

EDB is primarily a developer database to embed or ship with your
products (it has a royalty free distribution) and it's easily extensible
using functions so there might be less DBA specific functions that what
you're looking for (then again single install license of MS-SQL costs
more than EDB royalty free license).

Assuming date is in 'YYYY-MM-DD' varchar format the
"select cast( mydateasvarchar as DATE)" does work.

There is no TRUNCATE but instead use
EMPTY TABLE mytable

There is no TOP but you can use RANGE which is even more flexible e.g.:
SELECT * from mytable RANGE 1 TO 1000

Raul



On 11/29/2012 2:00 PM, Linda_web wrote:
>
> I agree with you, the column should be date instead of varchar, but this is old program, I’m sql server dba, also I found many functionalities are missing like TOP, Truncate table , or maybe named something else, so far just trying to see how long will take to convert all queries, sp and tables to this edb (Couple hundreds objects)
>
> I'm not comparing apple to apple, this is good db and wish the best for the company.
Mon, Dec 3 2012 10:22 PMPermanent Link

Fernando Dias

Team Elevate Team Elevate

Linda,

In fact, you do have a way to do what you want.
As of version 2.11 Build 2, it's possible to use CAST with a format specifier.
If MyDate is a VARCHAR column in the MyTable table, you can do this:

SELECT CAST(MyDate AS DATE DATE FORMAT 'mm/dd/yyyy') FROM MyTable

--
Fernando Dias
[Team Elevate]
« Previous PagePage 2 of 2
Jump to Page:  1 2
Image