Solved

SQL - Case When Statement

Posted on 2011-09-13
20
358 Views
Last Modified: 2012-05-12
SQL 2005 / 2008


In the below SQL Query, I am dividing a set of query to the another.

In some situations, i am getting the values as follows ..

1/0

or 1.0/0

Any number divide by zero is an Error.

So, if the denominator is Zero, then i need to set the value for those rows as 'N/A'

all these values goes to the column : test

I am not able to Cast / Implement the Case When statement on this issue ..!!
SELECT cm.*, ( ( (	SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
FROM			(
					SELECT		FirstName,LastName,	DateOfBirth,dayssupply,ndc,datefilled 
                    FROM		voeorderhistorywide 
                    UNION ALL 
                    SELECT		FirstName,LastName,DateOfBirth,dayssupply,
								ndc,datefilled  
                    FROM		voeorderwide
				)	AS x 
					WHERE		FirstName = 'Rose' AND	LastName = 'Post' AND DateOfBirth = '10/02/1926'
					AND			ndc = cm.ndc AND datefilled >= '03/15/2010') - 
                  (	SELECT TOP 1 dayssupply 
					FROM   (	SELECT	FirstName,LastName,DateOfBirth,dayssupply,datefilled,
										ndc FROM   voeorderhistorywide 
								UNION ALL SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
									FROM   voeorderwide)AS x 
                   WHERE		FirstName = 'Rose' AND LastName = 'Post'  AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc AND datefilled >=  '03/15/2010' ORDER  BY datefilled DESC) ) 

					/ 

                  Datediff(d, (SELECT TOP 1 datefilled 
                               FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderhistorywide 
                                       UNION ALL 
                                       SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderwide)AS x 
                               WHERE  FirstName = 'Rose'
				   AND LastName = 'Post'
				   AND DateOfBirth = '10/02/1926'
                                      AND ndc = cm.ndc 
                                      AND datefilled >= '03/15/2010' 
                               ORDER  BY datefilled ASC), 
                  (SELECT TOP 1 datefilled 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
				   AND LastName = 'Post'
				   AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= '03/15/2010' 
                   ORDER  BY datefilled DESC)) ) * 100.0 AS Compliance , 
         ( (SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
            FROM   (SELECT      FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled 
                    FROM   voeorderhistorywide 
                    UNION ALL 
                    SELECT FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled  
                    FROM   voeorderwide) AS x 
            WHERE  FirstName = 'Rose'
                           AND LastName = 'Post'
                           AND DateOfBirth = '10/02/1926'
                           AND ndc = cm.ndc 
                   AND datefilled >= '03/15/2010') - 
                  (SELECT TOP 1 dayssupply 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                          AND LastName ='Post'
                                     AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) ) as test
FROM   [Udf_compliancemembers] ('Rose','Post','10/02/1926' ) cm

Open in new window

0
Comment
Question by:chokka
  • 13
  • 7
20 Comments
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530028
You can get NULL instead of error by surrounding the entire denominator in a NULLIF function, for example

select 5 / nullif(0,0)

so in your case:


/ 

          NULLIF(
                  Datediff(d, (SELECT TOP 1 datefilled 
                               FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderhistorywide 
                                       UNION ALL 
                                       SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderwide)AS x 
                               WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                                      AND ndc = cm.ndc 
                                      AND datefilled >= '03/15/2010' 
                               ORDER  BY datefilled ASC), 
                  (SELECT TOP 1 datefilled 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= '03/15/2010' 
                   ORDER  BY datefilled DESC)) ) * 100.0 AS Compliance , 
         ( (SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
            FROM   (SELECT      FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled 
                    FROM   voeorderhistorywide 
                    UNION ALL 
                    SELECT FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled  
                    FROM   voeorderwide) AS x 
            WHERE  FirstName = 'Rose'
                           AND LastName = 'Post'
                           AND DateOfBirth = '10/02/1926'
                           AND ndc = cm.ndc 
                   AND datefilled >= '03/15/2010') - 
                  (SELECT TOP 1 dayssupply 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                          AND LastName ='Post'
                                     AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) )
          ,0 )
     as test

Open in new window

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530039
... see lines 3 & 52 above
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530074
actually, i may have line 52 in the wrong place, but hopefully you get the idea.  Here is a fuller example:

