Solved

1) Compare text fields in SQL Server, 2) Web Publishing Database

Posted on 2003-11-11
5
2,955 Views
Last Modified: 2007-12-19
Hi guys! I see you are doing a great job out there!
I have read some answers and I wanted to post one or two of mine:
1) Is it possible to use <, >, = (ie compare) text fields in SQL Server? One of the columns in my database is text data type and I cannot thing of any other way than using like and putting each value separately. Is there any other way?
2) What is the best way to publish a table on the Web? My database is SQL Server 2000 and I am using Visual Basic 6 for my projects. So, HTML, right from SQL Server, of XML? Does Visual Basic 6 support XML?
Thanks in advance!
0
Comment
Question by:patrickdrd
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 1

Accepted Solution

by:
eriker earned 75 total points
ID: 9722163
Q1) Yes, you can use > and < to compare text fields in SQL-server.

"Select * from employees where firstname < 'B' " will only give you the employees whose firstname starts with an 'A'

Q2) Are you familiar with VB-scripting? In that case, a connection to your SQL-server from an ASP-page to display data from a tabla is one solution.
0
 
LVL 7

Assisted Solution

by:wsteegmans
wsteegmans earned 75 total points
ID: 9726548
Q1)
Indeed, you can! But pay attention, you're doing just a string-compare, so when comparing, you will get this result ...
'str100' < 'str1000' < 'str2'

Q2)
In SQL Server 2000, there is an additional pack for XML support: SQLXML. So, download it first (SQLXML 3.0 SP2)
http://www.microsoft.com/downloads/details.aspx?FamilyId=4C8033A9-CF10-4E22-8004-477098A407AC&displaylang=en

In the Online Books of SQL-Server, or the MSDN-Chapters, you find a lot of information about querying the SQL-Server with XML as output. You can also create an XSL StyleSheet, so you're output is formatted ...

Here, one article (in MSDN): Accessing SQL Server Using HTTP
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsql/ac_xml1_59m4.asp
0
 
LVL 7

Expert Comment

by:wsteegmans
ID: 9791649
patrickdrd,

Please respond to the answers and give us additional info ...
0

Featured Post

Free learning courses: Active Directory Deep Dive

Get a firm grasp on your IT environment when you learn Active Directory best practices with Veeam! Watch all, or choose any amount, of this three-part webinar series to improve your skills. From the basics to virtualization and backup, we got you covered.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Azure Functions is a solution for easily running small pieces of code, or "functions," in the cloud. This article shows how to create one of these functions to write directly to Azure Table Storage.
Lotus Notes has been used since a very long time as an e-mail client and is very popular because of it's unmatched security. In this article we are going to learn about  RRV Bucket corruption and understand various methods to Fix "RRV Bucket Corrupt…
Video by: Steve
Using examples as well as descriptions, step through each of the common simple join types, explaining differences in syntax, differences in expected outputs and showing how the queries run along with the actual outputs based upon a simple set of dem…
This is a high-level webinar that covers the history of enterprise open source database use. It addresses both the advantages companies see in using open source database technologies, as well as the fears and reservations they might have. In this…

623 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question