.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

SQL SERVER 2000 Using IIF in SELECT Statement

Posted By:      Posted Date: September 12, 2010    Points: 0   Category :Windows Application
Hi Good Guys, I need your help, Please help me. I am trying to retrieve data from SQL SERVER 2000 Table, TBLSupplier whose ActiveStatus datatype is BIT which consist of value 0 (zero) or 1 (one).  to display on the VBNT2008 DataGridView. But the SQL String Select statment is not working. Error message: Incorrect syntax near '=' Select SupplierId, SupplierName, IIF (ActiveStatus =1, 'YES', 'NO') as [Status] from TblSupplier

View Complete Post

More Related Resource Links

Sql Server Select statement

selet * from customer where status&1 = 1 what is meaning for & update customer set status = staus | 1 what is meaning for |

What is fastest way of reading large size XML in SQL Server 2005 using Select statement ?

What is fastest way of reading large size XML in SQL Server 2005 using Select statement ?

SQL Server Linked Server -IBMDASQL SQL select statement does not show rows


Exec ('SELECT * FROM filename') at TST_IBMDASQL

The above SQL statement using Linked Server IBMDASQL, does not show rows it only show the following message:
(1 row(s) affected)

And then if I run the statement, Exec ('SELECT * FROM filename') at TST_IBMDASQL, twice quickly i get the above message then on the second
run i get the message:

OLE DB provider "IBMDASQL" for linked server "TST_IBMDASQL" returned message "SQL0519: Prepared statement S000001 in use.
Cause . . . . . : The application program has attempted to prepare statement S000001. This statement is the SELECT statement for cursor C000001 that is currently open. Recovery . . . : Change the statement name in the PREPARE statement or correct the logic of the application program so that it closes cursor C000001 before attempting the PREPARE statement again.".
Msg 7215, Level 17, State 1, Line 1
Could not execute statement on remote server 'TST_IBMDASQL'.

Its like the whole statement is running on the remote and not returning anything other than the message "(1 row(s) affected)"

This has been working great for years until I formatted the computed and reinstalled everything. Its also working fine on the laptop and at work
and i've compared all settings - all looks ok.

There mus

Saving primary key constraint when creating new table using SELECT INTO statement - SQL Server 2008


Using SQL Server 2008:

We have a main database - MAIN.   For monthly data extracts, I create new tables with relevant data in another database called EXTRACT.

I use SELECT INTO statements to create the tables in the EXTRACT schema.  How do I preserve the primary key constraints in the EXTRACT tables?  Do I need to write separate queries to set them?


Saving primary key constraint when creating new table using SELECT INTO statement - SQL Server 2008


Using SQL Server 2008:

We have a main database - MAIN.   For monthly data extracts, I create new tables with relevant data in another database called EXTRACT.

I use SELECT INTO statements to create the tables in the EXTRACT database.  How do I preserve the primary key constraints in the EXTRACT tables?  Do I need to write separate queries to set them?


sql server 2000 vs 2005


i would like to ask what the difference between sql server 2000 and 2005 

Data Points: XML Features in SQL Server 2000


SQL ServerT 2000 includes several XML features that let you transform relational rowsets into hierarchical XML documents, read XML documents, and bulk load data via XML. For example, you can pass an XML document to a stored procedure, join the XML to some tables and return a rowset, or even modify data in the database.

John Papa

MSDN Magazine June 2005

OLAP: Build an OLAP Reporting App in ASP.NET Using SQL Server 2000 Analysis Services and Office XP


Many organizations analyze their business-critical data using Online Analytical Processing (OLAP) technology. OLAP-based data mining provides a way to query multidimensional data sets and drill down into the data to find patterns. ASP.NET and the Microsoft Office Web Components (OWC) enable Web-based OLAP reporting. The OWC controls include PivotTable and Chart components that can be embedded in a Web page and scripted by programmers. In this article, the authors build a Web-based OLAP reporting app using ASP.NET, OWC, and SQL Server 2000 Analysis Services to illustrate the process.

Jeffrey Hasan and Kenneth Tu

MSDN Magazine October 2003

Metadata: Create a Database Schema Repository with Meta Data Services in SQL Server 2000


SQL Server 2000 Meta Data Services is a repository technology that stores and manages metadata for SQL Server. Instead of building database schemas over and over, Meta Data Services allows you to freeze an entire schema for use in other projects. You can also use these schemas for training, testing, or debugging. In this article, the authors will review the various components of Meta Data Services and show how it can be programmed using a Visual Basic client, XML, and XSLT. They will also show you how to manage and manipulate your metadata by generating a simple database schema using a SQL Server repository.

Alok Mehta and Ricardo Rodriguez

MSDN Magazine May 2003

