SQL

Technical Article

RE: Copy SP

  • Reply

I have INSERT tbl2 SELECT id,fname,lname from tbl1 WHERE ref# = '123' This works fine but what if I just wanted to insert fname and leave lname out (which would insert NULLS in that column).

You rated this post out of 5. Change rating

2004-12-16

Technical Article

RE: Build query by using function

  • Reply

Try this:  SELECT SerialNumber, PassFail, CASE WHEN [PassFail] = 1 THE 'Pass' ELSE 'Fail' END AS Expr1 FROM TestLog  (Note, this does not include any test for a NULL or any other number..., you may want to look up CASE in BOL and see if you want to include more...)  

You rated this post out of 5. Change rating

2004-12-06

Technical Article

RE: Temporary Network

  • Reply

To use a name you need to ask your network admins to create a record foryour server on DNS server. I also tested creating a DNS alias which is not a machine name but a nice name. We usually use DNS aliases for the Web, but it works fine with SQL ServerYelena

You rated this post out of 5. Change rating

2004-11-19

Technical Article

RE: Help with UPDATE query

  • Reply

..I agree, swap the or for an and....I rewrote the code below and tested it with a positive outcome. IF EXISTS(SELECT patient.F00069, patient.F00026, patient.F01298, patient.F01299, patient.F01300 FROM patient INNER JOIN tumor ON patient.UK = tumor.FK1 INNER JOIN followup ON tumor.FK1 = followup.FK1 INNER JOIN hospital ON tumor.UK = hospital.FK2 WHERE (hospital.F00026 = '0' OR hospital.F00026 = […]

You rated this post out of 5. Change rating

2004-11-09

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