TABLES:
student(name,points)
playsin(name->student(name), score)
I'm trying to use:
UPDATE STUDENT
SET points = points + CONSTANT * (SELECT score
FROM PLAYSIN
WHERE playsin.name = student.name);
...
An error-free column name syntax is [My Column] instead of My Column which causes an error.
An error-free string value syntax is '25,00' instead of 25,00 which causes an error.
I'm getting an error using single quotes to enclose values, if the column data type is numeric. Are there any other ways to enclose values safely for string or ...
I have a myisam table and a innodb one. The innodb has an index on a foreign key from myisam. Can MySQL use that index when performing joins?
...
I'm working on my first significant Sql Reporting Services project and am having problems with paging. Most of the reports are already working.
What is happening is that I"m getting different numbers and locations of page breaks between Web Reportviewer, PDF and Word documents. The word is the closest, but none of the three are really...
How can I obtain all stored procedures and their code from SQL Server?
I need to show data that is similar to what SQL Server Management Studio shows, incl. allowing to browse through SP's with code, tables and indexes.
Any hints on how to get this information out of SQL Server? P.S., I'm using C#.
...
Are there any differences between following two indexes?
IDX_IndexTables_1
IDX_IndexTables_2
If there are any, what are the differences?
create table IndexTables (
id int identity(1, 1) primary key,
val1 nvarchar(100),
val2 nvarchar(100),
)
create index IDX_IndexTables_1 on IndexTables (val1, val2)
GO
create index IDX_IndexTab...
I have the following sql query :
SELECT DATE(procedures.start) date, name, COUNT(procedure_types.id) count
FROM `procedure_types`
LEFT OUTER JOIN procedures on procedure_types.id = procedures.procedure_type_id
WHERE (DATE(procedures.start) = '2009-10-24')
GROUP BY DATE(procedures.start), procedure_types.id
ORDER BY DATE(procedures.sta...
I have to run a SQL query using a text value in a label and then run that query and bind data to a gridview. Here's my code in VB.net
Dim myConnection As SqlConnection = New SqlConnection
Dim ad As New SqlDataAdapter
Dim details As New DataSet
Dim detailcmd As New SqlCommand("select student_name,student_id from students where student...
I Would like to select the count of the newly added DISTINCT product_id in the table
ID product_id
1 abc
2 abc
3 cat
4 dog
5 dog
6 man
7 man
8 bat
9 bat
10 abc
11 cat
12 dog
13 dog
I want a query that gives me a similar result from the above table -
dog -2
c...
Hey!
I have a table that has 5 fields and has a total of 400 records. I added a new field which I called 'order' which, as the name suggests, is to keep an order in the records.
Since I added this after the records had been inserted I was wondering if there was a way to populate this field with the current order of the records using so...
I got the following SQLException: "invalid options in all7"
Upon googling the error message, the ONLY hits I saw were Oracle error lists which pinpointed the error at "ORA-17432: invalid options in all7". Sadly, googling for the error # brought up only combined lists with no explanation for the error, aside from this page that said "A T...
Hi!
I'm novice in oracle.I'm using oracle express 10.2.0 but i don't know how to create my own database and where my database is created.(The path of my new database).
...
How do you look up a list of language IDs available within SQL Server?
I am specifically looking if there are any views within sys schema.
...
Hey everyone,
I have a pretty long SQL query that I use to, for all of the users in a particular "region", for a given month, calculate the number of days that they have been on "duty". This is broken down into weekends and weekdays. Here is the php/SQL statement:
$result = mysql_query("
SELECT fname, lname, MONTH( eventDate ) AS MO...
Can I absolutely abandon SQL if I choose LINQ?
If Yes, then, Should I absolutely abandon SQL if I choose LINQ?
After making a connection to RDBMS using DataContext-class, do I actually need SQL?
...
I've been tinkering with SQLite3 for the past couple days, and it seems like a decent database, but I'm wondering about its uses for serialization.
I need to serialize a set of key/value pairs which are linked to another table, and this is the way I've been doing this so far.
First there will be the item table:
CREATE TABLE items (id ...
I've got a SQL 2005 DB full of activity records that include a DateTime column, a DeviceID, and various bits of data. I need a query that will give me a list of date/time ranges based on DeviceID (possibly limited by a start/end time). Also, I would consider a new range as starting at least 60min after the old one ended (if it's less tha...
What is the cost of calling SqlCommandBuilder.DeriveParameters? I understand that a round-trip is required to the DB server to get the parameters. After this is called, will the information be cached by the provider, or will it be re-queried EVERY time this method is called?
...
Is there any way to select, for example, first 10 rows of a table in T-SQL (working MSSQL)?
I think I saw something in Oracle defined as rownum meta variable, used in a following way
select * from Users where rownum<=10
But what about MSSQL?
...
Hi all,
I have multiple sets of measurements. Each set has multiple values in it. The data is currently in a spreadsheet, and I'd like to move it to a real database.
In the spreadsheet, each set of measurements is in its own column, i.e.,
1 | 2 | 3 | ...
0.5 | 0.7 | 0.2 | ...
0.3 | 0.6 | 0.4 | ...
and so on. If I have, say,...