Sql server 2000 data type

In sql server 2000, what data type do I use for a field that
needs to show two decimal places? It is a weight field, so the
weight in ounces could be something like 12.25 and it needs to
store it this way in the database. I'm kind of new to sql server,
so any help would be greatly appreciated!

You asked "In sql server 2000, what data type do I use for a
field that needs to show two decimal places?" and I answered
"decimal and numeric". How much clearer could I be?
Numeric data types with fixed precision and scale.
decimal[(p[, s])] and numeric[(p[, s])]
Fixed precision and scale numbers. When maximum precision is
used, valid values are from - 10^38 +1 through 10^38 - 1. The
SQL-92 synonyms for decimal are dec and dec(p, s).
p (precision)
Specifies the maximum total number of decimal digits that can
be stored, both to the left and to the right of the decimal point.
The precision must be a value from 1 through the maximum precision.
The maximum precision is 38.
s (scale)
Specifies the maximum number of decimal digits that can be
stored to the right of the decimal point. Scale must be a value
from 0 through p. The default scale is 0; therefore, 0 <= s
<= p. Maximum storage sizes vary, based on the precision.
I recommend that you load SQL Server Books Online on your
computer, as it is available free from Microsoft as a download and
it has everything you will probably need to know about SQL Server.
Or you could just use the online version at
SQL
Server 2000 Books Online
Phil

