Login | Register   
RSS Feed
Download our iPhone app
Browse DevX
Sign up for e-mail newsletters from DevX

By submitting your information, you agree that devx.com may send you DevX offers via email, phone and text message, as well as email offers about other products and services that DevX believes may be of interest to you. DevX will process your information in accordance with the Quinstreet Privacy Policy.

Search the Tips
Tip Bank > Database Development > Relational Databases

Relational Databases - Page 4

61-80 of 219     Previous     Next
Cascade Delete
by DevX Pro
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 down many levels. How do I delete out of the parent table and all of the children tables in one command?
Datatype - TEXT
by DevX Pro
I have fields, in which the datatype is TEXT, and I need to know how I can insert and update data from these fields?
Deleting Tables
by DevX Pro
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
Establish Referential Integrity
by DevX Pro
How do you Establish Referential Integrity between 2 tables so that when a ticket is deleted from the TICKETS table all associated information in the customer5 table will be deleted?
How to find the top percentage of users
by DevX Pro
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 100 2 500 Up to 100 customers. I am getting the top 5% through: select top 5 percent Purchase,CustomerID from Customer order by CustomerID desc The same is true for the top 10%. I am getting 10 records (assuming I have a total of 100 records). But I don't want to see the first 5 customers, whom I have already seen as a result of the previous query. Is there any way I can write code in order to see only next five records?
Displaying a Record Number for a Table
by DevX Pro
I use an InterBase database with an alias made in BDE. I want to display the record number for a table when I navigate through the records. Your solution >.RecNo always returns –1 because it is a TDataSet.RecNo. Is there another solution?
Select Stored Procedures in MS SQL 7
by DevX Pro
How do I access an MS SQL 7 Stored Procedure that returns a multi-row Dataset through Delphi 3? InterBase allows selecting from a Stored Procedure. MS SQL 7 only allows selects from tables, views, or from a "Rowset Function," but not from a Stored Procedure.
Instructing SQL Server to Participate in a Distributed Transaction
by Jai Bardhan
Besides using a BEGIN DISTRIBUTED TRANSACTION statement, another way to instruct SQL Server to participate in a distributed transaction and inform the Microsoft Distributed Transaction Coordinator ...
Convert Delphi to C++?
by DevX Pro
How can you convert Delphi to C++?
Cumulative Summary in SQL
by DevX Pro
I need a summary-select which summaries cumulative values. This one works in Microsoft Access: SELECT s.nl_item_id, s.nl_value, ( SELECT sum(sub.nl_value) FROM TABLE1 sub WHERE sub.nl_item_id How can I make it work using a BDE-DB2 alias?
Paradox Lock Files
by DevX Pro
I have a Delphi 3 application running on a Novell network, that uses Paradox tables. For some reason, some of the users get the following message every once in a while: File or directory not found: J:\APPS\HOMECARE\PARADOX.LCK J:\APPS\HOMECARE\PDOXUSR.LCK Nothing I do seems to make a difference. I have made sure that every user has the same BDE version (5.0), and I have removed all the old IDAPI files and references. I have set the NET DIR parameter to a directory other than where the tables are, and made sure all users point to the same net directory. I have also moved the executable into a different directory. What is going on?
Put a Variable in a SQL String
by DevX Pro
How can I put a variable in a SQL string? For example: input:=edit1.text; query1.sql.add('select * from address where name like ');
Undeleting Records from Paradox Tables
by DevX Pro
How can I undelete a record from a Paradox table?
Accessing a Client's date&time Within ASP
by DevX Pro
I have an ASP that records a text of notes created by a user. I save this note in a database along with a date&time stamp. If the client is in a different time zone, the app picks up the date&time from my server. I want to pick up the current date/time in the client's time zone. How should I handle this?
Accessing Field Names that Contain Spaces
by DevX Pro
I created an ASP that uses VB script to access an Access 97 database in a test environment. Here is the query used: "select * FROM property WHERE user = '"&theuser&"'" This query works well, but the database in production has the field name "user" replaced with "user #" and we cannot easily change it. How can I make my query use "user #" as the field name?
Accessing Recordset in Another ASP Page
by DevX Pro
I am creating a site with a public area and a secure area, which is broken into three parts. To enter security, the user goes to LogIn.htm and enters their name and PW. Then they can choose to go to area 1,2,or 3. The problem is that I can't seem to access the recordset that was made when they logged in. I used an SQL, retrieving all info for the person who matched login and password, and so on. Now I need to access those records to see if they have "yes" or "no" in a certain field in the DB. What code do I need in order to access the recordset I made during their login?
Use Update Lock to Escalate a Read Lock to a Write Lock During a Transaction
by Jai Bardhan
In a high-volume application, there's a good chance that two separate transactions will both run the SELECT statement and acquire read locks before either can acquire the write lock required for ...
Processing a Transaction on One or More Remote Servers
by Jai Bardhan
In SQL Server 6.5, this command specifies that a distributed transaction managed by Microsoft Distributed Transaction Coordinator (MS DTC) starts and the transaction_name specifies a user-defined ...
Ad rotator logging
by DevX Pro
I have built an ASP-based banner system using the Ad Rotator component. How can I log this information into a database (prefer) and retrieve the number of impressions and click-throughs?
Case Sensitive Comparison With Case-Insensitive Sort Order in SQL Server
by KulBhushan Sharma
You can achieve case sensitive comparison of strings in queries by converting strings to the binary or varbinary datatype. You cannot achieve this with simple string comparisons if you have installed ...
61-80 of 219     Previous     Next
We have made updates to our Privacy Policy to reflect the implementation of the General Data Protection Regulation.
Thanks for your registration, follow us on our social networks to keep up-to-date