I know similar questions have been asked, but I've not been able to find information specific to my situation.
I'm looking for "continuing education"-type options, specifically a C# and/or SQL course. I'm a software engineering professional with a graduate level computer science degree. So I'm looking for something substantial that will...
"select * from users, awards where (users.id = awards.user_id) and awards.trophy_id not in (select awards.trophy_id from awards where awards.trophy_id = #{trophy.id})"
...
Is there a way of joining results from 2 tables without using JOIN or SELECT from more than one table? The reason being the database im working with requires queries that only contain SELECT, FROM, and WHERE clauses containing only one distinct table. I do, however, need information from other tables for the project i'm working on.
More...
I'd like to be able to work with the discrete tasks (i.e. move the script task separately from the data flow task). If there is an SSIS stencil for Visio that would be great.
...
I'm trying to better understand the concept of 'autocommit' when working with a Postgres (psycopg) connection. Let's say I have a fresh connection, set its isolation level to ISOLATION_LEVEL_AUTOCOMMIT, then run this SQL directly, without using the cursor begin/rollback methods (as an exercise; not saying I actually want to do this):
I...
I am trying to output results of 2 sql queries to one JSON file. The problem is that I would like to order them ascending by distance which is the result of equation that takes homelat and homelon from the users table and lat, lng from locations table.(basically it takes lattitude and longitude of one point and another and computes the d...
How do you decide on which side you perform your data manipulation when you can either do it in the code or in the query ?
When you need to display a date in a specific format for example. Do you retrieve the desired format directly in the sql query or you retrieve the date then format it through the code ?
What helps you to decide : p...
I'm building a database that must work on MySQL, PostgreSQL, and SQLite. One of my tables has a two-column primary key:
CREATE TABLE tournament (
state CHAR(2) NOT NULL,
year INT NOT NULL,
etc...,
PRIMARY KEY(state, year)
);
I want a reference to the tournament table from another table, but I want this reference to b...
In Oracle 10g, I need to update Table A with data from Table B.
Table A has LOCATION, TRANDATE, and STATUS.
Table B has LOCATION, STATUSDATE, and STATUS
I need to update the STATUS column in Table A with the STATUS column from Table B where the STATUSDATE is the max date upto and including the TRANDATE for that LOCATION (basically, I'...
I have two tables, related by a common key. So TableA has key AID and value Name and TableB has keys AID, BID and values Name, Value:
AID Name
74 Alpha
AID BID Name Value
74 4 Beta Brilliance
I would like to update the TableB Value here from Brilliance to Barmy, using just the Name fields. I thought I could do it via an UPDATE ...
Hi,
I have a Customers table and would like to assign a Salesperson to each customer in a round-robin fashion.
Customers
--CustomerID
--FName
--SalespersonID
Salesperson
--SalespersonID
--FName
So, if I have 15 customers and 5 salespeople, I would like the end result to look something like this:
CustomerID -- FName -- S...
I have a table (A) that lists all bundles created off a machine in a day. It lists the date created and the weight of the bundle. I have an ID column, a date column, and a weight column. I also have a table (B) that holds the details related to that machine for the day. In that table (B), I want a column that lists a sum of weights from ...
I'm currently doing this query to find the guy who makes the most calls:
SELECT
`commenter_name`,
COUNT(*) AS `calls`
FROM `comments`
GROUP BY `commenter_name`
ORDER BY `calls` LIMIT 1
What I want now is to be able to find out how many total unique callers. I tried using DISTINCT but I didn't get anywhere.
...
I want to run a basic query, but return only the first ten rows of the table from Netezza
select a.*
from some_schema.some_table a
where rownum < 10
What is the Netezza way of looking at just those few rows?
...
Line 10:
Line 11: <asp:SqlDataSource ID="ac210db6" runat="server"
Line 12: ConnectionString="<%$ ConnectionStrings:ac210db6ConnectionString %>"
Line 13: SelectCommand="SELECT [cid] FROM [customers]"></asp:SqlDataSource><br />
The connection name 'ac210db6ConnectionString' was not found in the ...
In sql server 2008, I have the following query:
select
c.title as categorytitle,
s.title as subcategorytitle,
i.title as itemtitle
from categories c
join subcategories s on c.categoryid = s.categoryid
left join itemcategories ic on s.subcategoryid = ic.subcategoryid
left join items i on ic.itemid = i.itemid and i.site...
I am creating a web site for a customer and they want to be able to create articles. My idea is to tag them so I am going to implement the system.
What is the best design, both from an architectural and a perfomance perspective:
1. To have table with all tags and then have a one to many relationship table that links a tag like this:
...
We have a large table (5608782 rows and growing) that has 3 columns Zip1,Zip2, distance
All columns are currently int, we would like to convert this table to use varchars for international usage but need to do a mass import into the new table convert zip < 5 digits to 0 padded varchars 123 becomes 00123 etc. is there a way to do this sh...
If i have two tables that have nothing in common
I want to do a select as follows:
column from table1, column from table 2
How do I do it?
...
Hi,
I have an Access database (in Access 2003) with several tables, and data must be imported to Sql Server 2005. Access data does not have the same structure as sql server database, so I created various queries which transforms it to format needed by Sql Server. Basically for each table in sql server I have two queries: a Select query ...