
Since 1998, DevX has helped people start businesses, build websites, and provide enterprise technology to people globally. Interviewing the likes of Microsoft’s co-founder, Steve Ballmer, the publication brings comprehensive, reliable, and accessible insights to the Internet.
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.
Question: I’m still quite new to using SQL and I am designing a database in which I am cataloging resources owned by my company. I am attempting to create a
Question: In SQL Server 6.5, what is the meaning of ‘Error States’? I get this message in a stored procedure.What are these states 1-27. Answer: These numbers provide the context,
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
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.
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
Question: I have developed an application that processes about 40,000 records every time it runs. I am using ADO 2.1 and each record is returning about 100 columns of data,
Question: What is the syntax for doing a cascade delete in SQL? For instance, I have a table with a parent record that has child records in other tables, filtering
Question: In all the Foxpro 5.0 documentation, I can’t find an example on how to update the contents of a field ofa table based on another table. For example, table
Question: When I run a stored procedure which uses cursors to do a selection of counts based on a view, it returns the correct (expected) numbers. However, when I rerun
Question: What is the syntax for inserting multiple records into a single query. I have some files with thousands of records to insert and it’s too slow using Insert into
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:
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
Question: I’m looking for other tools for importing ASCII files to SQL server 7.0 without problems. At this moment I’m missing data and the tools can’t take care of it
Question: I am using SQL+ through COBOL to include a 250 char notes field on a report. If the user has entered a return character in the field (Hex 0A),
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
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
Question: I’m curious to know, if I have a file full of data separated by commas, how do I read stuff from that file into SQL tables? Answer: The fastest
Question: How do I retain the results of a query for use in subsequent queries using SQL Server? Answer: Well, you could either INSERT or INSERT SELECT your query into
Question: Is there a SQL statement for deleting tables like there is for deleting data from tables? Something like:DELETE TABLE NAME or DROP TABLE NAME Answer: Yes indeed, Drop table
JavaScript functions have a special property called arguments, which contains an array of input parameters. Using the “length” property of an array, you can iterate through the array for each
A Recordset without a live connection to a database server is called a disconnected Recordset. After the client machine receives the disconnected Recordset, it can use ADOR Recordset to manipulate
Question: I am having trouble figuring out how to make a report dealing with duplicates. I need to selcet from a table only instances where the first 10 characters of
Question: I’m trying to get the Identity of records as I insert them into my database. I have tried: OrderID = DataConn.Execute(“SELECT @@IDENTITY FROM Orders”). But this returns a syntax
Question: I have a field in one of my SQL Server Database tables which I want to increment every time a user enters a new record. I thought about a
Question: I have a table with a datefield as part of the key. This was needed because it stores historical information. I need to know how to write an SQL
Question: Is there a way to have SQL Server assign values to key fields automatically, so that every time a new record is added it just increases the prior record’s
Question: Please describe the basic components of a table in the relational model. Answer: A table has an intension and an extension. You can think of the intension of a
Question: I have a small SQL Server 6.5 database running on NT Workstation. From my workstation I can ping that machine and I can map a drive to that machine.
Question: I want to use Union to union two different tables, but they are in different databases. An error message told me that I can’t use Union in this way.