declare @denom int

select @denom = 2
select 6 / nullif(@denom,0) as result

select @denom = 0
select 6 / nullif(@denom,0) as result
0
 

Author Comment

by:chokka
ID: 36530107
Throws Syntax Error


1) Well, instead of NULL - Is there any way for us to bring N/A ..!!
SELECT cm.*, ( ( (	SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
FROM			(
					SELECT		FirstName,LastName,
								DateOfBirth,dayssupply,
								ndc,datefilled 
                    FROM		voeorderhistorywide 
                    UNION ALL 
                    SELECT		FirstName,LastName,DateOfBirth,
								dayssupply,ndc,datefilled  
                    FROM		voeorderwide
				)	AS x 
					WHERE  FirstName = 'Rose'
					AND LastName = 'Post'
					AND DateOfBirth = '10/02/1926'
					AND ndc = cm.ndc 
					AND datefilled >= '03/15/2010') - 
                  (	SELECT TOP 1 dayssupply 
					FROM   (	SELECT	FirstName, 
										LastName,
										DateOfBirth,
										dayssupply,
										datefilled,
										ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
							AND LastName = 'Post'
						 AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) ) / 
			 / 

          NULLIF(
                  Datediff(d, (SELECT TOP 1 datefilled 
                               FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderhistorywide 
                                       UNION ALL 
                                       SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderwide)AS x 
                               WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                                      AND ndc = cm.ndc 
                                      AND datefilled >= '03/15/2010' 
                               ORDER  BY datefilled ASC), 
                  (SELECT TOP 1 datefilled 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= '03/15/2010' 
                   ORDER  BY datefilled DESC)) ) * 100.0 AS Compliance , 
         ( (SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
            FROM   (SELECT      FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled 
                    FROM   voeorderhistorywide 
                    UNION ALL 
                    SELECT FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled  
                    FROM   voeorderwide) AS x 
            WHERE  FirstName = 'Rose'
                           AND LastName = 'Post'
                           AND DateOfBirth = '10/02/1926'
                           AND ndc = cm.ndc 
                   AND datefilled >= '03/15/2010') - 
                  (SELECT TOP 1 dayssupply 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                          AND LastName ='Post'
                                     AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) )
          ,0 )
     as test 

FROM   [Udf_compliancemembers] ('Rose','Post','10/02/1926' ) cm

Open in new window

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530133
The syntax error is because I put the code at line 86 in the wrong place ... it should go immediately after the end of the denominator query.

We can get it to say N/A like this, but I recommend getting it to work with NULL first, then adding this in to get N/A:

declare @denom int

select @denom = 2
select 6 / isnull( nullif(@denom,0), 'N/A' ) as result

select @denom = 0
select 6 / isnull( nullif(@denom,0), 'N/A' ) as result
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530161
scratch my last, I didn't take into consideration the conversion from INT to CHAR, so we'll have to get the 'N/A' value a different way ....

But first things first, let's at least get it to NULL first by moving the code at line 86 to the appropriate place...
0
 

Author Comment

by:chokka
ID: 36530174


Just executing ..

your  syntax ...

I am facing  -  this error

declare @denom int

select @denom = 2
select 6 / isnull( nullif(@denom,0), 'N/A' ) as result

select @denom = 0
select 6 / isnull( nullif(@denom,0), 'N/A' ) as result


(1 row(s) affected)
Msg 245, Level 16, State 1, Line 7
Conversion failed when converting the varchar value 'N/A' to data type int.


This is a Complicated situation ..


1) We need to cast the output.

2) N/A appears only when Denominator is N/A. So, i guess we need Case Statement !!

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530180
yes, as I just noted above.  :)

>> But first things first, let's at least get it to NULL first by moving the code at line 86 to the appropriate place...
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530204
let's revert to this example first, then we'll get to the 'N/A' ...

declare @denom int

select @denom = 2
select 6 / nullif(@denom,0) as result

select @denom = 0
select 6 / nullif(@denom,0) as result
0
 

Author Comment

by:chokka
ID: 36530222
declare @denom int

select @denom = 2
select 6 / nullif(@denom,0) as result