Similar Messages

  • MS SQL Server 2005 data types

    Hi,
    I have some code that executes a stored procedure in SQL Server 2005 database from Weblogic 8.1. There is a Spring framework layer in between. I am having problems passing a datetime parameter to the SP (ther server thinks it's a varchar). According to the BEA documentation here http://edocs.bea.com/wls/docs100/jdbc_drivers/mssqlserver.html#wp1088746, a datetime parameter should be passed as java.sql.Types.TIMESTAMP. I've tried TIMESTAMP, DATE, TIME, and none of them work. But, that documentation says it's only for SQL Server 2000. What about 2005? Does anyone know?
    Thanks in advance.

    We use SQL2005 & WebLogic 8.1, but we use the Microsoft JDBC driver form here
    and it all works fine with timestamps. We use this datatype to pass them down java.sql.Timestamp
    http://www.microsoft.com/downloads/details.aspx?familyid=C47053EB-3B64-4794-950D-81E1EC91C1BA&displaylang=en
    The MS driver has some enhancements specifically for SQL2005 for performance and handling the new data types. We've always been told to use the vendors driver in preference to the BEA supplied one - that came from BEA!
    Pete

  • Connect to MS SQL Server 2000 data warehouse

    Hi,
    I use a MS SQL Server 2000 database for my web application where I use JSP. I suppose to create data warehouse using MS SQL Server's Data Transformation Service. But I don't know it's possible to connect to a MS SQL Server's data warehouse using JSP. So I want to know is it possible to connect to data warehouse using JSP and if it is how to do it? Thank you.

    You can certainly connect to M$ SQL Server using the JDBC driver:
    http://www.microsoft.com/downloads/details.aspx?FamilyID=4f8f2f01-1ed7-4c4d-8f7b-3d47969e66ae&displaylang=en
    Connecting to a data warehouse is no different from any relational database. (My understanding is that a data warehouse usually means a star schema implemented in a relational database.) This will connect you.
    If you're not familiar with JDBC, you might need the tutorial:
    http://java.sun.com/docs/books/tutorial/jdbc/

  • Importing an SQL Server TEXT data type field in Oracle - problem with LONG

    Hello,
    I work in Oracle 9i and I created a view on a distant SQL Server database that contains a TEXT data type field. But I have a problem when I select that field in Oracle; I have the following error message: "ORA-00997: forbidden use of LONG data type".
    Could anybody have a solution for me, to solve that problem?
    Thanks a lot!

    It is very difficult to suggest anything without seeing your code.  I don't even know if what you are seeing is the actual value or an error code.  Often, negative numbers are indicative of error codes. 
    For instance -1 could mean that you have an invalid reference or path, etc...
    Can you post your code?

  • Convert MS SQL server image data type into oracle clob

    Hi all! I'm tryng to access to Microsoft SQL server with Oracle via ODBC. Oracle is not able to use the image data type of Microsoft SQL server. Do you know a way to convert this data type in an oracle format? The explicit casting converts image to long raw, but after the conversion Oracle is not able to manage these data type. Thank you very much!
    Stefano.

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • How to migrate SQL Server image data type to Oracle 8 BLOB data type?

    Hi,
    I have to migrate data from sql server to Oracle 10 g.
    I am unable to migrate image data type from sql server to blob data type in oracle.
    Iam using Oracle Heterogenous Services to migrate the data,Using Merge statement and database link.
    I am getting the following error-
    ERROR at line 7:
    ORA-00932: inconsistent datatypes: expected BLOB got LONG BINARY
    Can any one suggest me how to migrate Image datatype to BLOB???

    Hi you might want to post your question in General Forum.
    General Database Discussions
    There's very few users visit this forum.

  • Chinese character displaying as ???? in excel  while importing data from sql-server 2000

    Hi everyone,
    I am facing a problem while importing sql-server 2000 data in
    excelshhet .There is some chinese character in database table.
    After importing data in excel chinese character looks like
    ????????.In sql-server this chinese character looks like square
    field.
    I am using UTF-8 .
    This is last hope.
    vijay k singh
    Text

    I was having the same problem with the AIRSQL i couldn't find how to rencode my csv file...
    So i resave the csv in xls and then chose the utf-8 thingy and then just changed the extension back to csv.
    i was always wondering why i had an xls file in my source code, which was just left there from the previous reencoding, i guess
    hope it helps

  • SQL Server 2000 "Yukon" architecture

    Hi,
    could you tell me whether Microsoft have achieved cluster technology with "Yukon" or not?
    As announced in article: Database Architecture: Federated vs. Clustered-An Oracle White Paper March2002, "...According to Michael Otey, Senior Technical Editor, SQL Server Magazine:�Technically, this setup isn�t a true clustered implementation. According to Microsoft, SQL Server won�t support true clustering until the post-SQL Server 2000 release, code named Yukon.�(Yukon is not expected to be shipped until well into 2003.) - But when I browse msdn, there is nothing on the architecture itself.
    I am doing my Master's thesis on 9iRAC, and I need this information to complete my research. I found several Oracle white papers talking about federated vs. clustered architecture. As said in Response to "Reality behind Real
    Application Clusters Marketing Messages"- An Oracle White Paper March, 2003"..when in truth Microsoft does not have a cluster database." Is this still the truth? Can somebody from ORACLE provide me with tips/links to complete this topic?
    I am also Oracle DBA, Oracle customer, registered on Metalink.
    Thank you for the support.

    BOL 2014: "
    Data Types (Transact-SQL)
    SQL Server 2014 
    Data Type Categories
    Exact Numerics
     bigint
     numeric
     bit
     smallint
     decimal
     smallmoney
     int
     tinyint
     money 
    Approximate Numerics
     float
     real
    Date and Time
     date
     datetimeoffset
     datetime2
     smalldatetime
     datetime
     time
    Character Strings
     char
     varchar
     text
    Unicode Character Strings
     nchar
     nvarchar
     ntext 
    Binary Strings
     binary
     varbinary
     image
    Other Data Types
     cursor
     timestamp
     hierarchyid
     uniqueidentifier
     sql_variant
     xml
     table
     Spatial Types "
    LINK: http://msdn.microsoft.com/en-us/library/ms187752.aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • SQL Server 2000 - Valid Binary datatype and valid character datatype:

    SQL Server 2000 - Valid Binary datatype and valid character datatype:
    Which is not a valid binary datatype :
    BIT , IMAGE, TMESTAMP
    Which is not a valid Character datatype :
    VARTEXT , BLOB , TEXT

    BOL 2014: "
    Data Types (Transact-SQL)
    SQL Server 2014 
    Data Type Categories
    Exact Numerics
     bigint
     numeric
     bit
     smallint
     decimal
     smallmoney
     int
     tinyint
     money 
    Approximate Numerics
     float
     real
    Date and Time
     date
     datetimeoffset
     datetime2
     smalldatetime
     datetime
     time
    Character Strings
     char
     varchar
     text
    Unicode Character Strings
     nchar
     nvarchar
     ntext 
    Binary Strings
     binary
     varbinary
     image
    Other Data Types
     cursor
     timestamp
     hierarchyid
     uniqueidentifier
     sql_variant
     xml
     table
     Spatial Types "
    LINK: http://msdn.microsoft.com/en-us/library/ms187752.aspx
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • How to crete the source system for the SQL Server 2000 to BI 7.1

    Dear All,
    We want to extract data from  SQL server 2000 data base to BI 7.1
    Please provide us the step-by-step procedure to be followed in BI as well as SQL server 2000 BD
    Thanks & Regards,
    sarasu

    Hi,
    You have two options, you can use DB Connect but you need SAP DBSL for SQL Server 2000 and the DB Client and this could be have a additional cost, or you can use UD Connect, that make the connection with Java, using JCo's and the Driver Java for SQL Server 2000, please review this link: [http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58f4db47-0501-0010-a2bf-ff01b150fdff|http://www.sdn.sap.com/irj/sdn/go/portal/prtroot/docs/library/uuid/58f4db47-0501-0010-a2bf-ff01b150fdff]
    I recomend if you dont have the SAP DBSL and DB Client for SQL Server 2000 that use UD Connect is really useful.
    Regards

  • Tg4msql - Blob Data Type Support(Oracle 8i - sql server 2000)

    hi,
    We are trying to replicate the data from oracle 8i to sql server 2000 through tg4msql.if we want to replicate the data thet contains the blob field , we are getting invalid expression in the procedure marked with error line.
    the procedure i am using is as follows
    CREATE OR REPLACE PROCEDURE INSERT_SQL
    AS
    BEGIN
    FOR VAL_CURSOR IN
    --Get the Data from the table with status 0
    SELECT rs_report_rowid FROM BIJU.rs_report where rs_report_status = 0
    LOOP
    for new_cursor in
    --get the details of the record with the row id
    select id ,name,DOB from biju.sample where rowid = val_cursor.rs_report_rowid
    LOOP
    ---insert the data from oracle to sql where the oracle data type contains blob(here photo field data type is blob).
    Error Line: insert into [email protected](id,name,photo) values(new_cursor.id,new_cursor.NAME,new_cursor.DOB);
    END LOOP;
    END LOOP;
    COMMIT;
    END;
    i want to know that tg4msql won't support the blob data type on the oracle end?we configured blob eqivalent in sql server as binary.Any help or suggestion regarding this are welcome..
    regards
    Srini

    Srini,
    Support for LOB was added in v9.2. It is not supported in 8i.

  • How to retrieve Min(startDate) and Max(endDate) for different groups of data? (sql server 2000)

    My sample dataset (below) contains 3 groups -- 'a', 'b', 'c'.  I need to retrieve the Min(startDate) and Max(EndDate) for each group so that the output looks something like this (date format not an issue):
    fk   minStart       maxEnd
    a    1/13/1985    12/31/2003
    b    2/14/1986    12/31/2003
    c    4/26/1987    12/31/2002
    What is the Tsql to perform this type of operation?  Note:  the actual data resides in a sql server 2000 DB.  If the Tsql is different between version 2000 and the later versions -- I would be grateful for both versions of the Tsql
    --I noticed that multiple lines of Insert values doesn't work in Sql Server 2000 -- this sample is in Sql Server 2008
    create table #tmp2(rowID int Identity(1,1), fk varchar(1), startDate datetime, endDate datetime)
    insert into #tmp2
    values
    ('a', '1/13/1985', '12/31/1999'),
    ('a', '3/17/1992', '12/31/1997'),
    ('a', '4/21/1987', '12/31/2003'),
    ('b', '2/14/1986', '12/31/2003'),
    ('b', '5/30/1993', '12/31/2001'),
    ('b', '6/15/1994', '12/31/2003'),
    ('b', '7/7/2001', '12/31/2003'),
    ('c', '4/26/1987', '12/31/1991'),
    ('c', '8/14/1992', '12/31/1998'),
    ('c', '9/10/1995', '12/31/2002'),
    ('c', '10/9/1996', '12/31/2000')
    Thanks
    Rich P

    Rich
    It is unclear what you are trying to achieve, you said that it is SQL Server 2000 but provide a sample data with SQL Server 2008 syntax
    Is it possible to use UNION ALL for your queries to make its one 
    select * from
    select * from #tmp2 t1 where exists
    (select * from (select top 1 * from #tmp2 t2 where t2.fk = t1.fk order by t2.startdate) x where x.rowID = t1.rowID)
    UNION ALL
    select * from #tmp2 t1 where exists
    (select * from (select top 1 * from #tmp2 t2 where t2.fk = t1.fk order by t2.Enddate desc) x where x.rowID = t1.rowID)
     as  der order by fk
    Best Regards,Uri Dimant SQL Server MVP,
    http://sqlblog.com/blogs/uri_dimant/
    MS SQL optimization: MS SQL Development and Optimization
    MS SQL Consulting:
    Large scale of database and data cleansing
    Remote DBA Services:
    Improves MS SQL Database Performance
    SQL Server Integration Services:
    Business Intelligence

  • DTS Import of MDB in SQL Server 2000 Drops Memo Field Data

    I have used DTS in SQL Server 2000 to import an MDB filed (MS ACCESS) of a table.  When the table is imported the primary key is lost and the memo field data is completely gone. 
    I use the tranformation option in the DTS wizard to add the primary key and make sure the data type for the memo field is varchar and has a size of 8000.  I need that large size since I am storing lots of html code. 
    When I preview the data I see the html code that is supposed to get imported.  However, when I return all rows from the table in Enterprise Manager the field is empty.
    So I tried to manually copy the data from the MS Access Database into SQL Server.  Could not figure out if SQL Server has an interface like MS Access to simply copy data into a table.  So I linked to the tables from MS Access to the SQL Server table. 
    When I opened the linked table I see the data in the description field.  However, if I return the rows from within SQL Server no data is present.
    I have some ASP code trying to read the data in the SQL Server table.  However, nothing is returned and when I run the SQL Statement, nothing gets returned.  The SQL statement returns all rows.  All the other data is present but nothing in the description field. 
    What am I doing wrong?  Any suggestions anyone, please!
    TIA 

    It is important to know the version of MS Access. I will recomend you to use nvarchar datatype instead of varchar. May be the description field contain unicode characters.
    Refer this link to understand more on datatype mapping between access source and sql server destionation.
    http://blogs.msdn.com/b/ssma/archive/2011/03/06/access-to-sql-server-migration-understanding-data-type-conversions.aspx?Redirected=true
    Regards, RSingh

  • Can not read Chinese data when DB Connect to SQL server 2000

    Hi,
       Our BW server( BW3.5 not unicode ) is installed on MS SQL server 2000. We try to connect the BW SQL server with db connect function. We create some test views in the Northwind DB. We are be able to access data from source system in rsa1 by db connect. The problem is that all the Chinese characters are displayed as ?????. Is there any special setting for accessing multibyte characters in MS SQL server 2000? Please advise.
    Thank you,
    Jeff

    The field of VIEW in the sqlserver which code is chinese must be the nvarchar.
    You can try it.

  • Problem in Loading Data from SQL Server 2000 to Oracle 10g

    Hi All,
    I am a university student and using ODI for my final project on real-time data warehousing. I am trying to load data from MS SQL Server 2000 into Oracle 10g target table. Everything goes fine until I execute the interface for the initial load. When I choose the CKM Oracle(Create unique index on the I$ table) km, the following step fails:
    21 - Integration - Prj_Dim_RegionInterface - Create Unique Index on flow table
    Where Prj_Dim_Region is the name of my target table in Oracle.
    The error message is:
    955 : 42000 : java.sql.SQLException: ORA-00955: name is already used by an existing object
    java.sql.SQLException: ORA-00955: name is already used by an existing object
         at oracle.jdbc.driver.DatabaseError.throwSqlException(DatabaseError.java:125)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:316)
         at oracle.jdbc.driver.T4CTTIoer.processError(T4CTTIoer.java:282)
         at oracle.jdbc.driver.T4C8Oall.receive(T4C8Oall.java:639)
         at oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:185)
         at oracle.jdbc.driver.T4CPreparedStatement.execute_for_rows(T4CPreparedStatement.java:633)
         at oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1086)
         at oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:2984)
         at oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:3057)
         at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSqlI.treatTaskTrt(SnpSessTaskSqlI.java)
         at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
         at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
         at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
         at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
         at com.sunopsis.dwg.cmd.e.i(e.java)
         at com.sunopsis.dwg.cmd.g.y(g.java)
         at com.sunopsis.dwg.cmd.e.run(e.java)
         at java.lang.Thread.run(Unknown Source)
    I am using a surrogate key column in my target table alongwith the natural key. The natural key is populated by the primary key of my source table, but for the surrogate key, I have created a sequence in my oracle schema where the target table exists and have used the following code for mapping:
    <%=snpRef.getObjectName( "L" , "SQ_PRJ_DIM_REGION" , "D" )%>.nextval
    I have chosen to execute this code on target.
    Among my attempts to solve this problem was to set Create Index option of the CKM Oracle(Create Index for the I$ Table) to No so that it wont create any index on the flow table. I also tried to use the simple CKM Oracle km . Both solutions allowed the interface to execute successfully without any errors, but the data was not loaded into the target table.
    When I right-click on the Prj_Dim_Region data store and choose Data, it shows empty. Pressing the SQL button in this data store shows a dialog box " New Query" where I see this query:
    select * from NOVELTYFURNITUREDW.PRJ_DIM_REGION
    But when i press OK to run it, I get this error message:
    java.lang.IllegalArgumentException: Row index out of range
         at javax.swing.JTable.boundRow(Unknown Source)
         at javax.swing.JTable.setRowSelectionInterval(Unknown Source)
         at com.borland.dbswing.JdbTable.accessChange(JdbTable.java:2959)
         at com.borland.dx.dataset.AccessEvent.dispatch(Unknown Source)
         at com.borland.jb.util.EventMulticaster.dispatch(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.a(Unknown Source)
         at com.borland.dx.dataset.DataSet.open(Unknown Source)
         at com.borland.dx.dataset.StorageDataSet.refresh(Unknown Source)
         at com.borland.dx.sql.dataset.QueryDataSet.refresh(Unknown Source)
         at com.borland.dx.sql.dataset.QueryDataSet.executeQuery(Unknown Source)
         at com.sunopsis.graphical.frame.a.cg.actionPerformed(cg.java)
         at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
         at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
         at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
         at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
         at java.awt.AWTEventMulticaster.mouseReleased(Unknown Source)
         at java.awt.Component.processMouseEvent(Unknown Source)
         at java.awt.Component.processEvent(Unknown Source)
         at java.awt.Container.processEvent(Unknown Source)
         at java.awt.Component.dispatchEventImpl(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
         at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
         at java.awt.Container.dispatchEventImpl(Unknown Source)
         at java.awt.Window.dispatchEventImpl(Unknown Source)
         at java.awt.Component.dispatchEvent(Unknown Source)
         at java.awt.EventQueue.dispatchEvent(Unknown Source)
         at java.awt.EventDispatchThread.pumpOneEventForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
         at java.awt.EventDispatchThread.run(Unknown Source)
    I do not understand what the problem is and wasting days to figure it out. Any help will be highly appreciated as my deadline is too close for this project.
    Thank you so much in advance.
    Neel

    Hi Cezar,
    Can u plz help me with this scenario?
    I have one Oracle data model with 19 source tables and one SQL Server data model with 10 target tables. I have created 10 interfaces which use JournalizedDataOnly on one of the tables in the interface; e.g in interface for DimCustomer target table, I have 2 tables, namely Customer and Address, but the journalizing filter appear only on Customer table and this option is disabled for Address automatically.
    Now I want to create a package using OdiWaitForLog event detection. Is it possible to put all these 10 interfaces in just one package to populate the target tables? It works fine when I have only one interface and I use the name of one table in the interface for Table Name parameter of OdiWaitForLogData event, but when I try a comma seperated list of table names[Customer, Address] this error happens
    java.sql.SQLException: ORA-00942: table or view does not exist
    and if I use this method <%=odiRef.getObjectName("L","model_code","logical_schema","D")%>, I get this error
    "-CDC_SET_NAME=Exception getObjectName("L", "model_code", "logical_schema", "D") : SnpLSchema.getLSchemaByName : SnpLschema does not exist" "
    Please let me know how to make it work?
    Do I need to create separate data models each including only those tables which appear in their corresponding interface and package? Or do I need to create multiple packages each with only one journalized interface to populate only one target table?
    Thank you for your time in advance.
    Regards,
    Neel

Maybe you are looking for