Showing posts with label field. Show all posts
Showing posts with label field. Show all posts

Tuesday, March 20, 2012

Background expression

Hi All,

I tried using the following Expression in a field's background property:

=iif( Fields!ProjectedDate.Value between (getdate()+1) and (getdate()+7), Orange ,White )

And then I got this message, anyone got any ideas?

The background color expression for the textbox 'textbox49' contains an error: [BC30455] Argument not specified for parameter 'FalsePart' of 'Public Function IIf(Expression As Boolean, TruePart As Object, FalsePart As Object) As Object'.

=iif( Fields!ProjectedDate.Value < (getdate()+1) AND Fields!ProjectedDate.Value > (getdate()+7), Orange ,White )

I dont think you can use between in expression.

sql

Sunday, March 11, 2012

B.C. vs A.D. datetime in SQL Server

Whats the format to send to a datetime field to distinguish it as B.C. vs A.D.

-JimSQL Server's DATETIME data type only permits dates in the range 1753-01-01
to 9999-12-31 (AD). If you need to record dates outside of this range then
you should use a CHAR or numeric column to do so.

Storing and manipulating ancient dates to a precision of more than one year
is very problematic because of the different and conflicting calendars in
use in different parts of the world. You could create a calendar table
containing all the dates which are valid in the calendar you want to use and
then reference that from your table. Maybe:

CREATE TABLE Calendar (era CHAR(2) CHECK (era IN ('BC','AD')), caldate
CHAR(8), PRIMARY KEY (era,caldate))

CREATE TABLE Sometable (... eracol CHAR(2) NOT NULL, datecol CHAR(8) NOT
NULL, FOREIGN KEY (eracol, datecol) REFERENCES Calendar (era, caldate)...)

--
David Portas
----
Please reply only to the newsgroup
--

"Jim" <jim.ferris@.motorola.com> wrote in message
news:729757f9.0311251211.3d874d62@.posting.google.c om...
> Whats the format to send to a datetime field to distinguish it as B.C. vs
A.D.
> -Jim|||"David Portas" <REMOVE_BEFORE_REPLYING_dportas@.acm.org> wrote in message
news:KqydnbIRyLzeIF6iRVn-vg@.giganews.com...
> SQL Server's DATETIME data type only permits dates in the range 1753-01-01
> to 9999-12-31 (AD). If you need to record dates outside of this range then
> you should use a CHAR or numeric column to do so.
> Storing and manipulating ancient dates to a precision of more than one
year
> is very problematic because of the different and conflicting calendars in
> use in different parts of the world.

http://www.tondering.dk/claus/cal/calendar26.html

For all you wanted to know and were afraid to ask.

>You could create a calendar table
> containing all the dates which are valid in the calendar you want to use
and
> then reference that from your table. Maybe:
> CREATE TABLE Calendar (era CHAR(2) CHECK (era IN ('BC','AD')), caldate
> CHAR(8), PRIMARY KEY (era,caldate))
> CREATE TABLE Sometable (... eracol CHAR(2) NOT NULL, datecol CHAR(8) NOT
> NULL, FOREIGN KEY (eracol, datecol) REFERENCES Calendar (era, caldate)...)
> --
> David Portas
> ----
> Please reply only to the newsgroup
> --
> "Jim" <jim.ferris@.motorola.com> wrote in message
> news:729757f9.0311251211.3d874d62@.posting.google.c om...
> > Whats the format to send to a datetime field to distinguish it as B.C.
vs
> A.D.
> > -Jim

Saturday, February 25, 2012

Avoiding truncate error

There is some option in Sql Server 2000 to set of avoid errors when a text
larger than destination field is stored in it ?
For example i must do an INSERT INTO NAMES
and NAMES have a field of size 10
if i store a field of size 20 in it the server give me an error
can i avoid this error and store only the firsts 10 bytes in the destination
field?
thanks a lot.Look in BOL for SET ANSI_WARNINGS with the example
"Romano Benedetto" <RomanBe@.tin.it> schrieb im Newsbeitrag
news:UYtee.1336790$35.49871941@.news4.tin.it...
> There is some option in Sql Server 2000 to set of avoid errors when a text
> larger than destination field is stored in it ?
> For example i must do an INSERT INTO NAMES
> and NAMES have a field of size 10
> if i store a field of size 20 in it the server give me an error
> can i avoid this error and store only the firsts 10 bytes in the
> destination field?
> thanks a lot.
>|||Look in BOL for SET ANSI_WARNINGS with the example
PRINT 'Testing String Overflow in INSERT'
GO
INSERT INTO T1 VALUES (4, 4, 'Text string longer than 20 characters')
GO
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Romano Benedetto" <RomanBe@.tin.it> schrieb im Newsbeitrag
news:UYtee.1336790$35.49871941@.news4.tin.it...
> There is some option in Sql Server 2000 to set of avoid errors when a text
> larger than destination field is stored in it ?
> For example i must do an INSERT INTO NAMES
> and NAMES have a field of size 10
> if i store a field of size 20 in it the server give me an error
> can i avoid this error and store only the firsts 10 bytes in the
> destination field?
> thanks a lot.
>

Avoiding temp tables

Dear all,
I'd like to rewrite this update statement without using a temp table.
For each row with duplicate my_id's, the reference_no field should be
set to the number of duplicates for that id.
When I try rewriting this as a single statement I have problems getting
'at' the calculated duplicates field.
Cheers!
select my_id, count(*) as duplicates
into #tmp
from my_table
group by my_id
having count(*) > 1
update my_table
set my_table.reference_no = #tmp.duplicates
from #tmp, my_table
where #tmp.my_id = my_table.my_idOn 7 Mar 2005 23:53:24 -0800, davidol@.hushmail.com wrote:

>I'd like to rewrite this update statement without using a temp table.
>For each row with duplicate my_id's, the reference_no field should be
>set to the number of duplicates for that id.
Hi Davidol,
This version uses only ANSI-standard constructions. You need to use the
column(s) that make up the primary key of the table; I've assumed a
compound primary key on column PK01 and PK02 for my example:
UPDATE my_table
SET reference_no = (SELECT COUNT(*)
FROM my_table AS m2
WHERE m2.my_id = my_table.my_id)
WHERE EXISTS (SELECT *
FROM my_table AS m2
WHERE m2.my_id = my_table.my_id
AND ( m2.PK01 <> my_table.PK01
OR m2.PK02 <> my_table.PK02))
If you don't have a primary key, you should change your design. In case
you can't do that right now, try the following query (still ANSI
compliant, but probably slower than the first query):
UPDATE my_table
SET reference_no = (SELECT COUNT(*)
FROM my_table AS m2
WHERE m2.my_id = my_table.my_id)
WHERE (SELECT COUNT(*)
FROM my_table AS m2
WHERE m2.my_id = my_table.my_id) > 1
Finally, if you don't care about portability, you could use the
proprietary UPDATE FROM syntax, as below. Performance might be better
than the ANSI-compliant version (but test it out to be sure). Don't
forget to document the use of a non-ANSI compliant construction (and
include a commented ANSI-compliant version in the code, or include it in
external documentation, so that you don't have to redo the thinking when
you do have to port your code).
UPDATE m
SET m.reference_no = a.cnt
FROM my_table AS m
INNER JOIN (SELECT my_id, COUNT(*) AS cnt
FROM my_table
GROUP BY my_id
HAVING COUNT(*) > 1) AS a
ON a.my_id = m.my_id
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)|||Try this also
update my_table set reference=T.Count from (
select my_id,count(*) as 'Count' from my_table group by my_id having
count(*)>1)
T , my_table A where A.my_id=T.my_id
Madhivanan

Avoiding NULLS how ?

Two examples where we use NULL fields, how to avoid them ?
For a datetime field, date's which are still unknown, for
example an appointment in the future or the ending of
a event still going on, were the date still
has to be set or the date when somebody died.
(And what to do with a birthdate, which is not completely
know, for example jan 1958 or born in 1958, sorry side track).
A integer field, for example a count field were there is no
actual count at the moment. (count can be positive and negative).
Offcourse the data is used by different applications and systems,
also by MIS/MSS/DSS/Olap/Datamining.
Ben BrugmanHi Ben,
What's the reason for avoiding NULL's, seem like a logical values to me in
these cases?
HTH
Karl Gram
http://www.gramonline.com
"ben brugman" <ben@.niethier.nl> wrote in message
news:#88hzTODEHA.3016@.TK2MSFTNGP11.phx.gbl...
> Two examples where we use NULL fields, how to avoid them ?
> For a datetime field, date's which are still unknown, for
> example an appointment in the future or the ending of
> a event still going on, were the date still
> has to be set or the date when somebody died.
> (And what to do with a birthdate, which is not completely
> know, for example jan 1958 or born in 1958, sorry side track).
> A integer field, for example a count field were there is no
> actual count at the moment. (count can be positive and negative).
> Offcourse the data is used by different applications and systems,
> also by MIS/MSS/DSS/Olap/Datamining.
> Ben Brugman
>|||On Thu, 18 Mar 2004 13:31:32 +0100, ben brugman wrote:

>Two examples where we use NULL fields, how to avoid them ?
>For a datetime field, date's which are still unknown, for
>example an appointment in the future or the ending of
>a event still going on, were the date still
>has to be set or the date when somebody died.
>(And what to do with a birthdate, which is not completely
>know, for example jan 1958 or born in 1958, sorry side track).
>A integer field, for example a count field were there is no
>actual count at the moment. (count can be positive and negative).
>Offcourse the data is used by different applications and systems,
>also by MIS/MSS/DSS/Olap/Datamining.
>Ben Brugman
I know many people advise against using NULLs. I don't agree with
them. If a programmer doesn't know how to code proper SQL statements
with NULLable columns, don't forbid NULLs but fire the programmer and
hire a more capable replacement.
In the examples you provided (date unknown / no count present), NULL
is an excellent (the best, IMnotsoHO) solution.
Icomplete dates are another matter. If you foresee incomplete dates,
you'll have to store the parts of the date individually. So the
combination day/month/year would be NULL/NULL/1958 for someone born in
1958, or NULL/1/1958 for someone born in jan 1958. However, this will
require lots of extra work if you also have to do date calculations.
Best, Hugo
--
(Remove _NO_ and _SPAM_ to get my e-mail address)

Friday, February 24, 2012

Avoid duplicate primary key error

How can I avoid duplicate primary key error when I use DetailsView Inserting that the field column is one of the primary key ?

Thanks in advance !

stephen

Before insertin the new row, you can check the table to see whether there is a row in the table with the same key value as the new row. For example:

if exists (select * from Orders where OrderID=@.newOrderID)

//not insert

else //insert

|||

Can you show me the detail of correct syntax ? I'm very new in ASP.NET 2.0. I did type the statement in the ??.aspx.cs and syntax error found.

stephen

|||

Sorry I forgot to say: the code in my last post is T-SQL statements, so you can use them in SqlCommand or something else.

Sunday, February 19, 2012

AVG function on an integer column- truncation

When I use the AVG Function on an integer column, the result is truncated

Example:

Select AVG(field1) from table1

Field1 is an int field and has 4 rows with the values 114,115,115 and 115. This will return 114.

I can get the correct result by using the following SELECT:

SELECT CAST(AVG(CAST (field1 as decimal(18,1)))+ .5 as int) from table1

Am I missing something here? Is there an simpler way to do this?

Any help will be appreciated.

Steve D.

You are correct on the problem, but I am certain you can do it a little easier. Try this example:

DECLARE @.v_test TABLE ([num] INT)

INSERT INTO @.v_test VALUES(1)