select @denom = 0
select 6 / nullif(@denom,0) as result


So, this piece returns NULL ..!! Now, we need to cast this NULL Value to N/A
0
What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

 
LVL 33

Expert Comment

by:knightEknight
ID: 36530238
Do you have this pattern working in your query?
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530260


declare @denom float

select @denom = 2
select isnull( convert( varchar, 44.4 / nullif(@denom,0) ), 'N/A') as result

select @denom = 0
select isnull( convert( varchar, 44.4 / nullif(@denom,0) ), 'N/A') as result

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530276
That is a working example, but I recommend going one step at a time ... first get it to work with just NULL, the later add in the stuff to convert it to N/A.

0
 

Author Comment

by:chokka
ID: 36530326
I face that error - Syntax Part fails ..!!

I understand the intial logic of  select 6 / nullif(@denom,0) as result

But i fail,

NULLIF ( SQL QUERY   ,0 )
SELECT cm.*, ( ( (	SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
FROM			(
					SELECT		FirstName,LastName,
								DateOfBirth,dayssupply,
								ndc,datefilled 
                    FROM		voeorderhistorywide 
                    UNION ALL 
                    SELECT		FirstName,LastName,DateOfBirth,
								dayssupply,ndc,datefilled  
                    FROM		voeorderwide
				)	AS x 
					WHERE  FirstName = 'Rose'
					AND LastName = 'Post'
					AND DateOfBirth = '10/02/1926'
					AND ndc = cm.ndc 
					AND datefilled >= '03/15/2010') - 
                  (	SELECT TOP 1 dayssupply 
					FROM   (	SELECT	FirstName, 
										LastName,
										DateOfBirth,
										dayssupply,
										datefilled,
										ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
							AND LastName = 'Post'
						 AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) ) / 
			 / 

          NULLIF(
                  Datediff(d, (SELECT TOP 1 datefilled FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderhistorywide UNION ALL 
                                       SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                                       FROM   voeorderwide)AS x 
                               WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                                      AND ndc = cm.ndc 
                                      AND datefilled >= '03/15/2010' 
                               ORDER  BY datefilled ASC), 
                  (SELECT TOP 1 datefilled 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= '03/15/2010' 
                   ORDER  BY datefilled DESC)) ) * 100.0 AS Compliance , 
         ( (SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply 
            FROM   (SELECT      FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled 
                    FROM   voeorderhistorywide 
                    UNION ALL 
                    SELECT FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled  
                    FROM   voeorderwide) AS x 
            WHERE  FirstName = 'Rose'
                           AND LastName = 'Post'
                           AND DateOfBirth = '10/02/1926'
                           AND ndc = cm.ndc 
                   AND datefilled >= '03/15/2010') - 
                  (SELECT TOP 1 dayssupply 
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderhistorywide 
                           UNION ALL 
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc 
                           FROM   voeorderwide)AS x 
                   WHERE  FirstName = 'Rose'
                                          AND LastName ='Post'
                                     AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc 
                          AND datefilled >= 
                              '03/15/2010' 
                   ORDER  BY datefilled DESC) )
          ,0 )
     as test 

FROM   [Udf_compliancemembers] ('Rose','Post','10/02/1926' ) cm

Open in new window

0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530340
add parens around the query:

  NULLIF ( (SQL QUERY)   ,0 )
0
 

Author Comment

by:chokka
ID: 36530375
Yeah, i did that ..

If you can copy that code and parse it / complie it ..

You can see the issues .. not exactly executing ..!!!
0
 
LVL 33

Expert Comment

by:knightEknight
ID: 36530414
I can't compile it because I don't have the tables, but in principle, this should work:



 SELECT (select 6) / nullif( (select 2), 0 ) as result
 SELECT (select 6) / nullif( (select 0), 0 ) as result
 
 note that both the numerator and denominator queries are in parens ... I'm not sure the former is necessary, but I know the latter is because of the nullif.
0
 

Author Comment

by:chokka
ID: 36531214
For Parsing the Syntax, we dont need tables ..!!

We just need to run the compiler ..

There is TICK Mark right next to Execute in the Upper Panel of SQL Query Window .. That helps us to Compile any sql syntax ..!!!
0
 
LVL 33

Accepted Solution