Scripting SQL: VBScript Interfaces in SQL Server 2000 Let You Transform Data and Provide Reports to


Application service providers often must send information to clients automatically rather than on-demand. For example, a manufacturer may want to know each day how many of their products were sold by a retail chain. While SQL Server is ideal for maintaining this type of database, you have to write scripts to get the data out in a client-friendly format. Here you will see how you can use Data Transformation Services (DTS), a powerful tool in SQL Server, to automate the retrieval and formatting of data from SQL Server 2000 and make the process of pushing data to your users a lot easier.

Alok Mehta and Daniel Williams

MSDN Magazine August 2002

SQLXML 3.0: Build Data-Driven Web Services with Updated XML Support for SQL Server 2000


XML is becoming the ubiquitous data format on the Web, and XML support in SQL Server is evolving to meet the additional demand. Using XML, SOAP, HTTP, and SQL Server, you can now build powerful Web Services easily. To show just how simple it is with SQLXML 3.0, this article walks the reader through the process step by step, from setting up a virtual directory enabling data access via HTTP to executing queries and building Web Services. Finally, the author illustrates the creation of two Web Services clients-one with C# that works with the Microsoft .NET Framework and one with the SOAP Toolkit 2.0 for anyone still using earlier development tools.

Christian Thilmany

MSDN Magazine May 2002

SQL Server 2000 and XML: Developing XML-Enabled Data Solutions for the Web


Using XML for data access allows you to separate the data from the presentation, and promotes reuse, extensibility, and division of labor. XML also has a simplified data model, which promotes easier testing. This article presents and compares five data access approaches, using a variety of technologies including ASP and ADO, XSLT, and DirectXML. Once built, the solutions are compared on the basis of their speed and efficiency.

Scott Howlett and Darryl Jennings

MSDN Magazine January 2002

BizTalk and XML: Add E-Commerce to Your App with XML and SQL Server 2000


XML support in SQL Server lives up to the hype that's always surrounded XML. Using SQL Server 2000, you can send queries over HTTP, save XML records to the database, and retrieve records via XML. This article shows how you can take advantage of these features in SQL Server 2000 by building a database entry system that keeps track of sales and customer information. The sample app presented here uses updategrams to make the database updates. To accomplish this, the mapping and usage of updategrams is explained. In this example, BizTalk is used to illustrate the XML capabilities of SQL Server 2000.

Christian Thilmany

MSDN Magazine January 2002

Server Farms: Application Center 2000 Offers World-Class Scalability


Application Center 2000 simplifies the deployment of a Microsoft .NET-based application to clusters, which are shared-nothing, loosely coupled computers that appear as one virtual computer. This allows all the computers in Application Center 2000 clusters to provide the same service or Web application at the same time. This article explains network load balancing and component load balancing for COM+ components with Application Center 2000. Accessing the features of Application Center 2000 though the MMC snap-in interface and the command-line interface for batching administrative tasks is also covered.

Panos Kougiouris

MSDN Magazine May 2001

SQL Server 2000: New Features Provide Unmatched Ease of Use and Scalability to Admins and Users


SQL Server 2000 includes many new features that extend its capabilities as a high performance relational database system with a rich development environment. This article presents an overview of new product features including AWE support, new data types, new user-defined and built-in functions as well as enhancements in trigger functionality, indexing, collation, and property definition. The article then concentrates on XML support, covering XML data retrieval and manipulation, queries, and HTTP access. It concludes with a discussion of performance improvements in SQL Server 2000.

Carl Nolan

MSDN Magazine August 2000

BizTalk Server 2000: Architecture and Tools for Trading Partner Integration


This article provides an overview of the concepts involved with implementing a trading partner integration system on BizTalk Server 2000 and details the document interchange server architecture and toolset. Additionally, an early look was taken at some business process integration features planned for the production release of the product that allow easy design, execution and sharing of new business processes with trading partners. The concepts and architecture presented allow companies to prepare internal line-of-business applications and trading partners for systems that improve customer service and reduce operating costs.

Aaron Skonnard and Bob Laskey

MSDN Magazine May 2000

SQL Server 2000: New XML Features Streamline Web-centric App Development


With XML support in SQL Server 2000, you can query SQL over HTTP with a URL, bring the data down to the browser, and manipulate it on the client machine. By adding Internet Explorer 5.0 to the mix and using XSL to convert the XML to HTML, you can lighten the load on your database server. Going still one step further, by using Vector Markup Language you can even create drawings on the fly using the data from your SQL queries. This article illustrates this combination of technologies by leading you through the creation of a Web app that queries a digitized street map database that's been imported into a SQL Server database, sorts and displays the data using XML, and draws maps using VML.

Joshua Trupin

MSDN Magazine March 2000

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend