devxlogo

Tip Bank

Setup for e-mail in SQL Server 7.0

Question: Currently, I use SQL Mail in SQL Server 7.0 with Outlook and Exchange Server. I am sure there were no errors during set up, but when I went to

History of SQL

Question: Where can I find miscellaneous information about SQL on the web? If you know of anyuseful websites with history, general structure, etc…, of SQL, please let me know. Answer:

Condensing rows

Question: I’ve got a table structure that looks like the following:Customer TableCUST_IDNAMECODE_LISTCode TableCUST_IDCODE The code table can have any number of codes for each customer. I’m trying to find a

Datatype – TEXT

Question: I have fields, in which the datatype is TEXT, and I need to know how I can insert and update data from these fields? Answer: If the size of

SQL stored procedures from VB6

Question: We are always getting “stored procedure not found” error messages. We know it is on the server and we can access the db. Any clues? Answer: Well, if you

Coding blank spaces in a select statement

Question: After the line break in the code below, the blankspace between the quotes is not recognized. I am merely trying to indent the second line, but I get nothing.

SQL Substring searches

Question: How do you select all entries that contain a certain substring? Is there a function like InStr() in VB? Answer: Yes, Check out the charindex function which will Return

How to find the top percentage of users

Question: I want to find out the top 5%, 10%, and 30% customers based on their purchases. For example, my table looks like:CustomerID Purchase(in $)1 1002 500Up to 100 customers.