Wrox Programmer Forums
SQL Server 2005 General discussion of SQL Server *2005* version only.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the SQL Server 2005 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
Old February 6th, 2007, 09:45 PM
Registered User
Join Date: Feb 2007
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via AIM to Frankb52258
Default Select 'DIV' ??

I am new to SQL Server 2005. I am debugging a stored procedure that has a statement that starts with Select 'DIV' Region. What is DIV? I can't find it in the book and it is not a column in the table. Region is a column, DIV is not. Any ideas?????

Frank Bartkowski
Old February 6th, 2007, 11:19 PM
Wrox Author
Join Date: Oct 2005
Posts: 4,104
Thanks: 1
Thanked 64 Times in 64 Posts
Send a message via AIM to dparsons

If the statement is literally:


When you execute this in Query Analyzer it will literally return DIV as the output. So, essentially, you are selecting a String Literal through a query.

================================================== =========
I will only tell you how to do it, not do it for you.
Unless, of course, you want to hire me to do work for you.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
^^Took that from planoie's profile^^
^^Modified text taken from gbianchi profile^^
================================================== =========
Old February 9th, 2007, 12:06 PM
Authorized User
Join Date: Oct 2005
Posts: 72
Thanks: 0
Thanked 0 Times in 0 Posts

With the query you specified, even if Region is a column in your table, it is being replaced by the 'DIV' literal value in the output (not on the actual table). Region, in this case, is the column name in the output.

SQL Server Helper
How well do you know SQL? Find out with the free test assessment from SQL Server Helper!!!

Got a SQL Server Question? Ask us here: http://www.sql-server-helper.com/forums/default.asp
Old February 9th, 2007, 01:06 PM
SQLScott's Avatar
Wrox Author
Join Date: Dec 2004
Posts: 338
Thanks: 0
Thanked 2 Times in 2 Posts

Assuming you have the following Regions table with the following data:

RegionID, Region, blah, asdf
-------- ------ ---- ----
1 NW stuff stuff
2 SW stuff stuff
3 NE stuff stuff
4 SE stuff stuff

If you were to run the following query:

SELECT 'div' Region FROM Regions

You would get the following:


Hope this helps...

Scott Klein
Author - Professional SQL Server 2005 XML

Similar Threads
Thread Thread Starter Forum Replies Last Post
z-index problem with select showing through div crmpicco CSS Cascading Style Sheets 3 July 4th, 2008 07:00 AM
Select row in GridView WITHOUT using Select button rao965 ASP.NET 2.0 Professional 1 February 15th, 2008 10:44 AM
Set Div ID value = ttip_<xsl:value-of select='@nam ismailc XSLT 4 January 16th, 2008 05:04 AM
div within a div and inherting the height brettdavis4 CSS Cascading Style Sheets 1 January 23rd, 2007 09:59 AM
windowed object select shows through div crmpicco HTML Code Clinic 1 August 17th, 2005 01:50 AM

Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.