How to make a "decimal"-field to an "integer"-field

How to make a "decimal"-field to an "integer"-field

Post by mads » Wed, 21 Mar 2001 21:17:11



Hello
It is probably very easy, but I can't figure it out:
A field in a table on my MSSQL-server is at decimal-field, but in a view I
would like to use the field as an integer-field. I have tryed the SQL-code:

SELECT Int([Tabel1]![Felt2]) AS Udtryk1
FROM Tabel1;

but it dosn't work ! How do I do that ?

Thanks, Mads.

 
 
 

How to make a "decimal"-field to an "integer"-field

Post by Andrew J. Kell » Wed, 21 Mar 2001 22:10:45


How about :

SELECT CAST([Tabel1]..[Felt2]) AS INT) AS Udtryk1
 FROM Tabel1

--
Andrew J. Kelly
Targitmail.com


Quote:> Hello
> It is probably very easy, but I can't figure it out:
> A field in a table on my MSSQL-server is at decimal-field, but in a view I
> would like to use the field as an integer-field. I have tryed the
SQL-code:

> SELECT Int([Tabel1]![Felt2]) AS Udtryk1
> FROM Tabel1;

> but it dosn't work ! How do I do that ?

> Thanks, Mads.


 
 
 

1. aReport."Field".SetFilter("this")?

Well, it seems that everything else work like aReport."Field".Position =
Point(0, 0), etc. but I cannot set the filter on a field in an open
report.  I have also tried SetRange().  I have to do everything through
queries right now, and filtering is MUCH MUCH easier!  Is there a way to
do this?

Thanks...
                                                Mike

--
 ------------------------------------------------------------------------------

            "I just got paid today, got me a pocket full of change"

   <A HREF="ftp://ftp.netcom.com/pub/cm/cman/index.html">Mike's Home Page</A>
         Links to FAQs; cool commercial, graphics and music pages, etc.

2. What does "@@" mean, as oppossed to "@"

3. max of ("...","...","..")

4. MoveComplete

5. Update integer field with "Null" value

6. onbar and log. Logs

7. dr("field").toString returns "400.0000" instead of "400"

8. Comparing table data between servers?

9. ODBC, Serial Fields (aka "Counter Fields"), and Insert

10. "."and ","

11. The ""string""