Showing posts with label position. Show all posts
Showing posts with label position. Show all posts

Friday, March 30, 2012

help how to create a row progressive..

Hi to everybody, I'd like to know how to extract a progressive number in a
select.
Example..

Select * from employers

Name Surname Position Age Hire Date Progressive
Mario Rossi Consultant 25 26/07/2003 1 (this
field doeas not exists in table)
fredrick Bauman Secretary 30 15/06/1999 2
Liana Orfei Director 45 15/01/1970 3
...................................... .....................
...........n

Thanks to every bodyHere's an example from the Pubs database:

SELECT
(SELECT COUNT(*)
FROM Authors
WHERE au_id <= A.au_id)
,*
FROM Authors AS A

--
David Portas
SQL Server MVP
--|||If you can afford to use an intermediate temp table:

select IDENTITY(int,1,1) as ProgressiveNumber into #Employers
select * from #Employers

MSSQL requires a table (even a temp table) on which to hang the identity
state info.

" Pecos Bill" <pecos.bill@.yahoo.it> wrote in message
news:6KlCc.15581$c_1.447390@.twister1.libero.it...
> Hi to everybody, I'd like to know how to extract a progressive number in a
> select.
> Example..
> Select * from employers
> Name Surname Position Age Hire Date Progressive
> Mario Rossi Consultant 25 26/07/2003 1 (this
> field doeas not exists in table)
> fredrick Bauman Secretary 30 15/06/1999 2
> Liana Orfei Director 45 15/01/1970 3|||> SELECT
> (SELECT COUNT(*)
> FROM Authors
> WHERE au_id <= A.au_id)
> ,*
> FROM Authors AS A

thanks...I'll try soon.|||"Mischa Sandberg" <mischa_sandberg@.telus.net> ha scritto nel messaggio
news:72pCc.6022$E84.827@.edtnps89...
> If you can afford to use an intermediate temp table:
> select IDENTITY(int,1,1) as ProgressiveNumber into #Employers
> select * from #Employers
> MSSQL requires a table (even a temp table) on which to hang the identity
> state info.

thanks...I'll try soon.
alessandro|||>> I'd like to know how to extract a progressive number in a select.
<<

Let's get back to the basics of an RDBMS. Rows are not records; fields
are not columns; tables are not files; there is no sequential access
or ordering in an RDBMS, so "first", "next" and "last" are totally
meaningless. In SQL and tiered architectures, things that deal with a
PHYSICAL ordering are done in the front end, never in the database.

Friday, March 9, 2012

Help - Sql Server 2005 at a crawl on Win 2000 Server

Hello -
I know nothing about running servers, however, I am in a position where I
not only programmed the app, programmed Sql Server 2005 for the app and but
now had to install Sql Server 2005 on a box that was given to me - Pentium I
V
with 40 gigs of storage and 512 MB RAM. I thought the machine would be
sufficient, however, it has been running (with no users using the app yet)
for three days and it's at a crawl. The OS is Windows 2000 Server.
Any suggestions as to what may a likely problem? (Looks like some kind of
memory leak to me.) I know more specifics are probably needed, but I don't
know what specifics to provide.
Any help will be greatly appreciated! These people expect this app to be up
and running by Thursday morning!!!!
--
SandySandy
http://www.microsoft.com/sql/prodin...qs/default.mspx
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:AA02BFDD-1790-4A30-BA64-DE8937B5172A@.microsoft.com...
> Hello -
> I know nothing about running servers, however, I am in a position where I
> not only programmed the app, programmed Sql Server 2005 for the app and
> but
> now had to install Sql Server 2005 on a box that was given to me - Pentium
> IV
> with 40 gigs of storage and 512 MB RAM. I thought the machine would be
> sufficient, however, it has been running (with no users using the app yet)
> for three days and it's at a crawl. The OS is Windows 2000 Server.
> Any suggestions as to what may a likely problem? (Looks like some kind of
> memory leak to me.) I know more specifics are probably needed, but I
> don't
> know what specifics to provide.
> Any help will be greatly appreciated! These people expect this app to be
> up
> and running by Thursday morning!!!!
> --
> Sandy|||Apart from what Uri has recommended - particuarly the bit about 1GB memory
recommended, there are a number of measurements you could take focusing
around CPU,RAM,Hard Disk . I haven't included Network as it sounds like
there are no users, which is the main cause for network bottlenecks.
Quick tests are: Pages/Sec memory, percentage disk time, average disk queue
length , buffer cache hit ratio .
Jack Vamvas
___________________________________
Receive free SQL tips - www.ciquery.com/sqlserver.htm
___________________________________
"Sandy" <Sandy@.discussions.microsoft.com> wrote in message
news:AA02BFDD-1790-4A30-BA64-DE8937B5172A@.microsoft.com...
> Hello -
> I know nothing about running servers, however, I am in a position where I
> not only programmed the app, programmed Sql Server 2005 for the app and
but
> now had to install Sql Server 2005 on a box that was given to me - Pentium
IV
> with 40 gigs of storage and 512 MB RAM. I thought the machine would be
> sufficient, however, it has been running (with no users using the app yet)
> for three days and it's at a crawl. The OS is Windows 2000 Server.
> Any suggestions as to what may a likely problem? (Looks like some kind of
> memory leak to me.) I know more specifics are probably needed, but I
don't
> know what specifics to provide.
> Any help will be greatly appreciated! These people expect this app to be
up
> and running by Thursday morning!!!!
> --
> Sandy|||Hi Jack and Uri -
Thank you very much for your responses.
One further question: I looked through the System properties and noticed
that under Performance Options (System Properties -> Advanced -> Performance
Options - Optimize Performance), "Background" is checked. Should
"Applications" be checked there instead?
Again, any help will be greatly appreciated!
--
Sandy
"Sandy" wrote:

> Hello -
> I know nothing about running servers, however, I am in a position where I
> not only programmed the app, programmed Sql Server 2005 for the app and bu
t
> now had to install Sql Server 2005 on a box that was given to me - Pentium
IV
> with 40 gigs of storage and 512 MB RAM. I thought the machine would be
> sufficient, however, it has been running (with no users using the app yet)
> for three days and it's at a crawl. The OS is Windows 2000 Server.
> Any suggestions as to what may a likely problem? (Looks like some kind of
> memory leak to me.) I know more specifics are probably needed, but I don'
t
> know what specifics to provide.
> Any help will be greatly appreciated! These people expect this app to be
up
> and running by Thursday morning!!!!
> --
> Sandy