Hi,
I am a bit confused about the uses of these words. I have a table with he following columns: SITE, LAT, LONG, NAME, ......
I want results with unique (or is it distinct) LAT, LONG.
How do I achieve this?
...
My database contains three tables called Object_Table, Data_Table and Link_Table. The link table just contains two columns, the identity of an object record and an identity of a data record.
I want to copy the data from DATA_TABLE where it is linked to one given object identity and insert corresponding records into Data_Table and Link_T...
I have a program I've written in VB.NET 2005, it saves statistics in an xml file. I use this program on multiple computers. I'd like to set up a webserver where I can upload my xml file, or just the data, and add it to the server ignoring duplicate entries already on the server. What do I need for to learn for this? SQL? Any ideas w...
How do you prepare your SQL deltas? do you manually save each schema-changing SQL to a delta folder, or do you have some kind of an automated diffing process?
I am interested in conventions for versioning database schema along with the source code. Perhaps a pre-commit hook that diffs the schema?
Also, what options for diffing deltas e...
I have two tables in my database, called ratings and movies.
Ratings:
| id | movie_id | rating |
Movies:
| id | title |
A typical movie record might be like this:
| 4 | Cloverfield (2008) |
and there may be several rating records for Cloverfield, like this:
| 21 | 4 | 3 | (rating number 21, on movie number 4, givin...
Hi,
I am currently trying to import a semi-colon delimited text file into a database in c# using OleDb where I don't know the type (SQL Server, Access, Oracle, MySQL, postgreSQL, etc.) Currently I'm reading in the file as a database using the Jet text reader then creating a prepared insert statement, populating the fields, then commiti...
How can I have a dynamic variable setting the amount of rows to return in SQL Server? Below is not valid syntax in SQL Server 2005+:
DECLARE @count int
SET @count = 20
SELECT TOP @count * FROM SomeTable
...
I have a C# console app "App1" that reads a row of data from a table in a SQL Server 2005 DB. I want App1 to pass all the data in this row to App2, another C# console app. What is the best way to do this?
My first (naive) attempt was to do this:
object[] o = myrow.ItemArray;
// make a string that separates each item by a space... for...
I have the following query in iSeries SQL which I output to a file.
SELECT SSLOTMAK, SSLOTMDL, SSLOTYER, sum(SSCOUNT)
FROM prqhdrss
GROUP BY SSLOTMAK, SSLOTMDL, SSLotyer HAVING sum(SSCOUNT) > 4 ORDER
BY SSLOTMAK, SSLOTMDL, SSLOTYER
When I run it, the field created be the sum(SSCOUNT) is a 31 Packed f...
If I have a datetime field, how do I get just records created later than a certain time, ignoring the date altogether?
It's a logging table, it tells when people are connecting and doing something in our application. I want to find out how often people are on later than 5pm.
(Sorry - it is SQL Server. But this could be useful for o...
I want to return top 10 records from each section in the one query. Can anyone help how to do it. Section is one of the column in the table.
Database is sql server 2005. Top 10 by date entered. Sections are business, local and feature For one particular date I want only top(10) business rows (most recent entry), top (10 ) local rows and...
There's a common way to store multiple values in one variable, by using a bitmask. For example, if a user has read, write and execute privileges on an item, that can be converted to a single number by saying read = 4 (2^2), write = 2 (2^1), execute = 1 (2^0) and then add them together to get 7.
I use this technique in several web applic...
Lets just say you have a table in Oracle:
CREATE TABLE person (
id NUMBER PRIMARY KEY,
given_names VARCHAR2(50),
surname VARCHAR2(50)
);
with these function-based indices:
CREATE INDEX idx_person_upper_given_names ON person (UPPER(given_names));
CREATE INDEX idx_person_upper_last_name ON person (UPPER(last_name));
Now, given_...
I have a table that looks something like this:
word big expensive smart fast
dog 9 -10 -20 4
professor 2 4 40 -7
ferrari 7 50 0 48
alaska 10 0 1 0
gnat -3 0 0 0
The + and - values are associated with the...
What is the most efficient way to read the last row with SQL? The table is indexed on a unique key--the "bottom" key values represent the last row.
Edit: This is for SQL Server.
Thank you
rp
...
what sql query will i need to show the activated server roles in a specific user?
...
I have seen recent updates in term of record sets being updated so that we can scroll back and forth through the data it points to.
My question is why they were initially designed for a forward only traversal. Is there any impact using the new version?
...
Consider a regular web application doing mostly form-based CRUD operations over SQL database. Should there be explicit transaction management in such web application? Or should it simply use autocommit mode? And if doing transactions, is "transaction per request" sufficient?
...
What is the best way to convert an int or null to boolean value in an SQL query, such that:
Any non-null value is TRUE in the results
Any null value is FALSE in the results
...
I need a select from table which does not have column that tells when row was inserted, only timestamp column (values like: 0x0000000000530278). Some data was imported to the table yesterday and now I need to find out what exactly was imported :(
Is there a way to do it using only timestamp info? Here I found that:
Timestamp is a 8 by...