dcsimg
Login | Register   
LinkedIn
Google+
Twitter
RSS Feed
Download our iPhone app
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   FORUMS  |   TIP BANK
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.


Tip of the Day
Language: Visual Basic, Enterprise
Expertise: Beginner
Oct 22, 2002

WEBINAR:

On-Demand

Building the Right Environment to Support AI, Machine Learning and Deep Learning


Find the Cause of Query Malfunctions


This tip is for SQL Server 6.5 and up. When debugging a SELECT query, add an absolute true condition as the first condition of the WHERE clause:
 
SELECT
	au_lname,
	au_fname
FROM
	authors
WHERE
	1=1 --absolute true condition
	and state = 'CA'
	and contract = 1

That way, you can comment out one or more of the real conditions in the WHERE clause using the "- -" comment character sequence to narrow down which condition(s) cause the query to malfunction. When you
Jonathan Goodyear
 
Comment and Contribute

 

 

 

 

 


(Maximum characters: 1200). You have 1200 characters left.

 

 

Sitemap
Thanks for your registration, follow us on our social networks to keep up-to-date