database

Technical Article

RE: A complex problem

  • Reply

Hi, try this one, I hope it will help: select bh.Tank_no, bh.Start_time, bh.End_time, ts.Output_Reading - te.Output_Reading as Trend_Tonne, eds.Output_Reading - ede.Output_Reading as External_Data_Tonne from Batch_History as bh inner join Trend as ts -- Trend start on (ts.Tank_no = bh.Tank_no) and (ts.Time_Stamp = bh.Start_time) inner join Trend as te -- Trend end on (te.Tank_no = bh.Tank_no) […]

You rated this post out of 5. Change rating

2004-12-23

Technical Article

RE: Restore Database to new SQL Server from backup

  • Reply

and to add to Osoba you will need also ,REPLACE if the files existsRESTORE DATABASE MyNwind FROM MyNwind_1 WITH NORECOVERY, MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\NewNwind.mdf', MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL Server\MSSQL\Data\NewNwind.ldf', REPLACERESTORE LOG MyNwind FROM MyNwindLog1 WITH RECOVERY  

You rated this post out of 5. Change rating

2004-12-21

Technical Article

RE: Stored Procedure Problem - Exits Prematurely?

  • Reply

Fair point but this wouldn't work if your SP was kicked of by another server process (say, a batch job).I do generally dissagree though... you should always have error handling in your procedures.It's true that serious errors just kill the procedure before your error handler kicks in and you need to cater for that, but […]

You rated this post out of 5. Change rating

2004-11-18

Technical Article

RE: Insert daily records from one table to individual merchant tables

  • Reply

Hi,If it helps - yes you can do away with cursors and still step through everything:-  SET @PK = (SELECT MIN(PK) FROM #Values)   SET @MaxPK = (SELECT MAX(PK) FROM #Values)  WHILE @PK <= @MaxPK   BEGIN--Do whatever you are doingSET @PK = (SELECT MIN(PK) FROM #Values WHERE PK > @PK)   ENDThough i'm not too certain what […]

You rated this post out of 5. Change rating

2004-11-02

Technical Article

RE: Invalid class string when running DTS pkg as scheduled job

  • Reply

I have had this error message when attempting to run a dts package connecting to Oracle when the package was designed on a computer with the Oracle drivers but I was attempting to run it from a computer that did not have the Oracle drivers.   Could you be running the job from a different computer […]

You rated this post out of 5. Change rating

2004-10-11

1 reads

Technical Article

RE: Error while running DTS package

  • Reply

Is is possible that your Ingres table has a column of a custom datatype that SQL Server has no known equivalent for?  Or a size that SQL Server can't handle? You might try pulling one column, and if it works, add a second then a third, until you determine what the problem column is.  Once […]

You rated this post out of 5. Change rating

2004-10-11

Blogs

Real-World SQL Mastery: Your Hands-On, Mess-Free Sandbox

By

Are you ready to take your SQL skills from theoretical to tactical? If you've...

Set a Runtime Variable in an Azure DevOps Pipeline

By

Note: I DO NOT recommend this. Any changes to a pipeline should be in...

A New Word: Symptomania

By

symptomania – n. the fantasy that there’s some elaborate diagnosis out there that neatly...

Read the latest Blogs

Forums

7 sept, scheduled book

By philip.scott

Comments posted to this topic are about the item 7 sept, scheduled book

7 sept, schedlued article

By philip.scott

Comments posted to this topic are about the item 7 sept, schedlued article

6 sept, published book

By philip.scott

Comments posted to this topic are about the item 6 sept, published book

Visit the forum

Question of the Day

Azure Data Lake Storage Gen 2

Azure Data Lake Storage Gen 2 is built on ...?

See possible answers