sql-types

SQL Server, nvarchar(MAX) or ntext, image or varbinary?

When should I choose one or the other? What are the implications regarding space and (full-text) indexing? BTW: I'm currently using SQL Server 2005 planing to upgrade to 2008 in the following months. Thanks ...

ms sql server; varchar(MAX) vs TEXT

I just read that VARCHAR(MAX) (which can store, what, close to 2GB of char data?) is the recommended replacement for TEXT columns in 2005 and newer. My question is, if I want to search inside this column for any string ( ... WHERE COL1 LIKE '%search string%' ...) is it quicker to search a VARCHAR(MAX) using the LIKE clause, or use the TE...

What is the string length of a Guid?

I want to create a varchar folumn in SQL should contain N'guid' while guid is a generated Guid by .net (Guid.NewGuid). What is the length of the varchar I should expect from a Guid? is it a static length? Should I use nvarchar (will Guid ever use unicode chars)? varchar(Guid.Length) PS. I don't want to use SQL row guid data-type, jus...

fluent nhibernate problem mapping char(1) type

The map. public SocialCodeMap() { Id(x => x.SocialCodeId); Map(x => x.Name); Map(x => x.Code); Map(x => x.DisplayOrder); } And the Class. public class SocialCode { public virtual Guid SocialCodeId { get; set; } public virtual string Name { get; set; } public virtual char Code { ...

A list of all the SQL types and their .NET mapping?

I need a list of all the SQL types and their .NET (vb would be preferred, but C# also works for me) equivalent. ...

datetime vs smalldatetime

If I don't care about less than seconds, what should be the recommended type to store my datetime values in sql-server 2005, is it datetime or smalldatetime or else? ...

Number of args for stored procedure PLS-00306

Hi I have problem with calling for my procedure. Oracle scrams PLS-00306 Error: Wrong number of types of arguments in call to procedure. With my type declaration procedure has exact the same declaration like in header below. If I run it as separate procedure it works, when i work in ODCI interface for extensible index creation, i...

pl/sql object types "ORA-06530: Reference to uninitialized composite" error

hi, i have a type as follows: CREATE OR REPLACE TYPE tbusiness_inter_item_bag AS OBJECT ( item_id NUMBER, system_event_cd VARCHAR2 (20), CONSTRUCTOR FUNCTION tbusiness_inter_item_bag RETURN SELF AS RESULT ); CREATE OR REPLACE TYPE BODY tbusiness_inter_item_bag AS CONSTRUCTOR FUNCTION tbusiness_inter_item_ba...

oracle collection not enough values

I did following: create or replace type my_row as object ( lname varchar2(30), fname varchar2(30), MI char(1), hohSSN char (9), hohname VARCHAR2(63), hohDob char(10), dob DATE ); create or replace type eiv.my_rec as table of eiv.my_row; but then doing query like: my_records my_rec sele...

confusion about using types instead of gtts in oracle

I am trying to convert queries like below to types so that I won't have to use GTT: insert into my_gtt_table_1 (house, lname, fname, MI, fullname, dob) (select house, lname, fname, MI, fullname, dob from (select 'REG' house, mbr_last_name lname, mbr_first_name fname, mbr_mi MI, mbr_first_name || mbr_mi || mbr_last_name fullnam...

SQLBulkCopy can't convert Time to DateTime

I am writing a small utility to copy a database from a proprietary ODBC database into a SQL Server database. Everything is working great, except when I use SQLBulkCopy to copy over the data. It works in most cases, but not when it's trying to copy a TIME field into a SQL DATETIME. I get this error: The given value of type TimeSpan fr...

Implementing new NHibernate type for POINT postgresql data type (or any COLUMN of a non-primitive analogous nhibernate type)

Hi everyone. I have a problem with NHibernate and the postgresql POINT data type (although I believe this is a common problem for all of those trying to map a SQL TYPE that is not covered by NHibernate SqlTypes). My Data.Point class has two public floats: xcoordinate and ycoordinate. My first attempt was trying to implement the IUserTy...