Solved

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

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

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

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…
Read about achieving the basic levels of HRIS security in the workplace.
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…

746 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now