IT Managment

Technical Article

RE: Counting fields with specific values

  • Reply

Try this, it uses function instead of stored procedure. One can modify as needed.use pubs go select * into test from authors go create function fn_Count_fields(@au_id as varchar(11)) returns int as begin declare @res int select @res = sum(  case when au_lname is null or len(rtrim(au_lname)) = 0 then 1 else 0 end +  case […]

You rated this post out of 5. Change rating

2004-11-14

Technical Article

RE: Removal of Foreign Key's from DB.

  • Reply

Here is a modification of the script above to create a batch that would do the work. You would then apply the batch to the given database: select 'ALTER TABLE ' + OBJECT_NAME(parent_obj) + ' DROP CONSTRAINT ' + name + CHAR(13) + 'GO' + CHAR(13) from sysobjects where xtype = 'F'

You rated this post out of 5. Change rating

2003-05-05

Blogs

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...

Snowflake + Azure blob

By

Let’s go back to data platforms today and I want to talk about a...

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