Someone has accidentally dropped dual table.Now we need dual table and whats the way to bring it back to the original state before dropping of the dual table?
I need to delete a sub set of records from a self-referencing table in SQL Server 2008. I am trying to do the following but it is does not like the order by.
WITH SelfReferencingTable (ID, depth)
AS
(
SELECT id, 0 as [depth]
FROM dbo.Table
WHERE parentItemID IS NULL AND [t].ColumnA = '123'
UNION ALL
SELECT [t].ID, [srt].[depth] + 1 …
Hello,
I have a problem when upgrading a django and mysql app with south.
I've tried to make a sql-based upgrade with the code generated by the django sqlall command and I have a similar problem.
Here is the sql code:
CREATE TABLE `programmations_basissupport` (
`id` integer AUTO_INCREMENT NOT NULL PRIMARY KEY,
`value` numeric(6, 0)…
I have a certain predefined database structure that I am stuck with. The question is whether this structure is OK for ORM or I whether should add a processing layer that would create a more convenient structure every time something is inserted into the original DB.
To simplify, here's what it kind of looks like.
I have a person table:
…
Is there a way to specify a join on all fields from table A with only one field from table B?
Is it necessary to specify each individual field from each table instead of using the all symbol (*) for one of the tables?
I'm currently working on a project, I'll try to subrscibe first. I save data into text file, that I use as a source for browser of that data. The browser is based on table that contains the data. I have to rewrite the source file everytime I delete or edit data. That's where the problem comes in. After deleting or editing data I call a…
I am using SQLexpress and VS2008.
I have a DB with a table named "A", which has an IdentitySpecification column named ID.
The ID is auto-incremented. Even if the row is deleted, the ID still increases.
After several data manipulation, the current ID has reached 15, for example.
When I run the application
if there's at least 1 row:…
I have a mysql table "items" with 2 integer fields: seid and tiid
The table has about 35000000 records, so it's very large.
seid tiid
-----------
1 1
2 2
2 3
2 4
3 4
4 1
4 2
The table has a primary key on both fields, an index on seid and an index on tiid.
Someone types in 1 or more…
Hi
I would like to create a temporary table in a Oracle database
something like
Declare table @table (int id)
In SQL server
And than populate it with a select statement
Is it possible?
Thanks
Hello!
To empty database table, I use this SQL Query:
TRUNCATE TABLE `books`
How to I Truncate table using Django models and orm?
I've tried this, but it doesn't work:
Book.objects.truncate()
Currently I am designing a database for use in our company. We are using SQL Server 2008. The database will hold data gathered from several customers. The goal of the database is to acquire aggregate benchmark numbers over several customers.
Recently, I have become worried with the fact that one table in particular will be…
I am confuse on a concept. I am doing this on rails.
Is that Entity set equal to a table in the database?
Is that Relationship set equal to a table in the database?
Let say we have Entity set "USER" and Entity set "POST" and Entity set "COMMENT"
User- can post many posts and comments as they want
Post- belong to users…
Hi,
I have a small problem.
I am creating an appointment table where in the foreign key is patient id which is referenced from patient table.This table is for all registered patients.
there will be unregistered patients also, who will be seeking appointments.SO i just need to store the name,phone and few…
I am trying to sort the following table:
hYear hSale
------------------------------------
[year] =Count(Fields!sale.Value)
The table only has one row group (year) and no column group.
I'd like to:
-initially sort the table based on the calculated value; is it possible?
-add interactive sort to…
Each member has 0 or more orders. Each order contains at least 1 item.
memberid - varchar, not integer - that's OK (please do not mention that's not very good, I can't change it).
So, thera 3 tables: members, orders and order_items. Orders and order_items are below:
CREATE TABLE `orders` (
`orderid` INT(11) …
Just trying to figure out the best way to design my table for the following scenario:
I have several areas in my system (documents, projects, groups and clients) and each of these can have comments logged against them.
My question is should I have one table like this:
CommentID
DocumentID
ProjectID
GroupID…
I have an Access 2003 database MDB where all of the tables exist as linked tables within SQL Server 2005. The MDB file contains all of the ODBC information that points to the correct SQL Server and log-on credentials (trusted connection).
What I would like to do is add a new linked table to the MDB file…
I can see values shown in my table but I can`t read all of them except the first one using the following code;
function ReadNames () {
$('#Table tr td label').each(function () {
NameID.push(this.id);
});
}
How can I read all the values?The table is poplulated using a click on a dialog box
…
My database contains 3 tables:
User and Service entities have many-to-many relationship and are joined with the SERVICE_USER table as follows:
USERS - SERVICE_USER - SERVICES
SERVICE_USER table contains additional BLOCKED column.
What is the best way to perform such a mapping?
These are my Entity…
I am processing large amounts of data in iterations, each and iteration processes around 10-50 000 records. Because of such large number of records, I am inserting them into a global temporary table first, and then process it. Usually, each iteration takes 5-10 seconds.
Would it be wise to truncate…
In C#, i want to show the first week in a calendar (in a html table) and i am trying to figure out the most elegant algorithm to generate the right days.
If the first day of the week is not Sunday, i want to show the days of preceding month (like you would see on a regular calendar). So, as an…
I'm hoping for an idea on the best way to approach what I'm trying to do.
I have a table with a list of transactions. Each transactions has a PostDate in DateTime format. I have another table holding the fiscal period values. This table has the following columns; FiscalYear, FiscalMonth,…
I have two tables one is members table with columns member id , member first name, member last name. I have another table guest passes with columns guest pass id and member id and issue date .
I have a list view that will displays guest passes details (I.e) like member name and issue…
A view with a table gets pushed onto the screen and I want it to scroll to a certain row in the table before the screen actually displays. I use this code within the final viewcontroller.
NSIndexPath *scrollToPath = [NSIndexPath indexPathForRow:5 inSection:0];
[theTable…