by:
knightEknight earned 500 total points
ID: 36531479
As I said several times, you just need to move the end of the null-if to its proper place:


SELECT cm.*, ( ( (      SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply
FROM                    (
                                        SELECT          FirstName,LastName,
                                                                DateOfBirth,dayssupply,
                                                                ndc,datefilled
                    FROM                voeorderhistorywide
                    UNION ALL
                    SELECT              FirstName,LastName,DateOfBirth,
                                                                dayssupply,ndc,datefilled  
                    FROM                voeorderwide
                                )       AS x
                                        WHERE  FirstName = 'Rose'
                                        AND LastName = 'Post'
                                        AND DateOfBirth = '10/02/1926'
                                        AND ndc = cm.ndc
                                        AND datefilled >= '03/15/2010') -
                  (     SELECT TOP 1 dayssupply
                                        FROM   (        SELECT  FirstName,
                                                                                LastName,
                                                                                DateOfBirth,
                                                                                dayssupply,
                                                                                datefilled,
                                                                                ndc
                           FROM   voeorderhistorywide
                           UNION ALL
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                           FROM   voeorderwide)AS x
                   WHERE  FirstName = 'Rose'
                                                        AND LastName = 'Post'
                                                 AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc
                          AND datefilled >=
                              '03/15/2010'
                   ORDER  BY datefilled DESC) )
                         /

          NULLIF(
                  Datediff(d, (SELECT TOP 1 datefilled FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                                       FROM   voeorderhistorywide UNION ALL
                                       SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                                       FROM   voeorderwide)AS x
                               WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                                      AND ndc = cm.ndc
                                      AND datefilled >= '03/15/2010'
                               ORDER  BY datefilled ASC),
                  (SELECT TOP 1 datefilled
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                           FROM   voeorderhistorywide
                           UNION ALL
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                           FROM   voeorderwide)AS x
                   WHERE  FirstName = 'Rose'
                                   AND LastName = 'Post'
                                   AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc
                          AND datefilled >= '03/15/2010'
                   ORDER  BY datefilled DESC)),0 ) * 100.0) AS Compliance ,

         ( (SELECT 1.0 * Coalesce(SUM(dayssupply), 0) AS sumdayssupply
            FROM   (SELECT      FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled
                    FROM   voeorderhistorywide
                    UNION ALL
                    SELECT FirstName,LastName,DateOfBirth,dayssupply,ndc,datefilled  
                    FROM   voeorderwide) AS x
            WHERE  FirstName = 'Rose'
                           AND LastName = 'Post'
                           AND DateOfBirth = '10/02/1926'
                           AND ndc = cm.ndc
                   AND datefilled >= '03/15/2010') -
                  (SELECT TOP 1 dayssupply
                   FROM   (SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                           FROM   voeorderhistorywide
                           UNION ALL
                           SELECT FirstName, LastName,DateOfBirth,dayssupply,datefilled,ndc
                           FROM   voeorderwide)AS x
                   WHERE  FirstName = 'Rose'
                                          AND LastName ='Post'
                                     AND DateOfBirth = '10/02/1926'
                          AND ndc = cm.ndc
                          AND datefilled >=
                              '03/15/2010'
                   ORDER  BY datefilled DESC) ) as test

FROM   [Udf_compliancemembers] ('Rose','Post','10/02/1926' ) cm
0
 

Author Closing Comment

by:chokka
ID: 36531557
Thanks
0

Featured Post

Top 6 Sources for Identifying Threat Actor TTPs

Understanding your enemy is essential. These six sources will help you identify the most popular threat actor tactics, techniques, and procedures (TTPs).

Join & Write a Comment

Suggested Solutions

Naughty Me. While I was changing the database name from DB1 to DB_PROD1 (yep it's not real database name ^v^), I changed the database name and notified my application fellows that I did it. They turn on the application, and everything is working. A …
This article explains how to reset the password of the sa account on a Microsoft SQL Server.  The steps in this article work in SQL 2005, 2008, 2008 R2, 2012, 2014 and 2016.
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video demonstrates how to create an example email signature rule for a department in a company using CodeTwo Exchange Rules. The signature will be inserted beneath users' latest emails in conversations and will be displayed in users' Sent Items…

705 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now