Solved

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

Posted on 2003-11-11
5
2,928 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
  • 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

Netscaler Common Configuration How To guides

If you use NetScaler you will want to see these guides. The NetScaler How To Guides show administrators how to get NetScaler up and configured by providing instructions for common scenarios and some not so common ones.

Question has a verified solution.

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

Suggested Solutions

SQL Command Tool comes with APEX under SQL Workshop. It helps us to make changes on the database directly using a graphical user interface. This helps us writing any SQL/ PLSQL queries and execute it on the database and we can create any database ob…
As technology users and professionals, we’re always learning. Our universal interest in advancing our knowledge of the trade is unmatched by most industries. It’s a curiosity that makes sense, given the climate of change. Within that, there lies a…
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…

789 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