Please start any new threads on our new site at http://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

Our new SQL Server Forums are live! Come on over! We've restricted the ability to create new threads on these forums.

SQL Server Forums
Profile | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Simple judgment error
 Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Alexmandro92
Starting Member

2 Posts

Posted - 03/28/2012 :  11:21:56  Show Profile  Reply with Quote
First sorry for my English. I'm new to this SQL server, I have worked in other languages ??such as MySQL or SQL and tried to make this query in SQL Server 2008: SELECT something FROM table WHERE true and I skip this error: An expression not boolean in a context where a condition is expected, near 'true'. It's weird because in other languages ??that judgment is correct. I want to make it after only having to add "and".

khtan
In (Som, Ni, Yak)

Singapore
17689 Posts

Posted - 03/28/2012 :  11:24:03  Show Profile  Reply with Quote
It is acceptable in one language doesn't mean it will be accepted in all language.
use

where 1 = 1



KH
Time is always against us

Go to Top of Page

Alexmandro92
Starting Member

2 Posts

Posted - 03/28/2012 :  11:27:25  Show Profile  Reply with Quote
Thank you very much. I had not fallen into something so simple :)
Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

India
52326 Posts

Posted - 03/28/2012 :  11:58:18  Show Profile  Reply with Quote
whats the purpose of including this trivial check?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 03/28/2012 :  13:03:48  Show Profile  Reply with Quote
what's the actual CODE

post that



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx


Want to help yourself?

http://msdn.microsoft.com/en-us/library/ms130214.aspx

http://weblogs.sqlteam.com/brettk/

http://brettkaiser.blogspot.com/


Go to Top of Page
  Previous Topic Topic Next Topic  
 Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.08 seconds. Powered By: Snitz Forums 2000