training

Technical Article

RE: database refresh

  • Reply

Yes, it will work as long as you can afford taking the original DB offline for a few moments. quote: Will detatch/attach keep the original database? Will the following steps work? 1.Detatch database 2.Make a copy of the detached database file 3.Attach both files: one to the original db, one to the new db

You rated this post out of 5. Change rating

2003-07-29

2 reads

Technical Article

RE: Count (*)

  • Reply

The way I prefer for this is to use a CASE statement, e.g.: SELECT Sum(Case When Column > 5 Then 1 Else 0 End) As GreaterThan5, Sum(Case When Column < 5 Then 1 Else 0 End) As LessThan5 FROM MyTable You could also do it as two nested select statements: SELECT (Select Count(*) From Table1 […]

You rated this post out of 5. Change rating

2003-07-29

1 reads

Technical Article

RE: UPDATE Query problem

  • Reply

this is for a text field. the 3rd argument needs to represent a multiple length string and up untill this point I thought % would do this. example: SUBSTRING(FIELD,3,%) 'should return the following: CR20AB = 20AB CR509FDS = 509FDS

You rated this post out of 5. Change rating

2003-07-28

Technical Article

RE: Differential backup question

  • Reply

Diferential backups, take the changes since the last full backup. Once you made a diff backup, all the other differential backups you made, are useless. You should backup the full backup to a backup device with init, and backups all the diff backups to a diferent device also with init, to reduce disk space

You rated this post out of 5. Change rating

2003-07-24

Technical Article

RE: view instead of cursor

  • Reply

If you want a single row at a time you can do this: declare @string varchar(255), @col1_value varchar(25) set @string = '' set @col1_value = 'A' select @string = @string + col2 + ' ' from table_1 where col1 = @col1_value print @string If you want multiple rows, you might want to put the code […]

You rated this post out of 5. Change rating

2003-07-24

Blogs

SQL Saturday Boston 2024 Slides

By

Thanks to everyone that came to my talks. Slides are below. Best Practices for...

Small Data SF 2024

By

I can’t remember how I heard about Small Data SF 2024, but it caught...

A New Word: Moledro

By

moledro – n. a feeling of resonant connection with an author or artist you’ll...

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