INSERT INTO @.v_test VALUES(2)

INSERT INTO @.v_test VALUES(2)

INSERT INTO @.v_test VALUES(2)

SELECT AVG(CONVERT(DECIMAL,num))

FROM @.v_Test

|||

The problem is that I need the resultant value to be an integer, not a decimal value. The query from above will return 1.75000.

I need the result back as an integer, which was why I had to cast it back to an integer after adding .5. Just looking for a simpler way to do this

|||

I'm not sure I understand. Would your answer be rounded to 2? Converting it to an INT is what it is doing for you.

You could use this to round it. If you want to recast it to INT, that is possible at this point.

SELECT ROUND(AVG(CONVERT(DECIMAL,num)),0)

|||

OR

SELECT CEILING(AVG(CONVERT(DECIMAL,num))) from yourTable

|||

More info.

I want the Average value to round to the nearest integer.

1.8 would round to 2

1.2 would round to 1

Ceiling looks like it would make 1.2 convert to 2.

Edit-

Tested this further- it looks like ROUND is what I need. It returns a decimal number (ex 1.0000), but I can convert that back to int.

Monday, February 13, 2012

Average and Total per Hour

I have a table with a field date_hour - (it dates) and a field nivel_tq -
(integer)
Example:
data_hora nivel_tq
10/10/2003 08:00:00 50
10/10/2003 08:15:00 75
10/10/2003 08:25:00 65
10/10/2003 08:30:00 70
10/10/2003 09:00:00 70
10/10/2003 09:20:00 60
10/10/2003 09:30:00 50
10/10/2003 10:00:00 50
11/10/2003 12:00:00 50
11/10/2003 12:20:00 60
Doubt: I need a select that comes back me the average of the nível_tq
per hour and it dates
the expected result would be:
data_hora nivel_tq
10/10/2003 08:00:00 65
10/10/2003 09:00:00 60
10/10/2003 10:00:00 50
11/10/2003 12:00:00 55select DATEPART(hh,data_hora),sum(nivel_tq)/count(*) as Average from
tablename
group by DATEPART(hh,data_hora)
--
HTH
Ryan Waight, MCDBA, MCSE
"Frank Dulk" <fdulk@.bol.com.br> wrote in message
news:ONYk8cSkDHA.3316@.TK2MSFTNGP11.phx.gbl...
>
>
> I have a table with a field date_hour - (it dates) and a field nivel_tq -
> (integer)
> Example:
> data_hora nivel_tq
> 10/10/2003 08:00:00 50
> 10/10/2003 08:15:00 75
> 10/10/2003 08:25:00 65
> 10/10/2003 08:30:00 70
> 10/10/2003 09:00:00 70
> 10/10/2003 09:20:00 60
> 10/10/2003 09:30:00 50
> 10/10/2003 10:00:00 50
> 11/10/2003 12:00:00 50
> 11/10/2003 12:20:00 60
> Doubt: I need a select that comes back me the average of the nível_tq
> per hour and it dates
> the expected result would be:
> data_hora nivel_tq
> 10/10/2003 08:00:00 65
> 10/10/2003 09:00:00 60
> 10/10/2003 10:00:00 50
> 11/10/2003 12:00:00 55
>
>

Average

I have a field in my database for the duration of a phonecall. It is input as decimal values of minutes and i have it stored as real datatype... When I use an SQL query to calculate the average i get an in accurate answer... I'm new to databases and don't really know what datatype i should store it as... does anyone have any suggestions?a real data type should work fine, are you tring to store a base 60 number in a base 10 data type? why not convert the decimal into number of seconds (if you need that much resolution) and store the result in an int? Maybe an example would help.|||I'm importing values from a text file into the database. The values in the text files are simple decimals... eg. 0.1, 28.78... and are imported into the db as the same.

Let me try to explain. Its a database that stores the duration of a phone call and the number of the phone from which it is made amongst other fields. One of the phone numbers made two outgoing calls, both 0.1 minutes long. I wrote the query, select avg(duration) .... and it reurned the value 0.100000001490116 for the average!!!

I hope you can shed some light on this for me because as I said, I'm relatively new to databases and I don't know where the problem lies!

Thanks...|||DING DING DING

Float and Real are approximate number data types. What you got was approximately 0.1. Change your data type to Decimal or Numeric probably Decimal(9,4) would work.|||Thanks for you help so far...

Pardon my ignorance but what do you mean by (9,4) in decimal (9,4)?|||from Books Online:

decimal and numeric
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. The default precision is 18.

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. Scale can be specified only if precision is specified. The default scale is 0; therefore, 0 <= s <= p. Maximum storage sizes vary, based on the precision.|||Thanks a million Paul... thats a great help...

Sunday, February 12, 2012

Autoresize fields

Hello,
I want to know if is possible to make a field in crystal that is autoresizing.
thank youNot sure how to do that, but here's a way to get the same effect:

Example, Displaying an address:

Put a Textbox onto your Report. Drag and drop the Name field into the textbox, click Enter to add a carriage return. Drag and drop the Address field into the textbox, click Enter to add a carriage return. Drag and drop the City field into the textbox, type a comma, Drag and drop the State field into the textbox, type a space or 2, Drag and drop the ZipCode field into the textbox. This "autosizes" the City, state, and zip code to look like it was typed normally. The result should look like the attached image.

Friday, February 10, 2012

Autonumber...

Sorry for my bad English but I'm Italian...

I have a question for you...
I delete all record of table but I don't set autonumber field to start with
value 1...
What do you do to set a values of autonumber colomns with Query Analizer or
Enterprise Manager...?I guess you are looking for a code to reset the identity seed for a table.
Here you go:

DBCC CHECKIDENT (TableName, RESEED, 1)

Shervin

"Matrix" <wdilan_NOSPAM@.tin.it> wrote in message
news:bkp1t5$a7j$1@.grillo.cs.interbusiness.it...
> Sorry for my bad English but I'm Italian...
> I have a question for you...
> I delete all record of table but I don't set autonumber field to start
with
> value 1...
> What do you do to set a values of autonumber colomns with Query Analizer
or
> Enterprise Manager...?|||In article <bkp1t5$a7j$1@.grillo.cs.interbusiness.it>,
wdilan_NOSPAM@.tin.it says...
> What do you do to set a values of autonumber colomns with Query Analizer or
> Enterprise Manager...?

I worried about that for a long time, too. It just seemed unnatural to
have a bunch of missing numbers. But after continually resetting them
(there are a couple of ways to do it -- I see someone already is helping
with that) I finally realized that there is no reason to do so.

Think what the numbers will look like after a few weeks of production.

-- Rick|||Since you want to delete all the rows in the table you can use

TRUNCATE TABLE table_name

That will delete all rows AND reset the seed in one command.

- Jason

> "Matrix" <wdilan_NOSPAM@.tin.it> wrote in message
> news:bkp1t5$a7j$1@.grillo.cs.interbusiness.it...
> > Sorry for my bad English but I'm Italian...
> > I have a question for you...
> > I delete all record of table but I don't set autonumber field to start
> with
> > value 1...
> > What do you do to set a values of autonumber colomns with Query Analizer
> or
> > Enterprise Manager...?|||On 25 Sep 2003 10:57:39 -0700 in comp.databases.ms-sqlserver,
JayCallas@.hotmail.com (Jason) wrote:

>Since you want to delete all the rows in the table you can use
>TRUNCATE TABLE table_name
>That will delete all rows AND reset the seed in one command.

Doesn't seem to work if you have foreign key constraints.

--
A)bort, R)etry, I)nfluence with large hammer.

Autonumber...

Sorry for my bad English but I'm Italian...
I have a question for you...
I delete all record of table but I don't set autonumber field to start with
value 1...
What do you do to set a values of autonumber colomns with Query Analizer or
Enterprise Manager...?See my reply in other group. Please don't multipost.
--
Tibor Karaszi, SQL Server MVP
Archive at: http://groups.google.com/groups?oi=djq&as ugroup=microsoft.public.sqlserver
"Matrix" <wdilan_NOSPAM@.tin.it> wrote in message news:bkp1m7$kp9$1@.fata.cs.interbusiness.it...
> Sorry for my bad English but I'm Italian...
> I have a question for you...
> I delete all record of table but I don't set autonumber field to start with
> value 1...
> What do you do to set a values of autonumber colomns with Query Analizer or
> Enterprise Manager...?
>
>

Autonumber question

Does anyone know how to reset an autonumber field in SQLExpress 2005?

In MSAccess it was a simple "compress" of the database. My .mdf files are getting very large and I would like to shrink them down for easier mobility. A blank database takes up aprox. 30 mbs. Most all of the autonumber fields are currently in the 200,000 - 800,000 range. When I compressed my Access database prior to transfering to SQLExpress it significantly decreased the size of the empty database file.

Thank you for any help you can provide.

hi,

please have a look at http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=769553&SiteID=1

regards

Autonumber problem

Hello all,
Has anyone heard about autonumber fields skipping one number? For example, the autonumber field goes from 39 to 41 skipping 40 entirely.

Any ideas why it would do this?
Thanks in advance.
Richard M.if you delete records, the number does not get reassigned. this is to maintain the uniqueness of the number assigned to a record.

hth|||It does the same if an insert fails (in EM for sure, probably in SQL too). the number that WOULD have been assigned gets bypassed

autonumber in SQL Server Express

Does anyone know how to add an autonumber field into a table? Is this the same as uniqueidentifier? I have a table and I need to create a field to use as Primary Key. I would appreciate any help.

-Brad B

identity is the autonumber keyword.

create table tblWhatever

(

id int identity,

name nvarchar(50) /* whatever */

)

|||Ok... I'm going to give that a try! Thanks Chris.

AutoNumber in SQL 2005

Hello friends,

I am using Sql Server 2005 in my web application. In one scenario I had made one field of a table as Autonumber by keeping its datatype as int and then setting its Identity flag to true. Now is there any inbuild function that can give us the next number tat will be generated if a new record will be inserted. This is needed in the case if last 1 or 2 records are deleted for e.g.

last record has value 7 and if the record is deleted still for the new record the number generated will be 8 i.e. after 6 there is 8. So by any means can we get the next number, or can we keep that autonumber to move serially even in case some record is deleted it should go for the max + 1 number.

Please let me know.

Thanks & Regards
Girish Nehte

sql server doesn't guarantee sequential order numbers, though there are some tricks to force it (reseeding the table via DBCC checkident). I'd recommend that you not rely on a function that assumes the max+1, but instead use scope_identity to return the actual value -http://www.sqlteam.com/article/understanding-identity-columns andhttp://www.sqlteam.com/article/creating-a-sequential-record-number-field are worth reading to detail you some options.

|||

Why should you care what the next number will be? If this is important then there is something conceptually wrong with your design. Identity columns are inherently dataless, they have no intrinsic meaning. What are you trying to accomplish?

|||

Hi dbland,

Actually I have to save two records in two different tables and after one records save I have to take fetch the identity of that record and set that identity aas the fireign key for the second records but as both the records we are entering are in the same transaction i.e. after both the queries executed we commit the transaction due to which before commiting we are unable to get the identity key of first record which we will be needing in entering the second record.

I dont know whether I was able to make clear my requirements or not but if you please got it let me know any better way to accomplish it.

Thanks & Regards
Girish Nehte

|||

i think if you are still going to implement this then use max in the query to retrive the highest figure in the column.like select max(id) as maximum from ur table.

|||

