How can I query the results of two equally designed tables?
if table1 contains 1 column with data:
abc
def
hjj
and table2 contains 1 column with data:
uyy
iuu
pol
then i want my query to return
abc
def
hjj
uyy
iuu
pol
but I want to make sure that if I try to do the same task with multiple columns that the associations ...
I want to store date in my database table in dd/mm/yy format & perform order by on that column. Please help.
...
I have the following setup: Tasks, Accounts and Groups tables. Tasks can be assigned to both individual accounts and groups. I've made two supporting tables: TasksAndAccounts and AccountsInGroups. TasksAndAccounts table has the following fields: TaskId, AccountId, GroupId and AccountsInGroups has AccountId and GroupId fields. I'm trying ...
I want to be able to list all of the users in a given database along with an icon that determines whether they are locked or not. The problem I'm having is querying the "locked" status for a given user, I though it might have been on all_users but it isn't. Can anyone point me in the right direction?
...
I need to see how subsonic generates the SQL Query string.
...
I need to insert a record to a table.
Subsonic builds the query something like this (as far as i know):
INSERT INTO Table1
(Title, Description, RowVersion)
VALUES
(@Title, @Description, @RowVersion)
But i want to remove the RowVersion column from the SQL query bacause its autogenerated by the sql server.
How can i do that?
...
what are the good options to store xml structured data and query the data in MySQL? I know from mysql5.1.5 there is a function ExtractValue() to query the data directly, but due to certain limitations I can only use mysql5.0.x. what I need is to store the data in simple xml format, such as
<person>
<name>My Name</name>
<gender>male</ge...
I have a Lucene index that contains documents that have a "type" field, this field can be one of three values "article", "forum" or "blog". I want the user to be able to search within these types (there is a checkbox for each document type)
How do I create a Lucene query dependent on which types the user has selected?
A couple of prere...
I need to remove semi duplicate records from the following table
ID PID SCORE
1 1 50
2 33 20
3 1 90
4 5 55
5 7 11
6 22 34
For any duplicate PID's that exist I want to remove the lowest scoring record. In the example above ID 1 would be remove. I'm tr...
in my query i have IF(friend.block, 'yes', 'no') and friend.block value is 0 or 1.. but eaither way its putting 'yes'.. any idea?
...
Are there any standard queries that can be run that will show the performance of a SQL Server 2005 database?
Note: I need to know the performance of every aspect of the database.
EDIT:
I am looking for a way to measure the time it takes for typical queries to execute. I am then going to apply indexing to certain tables in the database ...
Hi there,
I'm a bit of a novice when it comes to SQL Server 2005. I have a database containing most of the stored procedures and tables (we'll call it 'GrandDatabase'). Each user has its own separate database named after the user's numbered ID. So I have a database list as follows, for example:
GrandDatabase
100
101
102
...
I need ...
Hi,
I've been having a dilemma for a while now, so I said I'd see what you guys thing before I rest my case.
Ever since I started playing with MySQL I was building query how I though was "the right way", with backticks.
Example:
SELECT `title` FROM `table` WHERE ( `id` = 3 )
As opposed to:
SELECT title FROM table WHERE ( id = 3 )
...
I have two tables. Widgets, which has information about each widget (Color, size, etc); each widget has a unique ID, WidgetID.
The other table is Tests, and it contains information about multiple tests that were run on each widget. This table, therefore, has multiple rows for each WidgetID. It contains information that we can call (Widg...
Hi I have a table which was designed by a lazy developer who did not created it in 3rd normal form. He saved the arrays in the table instead of using MM relation . And the application is running so I can not change the database schema.
I need to query the table like this:
SELECT * FROM myTable
WHERE usergroup = 20
where usergroup fiel...
I notice that when I browse pages in Twitter. Instead of having some like twitter.com/home.php?var1=2&asjfaj...etc. (the most common way), the link is just Twitter.com/#home or twitter.com/inbox or twitter.com/followers. my guess is, they use sessions variables to pass information across pages/ links. is it a good way to do it? w...
Hi,
I have a asp.net web page with a drop down list (RadioButtonList), one of the list item in that list is long text so it wraps to the next line (the list is nested inside a table). I have a auto post back enabled for the list and i handle selection change event. Now if I select that list item with the long text, the selection change e...
Hi,
I need to make query like this:
WHERE Comment like '%ev% 3628%' or Comment like '%ew% 3628%'
the number '3628' is a parametr. So I've tried in my view:
First try:
wherestr = "Comment like '%%ev%% %s%%' or Comment like '%%ew%% %s%%'" % (rev_number, rev_number)
comment_o = Issuecomments.objects.extra(where=[wherestr])
...
I have list of contacts and then I have list of blocked contacts. I need to query contacts that are not blocked. How can I make query where all blocked contacts are filtered out inside the sql query?
...
If I want to code the following in VBA how do I do it
QUERY1:
SELECT field1, Min(field4) AS MinField4, Max(field5) AS MaxField5
FROM Table1
GROUP BY field1;
SELECT Query1.field1, Table1.field2, Table1.field3, Query1.MinField4,
Query1.MaxField5
FROM Query1 INNER JOIN Table1 ON (Query1.field1 = Table1.field1) AND
(Query1...