Hello,
If there an easy way to get a completed SQL statement back after parameter substitution? I.e., I want to keep a logfile of all the SQL this program runs.
Or if I want to do this, will I just want to get rid of Parameters, and do the whole query the old school way, in one big string?
Simple Example: I want to capture the outp...
I have an Access 2007 database where I have two tables, exp_cash and exp_cheque. Both are linked to exp_cat, where exp_cat contains categories list, and exp_cash and exp_cheque contain id, cat_id, exp_date, exp_amount, and exp_note.
When I tried to combine them nothing appears in the result unless I remove the cat_name from my query. I...
I am trying to create a new table by copying an existing table in SQL Server 2008 using Management Studio. The existing table contains no data. I am using the following code but am receiving an error for Incorrect Syntax near AS. I am not sure what is wrong here. I am a SQL newb and any help would be appreciated. Thanks.
CREATE TABLE D...
I currently have a web-application that implements a rudimentary form of ACL using UNIONs in mysql, but it's somewhat limited, and doesn't necessarily scale that well
I'm interested in any alternative ACL algorithms that could be implemented efficiently in SQL.
Thanks!
...
Using MS SQL 2005,
Table 1
ID | T1Value | T2ID | GroupID
----------------------------------
1 | a | 10 | 1
2 | b | 11 | 1
3 | c | 12 | 1
4 | a | 22 | 2
Table 2
ID | T2Value
----------------
10 | H
11 | J
12 | K
22 | H
I want to clone the dat...
Hello,
in MySQL, I have table. One column has auto-increment. When I insert something
mysql_query('INSERT INTO `table` SET `column` = "data";');
Now, what I want is, without further queries, to get the value of the auto-incrementing column, maybe like this:
mysql_query('insertion = (INSERT INTO `table` SET `column` = "data");
SELEC...
Hello everybody,
I working on a project with Hibernate and we need to replace Hibernate with some "home made persistence" stuff.
The idea is that the project is big enough, and we have many HQL queries.
The problem is with the queries like
select a,b from table1, table2 on t1.table1=t2.table2
Basically all joins are not supported by ...
Hi,
Does anybody know if there is any program able to create beans classes from a SQL file ?
Thank you.
...
Are there any updates in SQL 2008 to allow a variable for the IN of a where clause?
Declare @InParams varchar(100)
Set @InParams = '1,2'
Select * from Category
Where CategoryID in @InParams
...
I tried to uses aliases in postgres for this query, but postgres stops and complains that ERROR: column "subtotal" does not exist
SELECT SUM(price) AS subtotal,
subtotal * 3.0 AS fees,
(subtotal + fees) AS total
FROM cart
You cannot use aliases as part of your next column?
...
I've experimented with a number of techniques for monitoring the health of our SQL Servers, ranging from using the Management Data Warehouse functionality built into SQL Server 2008, through other commercial products such as Confio Ignite 8 and also of course rolling my own solution using perfmon, performance counters and collecting of v...
Hi all,
So I've got a web app running on .net 3.5 connected to a SQL 2005 box.
We do scheduled releases every 2 weeks.
About 14 tables out of 250 are full text indexed.
After not every release, but a few too many, the indexes crap out.
They seem to have data in there, but when we try to search them from the front end or SQL enterpris...
i've three tables related.
images:
id | filename | filesize | ...
nodes:
image_id | tag_id
tags:
id | name
And i'm using this query to search images containing x tags
SELECT images.* FROM images
INNER JOIN nodes ON images.id = nodes.image_id
WHERE tag_id IN (SELECT tags.id FROM tags WHERE tags.tag IN ("tag1","tag2"))
GROUP BY ima...
Hi, I'm using Visual Studio 10 and I just created a Database using SQL Server CE. Within it, I made a table CSLDataTable and that automatically created a CSLDataSet & CSLDataTableTableAdapter.
The three variables were automatically created in my MainWindow.cs class:
cSLDataSet
cSLDataTableTableAdapter
cSLDataTableBindingSource
I ...
Is that possible that MySQL can handle grouping of data according to age bracket?
In my users table, age value is their actual age. I want to group them according to age bracket. For example:
ages below 1 year old as age1, 1-4 yrs as age2, 5-9 yrs. old as age3 and so on.
...
Hello..
I am working on a personal project where I need to manipulate values in a database-like format.
Up until now I have been using dictionaries, tuples, and lists to store and consult those values.
I am thinking about starting to use SQL to manipulate those values, but I don't know if it's worth the effort, because I don't know an...
Excuse me for posting a similar question. Please consider this:
date value
18/5/2010, 1 pm 40
18/5/2010, 2 pm 20
18/5/2010, 3 pm 60
18/5/2010, 4 pm 30
18/5/2010, 5 pm 60
18/5/2010, 6 pm 25
19/5/2010, 6 pm 300
19/5/2010, 6 pm 450
19/5/2010, 6 pm 375
20/5/...
I have a text file sitting on client machine and want to move it to the database server (MS SQL 2008) but I don't have any access to the server except through the SQL Server client. Can I transfer this file to the server using SQL client connection?
...
Can I have a SQL query to get the data from columna in tableA whose values don't start with 'f' ?
For example:
select * from tableA where columnA
where values don't start with letter 'F'.
...
Problem
72 child tables, each having a year index and a station index, are defined as follows:
CREATE TABLE climate.measurement_12_013
(
-- Inherited from table climate.measurement_12_013: id bigint NOT NULL DEFAULT nextval('climate.measurement_id_seq'::regclass),
-- Inherited from table climate.measurement_12_013: station_id integer...