Solved

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

Posted on 2003-11-11
5
2,937 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 Tool: Path Explorer

An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
constraint check 2 56
SYbase 4 43
Hardware Resources for a Microsoft database only workstation versus .NET development only.. 6 73
Special characters in a TCPDF 4 26
This article explains all about SQL Server Piecemeal Restore with examples in step by step manner.
These days, all we hear about hacktivists took down so and so websites and retrieved thousands of user’s data. One of the techniques to get unauthorized access to database is by performing SQL injection. This article is quite lengthy which gives bas…
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…
Polish reports in Access so they look terrific. Take yourself to another level. Equations, Back Color, Alternate Back Color. Write easy VBA Code. Tighten space to use less pages. Launch report from a menu, considering criteria only when it is filled…

749 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