Thanks, Girish, for that clarification. What you want to do is very common and easily accomplished using the SCOPE_IDENTITY() function (seehttp://msdn2.microsoft.com/en-us/library/ms190315(SQL.90).aspx). Here's an example

declare @.LastId int
begin tran
insert ... into table1
select @.LastId = SCOPE_IDENTITY()
insert ... @.LastId,... into table2 (...FK_field,...)
commit tran

In my example, I save SCOPE_IDENTITY() to a variable and use the variable, this is not necessary, I just consider it good programming practice to always save @.@. fields and the like into temp variables so they don't get overwritten.

If you rollback the identity counters will still have been incremented, but it doesn't matter.

BTW, note in the MSDN article how SCOPE_IDENTITY() differs from @.@.identity

Autonumber field type in SQL Express 2005

Hope that this nisn the best place for this posting.
I am new to SQL Server using 2005 express with Visual basic express. I have
used Access databases before and used a AutoNumber field type to help with
indexing. Is this available from SQL Express 2005?
Hope you can assistOpps, found it using IDENTITY property.
any know of good book to get me up and running on SQL Server from VB.NET?
Matt A
"matt a" wrote:
> Hope that this nisn the best place for this posting.
> I am new to SQL Server using 2005 express with Visual basic express. I have
> used Access databases before and used a AutoNumber field type to help with
> indexing. Is this available from SQL Express 2005?
> Hope you can assist|||> any know of good book to get me up and running on SQL Server from VB.NET?
I don't believe there are any books out on SQL Server 2005, but here's on
for SQL Server 2000 + VB.Net:
http://www.amazon.com/exec/obidos/tg/detail/-/0735615357/
Also see http://www.aspfaq.com/2423

Autonumber field type in SQL Express 2005

Hope that this nisn the best place for this posting.
I am new to SQL Server using 2005 express with Visual basic express. I have
used Access databases before and used a AutoNumber field type to help with
indexing. Is this available from SQL Express 2005?
Hope you can assist
Opps, found it using IDENTITY property.
any know of good book to get me up and running on SQL Server from VB.NET?
Matt A
"matt a" wrote:

> Hope that this nisn the best place for this posting.
> I am new to SQL Server using 2005 express with Visual basic express. I have
> used Access databases before and used a AutoNumber field type to help with
> indexing. Is this available from SQL Express 2005?
> Hope you can assist
|||> any know of good book to get me up and running on SQL Server from VB.NET?
I don't believe there are any books out on SQL Server 2005, but here's on
for SQL Server 2000 + VB.Net:
http://www.amazon.com/exec/obidos/tg.../-/0735615357/
Also see http://www.aspfaq.com/2423

Autonumber field type in SQL Express 2005

Hope that this nisn the best place for this posting.
I am new to SQL Server using 2005 express with Visual basic express. I have
used Access databases before and used a AutoNumber field type to help with
indexing. Is this available from SQL Express 2005?
Hope you can assistOpps, found it using IDENTITY property.
any know of good book to get me up and running on SQL Server from VB.NET?
Matt A
"matt a" wrote:

> Hope that this nisn the best place for this posting.
> I am new to SQL Server using 2005 express with Visual basic express. I ha
ve
> used Access databases before and used a AutoNumber field type to help with
> indexing. Is this available from SQL Express 2005?
> Hope you can assist|||> any know of good book to get me up and running on SQL Server from VB.NET?
I don't believe there are any books out on SQL Server 2005, but here's on
for SQL Server 2000 + VB.Net:
http://www.amazon.com/exec/obidos/t...l/-/0735615357/
Also see http://www.aspfaq.com/2423

Autonumber field

I have converted an access database to sql server database.I am having problems with my autonumber field which was converted to int.
Have researched on this forum on such a case and someone said make the field identity.
However my sqlserver database does not give that identity variable type.
Please help !!!

Quote:

Originally Posted by Touch

I have converted an access database to sql server database.I am having problems with my autonumber field which was converted to int.
Have researched on this forum on such a case and someone said make the field identity.
However my sqlserver database does not give that identity variable type.
Please help !!!


Identity is not a datatype. its in datatype discreption