Showing posts with label server2000. Show all posts
Showing posts with label server2000. Show all posts

Thursday, March 29, 2012

can we increment the column --autimaticallyis there any possiblity with tiggers

hi,
i am a beginner to ms sql server2000
i have a table
create table ddd (a int, b int)
by table structure is a b
now when i enter a value in b column suppose '2' in column b
bext time when i insert a value in the column a i have to get the value
in b as 3 is thi spossible with triggers
insert into gdg values (1,2)
a b
1 2
insert into gdg (a) values(2)
a b
2 3--> i have to get this 3 automatically
is there any method to get this
pls help me
satishis this homework?sql

Tuesday, March 20, 2012

Can timestamp columns be updated?

Hi,
Is there any way timestamp columns can be updated in Microsoft SQL Server
2000 (SP3)?
-- Many thanks, OskarNot directly.
Linchi
"Oskar" wrote:

> Hi,
> Is there any way timestamp columns can be updated in Microsoft SQL Server
> 2000 (SP3)?
> -- Many thanks, Oskar
>|||update the row to itself, i.e. update MyTableName set Col1=Col1 where pk=pk
Hilary Cotter
Director of Text Mining and Database Strategy
RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
This posting is my own and doesn't necessarily represent RelevantNoise's
positions, strategies or opinions.
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
news:BB373431-C1DB-4A5D-B02D-18B688203F99@.microsoft.com...[vbcol=seagreen]
> Not directly.
> Linchi
> "Oskar" wrote:
>|||Thanks. Not sure if this helps though. I really wanted to update the
timestamp column with the value I choose not the one of the internal @.@.DBTS
counter.
Any ideas if there's a way of updating the value the internal @.@.DBTS
counter, besides updating a zillion of records? Linchi?
"Hilary Cotter" wrote:

> update the row to itself, i.e. update MyTableName set Col1=Col1 where pk=p
k
> --
> Hilary Cotter
> Director of Text Mining and Database Strategy
> RelevantNOISE.Com - Dedicated to mining blogs for business intelligence.
> This posting is my own and doesn't necessarily represent RelevantNoise's
> positions, strategies or opinions.
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Linchi Shea" <LinchiShea@.discussions.microsoft.com> wrote in message
> news:BB373431-C1DB-4A5D-B02D-18B688203F99@.microsoft.com...
>
>|||"Oskar" <Oskar@.discussions.microsoft.com> wrote in message
news:C9211B6D-90B4-43B2-AD80-F068FB8ACF17@.microsoft.com...
> Thanks. Not sure if this helps though. I really wanted to update the
> timestamp column with the value I choose not the one of the internal
@.@.DBTS
> counter.
There is no way. Not really sure why you'd want to anyway. There's
probably better ways of doing what you want to do.

> Any ideas if there's a way of updating the value the internal @.@.DBTS
> counter, besides updating a zillion of records? Linchi?|||No, you can't directly update it. You can't do something like the following:
update myTable
set my_timestamp_column = ...
Linchi
"Oskar" wrote:
[vbcol=seagreen]
> Thanks. Not sure if this helps though. I really wanted to update the
> timestamp column with the value I choose not the one of the internal @.@.DBT
S
> counter.
> Any ideas if there's a way of updating the value the internal @.@.DBTS
> counter, besides updating a zillion of records? Linchi?
>
> "Hilary Cotter" wrote:
>

Sunday, March 11, 2012

Can start SERVICE

Am using SQL Server2000 on WINXP. Have been using this DB since it became
available. Today, all of a sudden, the Service was not 'started,' even tho
I had it marked as 'automatic.' Tried to manually start the service, and
received the message that some services start and stop if there is no work
for them to do.
Don't know why this has happened. I rebotted my computer, but still can not
get MSSQLSERVER 'started.' Can anyone help me here?
Found my answer, and problem is resolved....
"William F. O'Neill" <wfoneill001@.bellsouth.net> wrote in message
news:%23Os0BobgFHA.3936@.tk2msftngp13.phx.gbl...
> Am using SQL Server2000 on WINXP. Have been using this DB since it became
> available. Today, all of a sudden, the Service was not 'started,' even
> tho I had it marked as 'automatic.' Tried to manually start the service,
> and received the message that some services start and stop if there is no
> work for them to do.
> Don't know why this has happened. I rebotted my computer, but still can
> not get MSSQLSERVER 'started.' Can anyone help me here?
>
|||Care to post it here so others can benefit?
Regards,
Hank Arnold
"William F. O'Neill" <wfoneill001@.bellsouth.net> wrote in message
news:e929htcgFHA.3448@.TK2MSFTNGP12.phx.gbl...
> Found my answer, and problem is resolved....
>
> "William F. O'Neill" <wfoneill001@.bellsouth.net> wrote in message
> news:%23Os0BobgFHA.3936@.tk2msftngp13.phx.gbl...
>
|||Was using an evaluation copy of SQL Server, and my Trial time expired.
"Hank Arnold" <rasilon@.aol.com> wrote in message
news:%236K0M%23fgFHA.2904@.tk2msftngp13.phx.gbl...
> Care to post it here so others can benefit?
> --
> Regards,
> Hank Arnold
> "William F. O'Neill" <wfoneill001@.bellsouth.net> wrote in message
> news:e929htcgFHA.3448@.TK2MSFTNGP12.phx.gbl...
>

Saturday, February 25, 2012

Can someone please help with this problem, this is my first time at this forum

Need Help in getting started on a SP in SQL SERVER2000
I need help in writing a stored procedure on SQL Server 2000. Basically the stored procedure's primary task is to generate invoice records and insert the records in a invoice table. In order to generate the invoice records, I have an initial table which are basically Day Records. The task that I would like to complete is to select all records from that initial table and I guess put them into a temp table. Now that i have my temp table, I would like to loop thru the table record by record, and do inserts in the invoice table. I cant seem to figure out the syntax since I am somewhat weak in TSQL Programming. I would appreciate any assistance on this forum or to my email. Also If you need some pseudocode for the process or the DDL for the initial table and the invoice table, I can definitely post that in the forum possibly in the next thread. Please advise, I would need a full written syntax to get me started since i have some other processes that I would need to build using the template. Thanks again.Why do you want to loop through the table instead of running a set-based SQL query against the entire dataset? What you are talking about doing is setting up an SQL Cursor which will step through the data one record at a time, but this is an ineffecient method of handling database data, and is only used when there is no other alternative (very rare) or by VB programmers who don't know TSQL (unfortunately very common).
The task you describe is probably very simple for someone with some knowledge of SQL, but if you are trying to wing-it you are heading into trouble. You need to get some expertise, either in the form of a good SQL Programming turorial or a good SQL consultant.

blindman