Data type conversion

Data type conversion

Post by Jan Pip » Sat, 04 Oct 2003 16:23:46



How to convert the interval type into integer, float or any "countable" data
type at the time of table creation using
select ... into?

Pips

 
 
 

Data type conversion

Post by Jeff Boe » Sun, 05 Oct 2003 01:20:59



> How to convert the interval type into integer, float or any "countable" data
> type at the time of table creation using
> select ... into?

I'm guessing you want something like this:

SELECT EXTRACT('EPOCH' FROM INTERVAL
     '1 days 4 hours 15 minutes 23 seconds');

--
Jeff Boes                                      vox 269.226.9550 ext 24
Database Engineer                                     fax 269.349.9076
Nexcerpt, Inc.                                 http://www.nexcerpt.com
            ...Nexcerpt... Extend your Expertise

 
 
 

Data type conversion

Post by Bruno Wolff I » Sun, 05 Oct 2003 04:44:53


On Fri, Oct 03, 2003 at 09:23:46 +0200,

Quote:> How to convert the interval type into integer, float or any "countable" data
> type at the time of table creation using
> select ... into?

You can use extract to do that. See the date/time function documentation.
Note that months get treated as 30 days when extracting periods less
than a month from an interval.

---------------------------(end of broadcast)---------------------------
TIP 7: don't forget to increase your free space map settings

 
 
 

1. Problem with Data type conversion?

I have a simple program to transfer string data types in a struct in
sequence from a server to a client.

I keep getting the error below when I compile the Server codes using vbjc. I
am using Visibroker for Java 3.4 and JDK 1.2.2-001. Substituting data types
like long for the IDL and int for the java files works fine but not the one
below.

Any help will be much appreciated.

Kelvin

.\StructArrayInterfaceImpl.java:17: The method Struct GSA()[] declared in
class StructArrayInterfaceImpl cannot override the method of the same
signature declared in class DB._StructArrayInterfaceImplBase.  They must
have the same return type.
  public Struct[] GSA()
                     ^
1 error

/* From DB.idl
struct {
    string sTitle;
    string sAuthor;
    ....
   };

  typedef sequence<Struct>StructArray;

  interface StructArrayInterface
    StructArray GSA();
  };

/* From StructArrayInterfaceImpl.java
public class StructArrayInterfaceImpl extends
DB._StructArrayInterfaceImplBase {
  public StructArrayInterfaceImpl(String name)

    super(name);
  }

  public Struct[] GSA()

    .......
  return new Struct[]
  }

2. Boot from B:

3. Data Type conversion?

4. Advanced 36 with OS400

5. C data types and VO data types

6. Recalculation problem in Excel 5.0c with user-defined function - gtc.xls (1/1)

7. why does the SAS data set type change to Sound Designer file type

8. ANNOUNCEMENT: Amigactive Online

9. Re : why does the SAS data set type change to Sound Designer file type

10. Array Data Type return what type in JDBC?

11. Question on usage of data conversion functions in a Data Step ;

12. Question on usage of data conversion functions in a Data Step;

13. Data conversion for transmitting data between client/server