Structured Query Language (SQL) is a language for querying databases. Questions should include code examples and table structure. This tag refers to the standard language, not for questions about specific vendor extensions, like MySQL or Microsoft SQL Server, so if you think your question relates to ...
0
votes
2answers
6 views
SQL WHERE LIKE clause in JSF managed bean
Hi i have this managed bean where it makes MySQL queries, the problem here is the SQL statement makes a '=' condition instead of 'LIKE'
Here is the code in my managed bean.
Connection con = ...
0
votes
1answer
9 views
SQL Date to Text
I am running the below query and would like to convert the column 'JVDATE' into just showing the month.
Query:
SELECT
FISCALYEAR, JVDATE, ACCOUNTNUMBER, ACCOUNTDESCRIPTION,
CATEGORY, ...
2
votes
1answer
15 views
restore attach sql database
My old computer crashed and died a couple of weeks ago(motherboard), and I have been able to copy data from the hard drive over to new computer.
Problem is with sql database, I'm not able to restore ...
3
votes
2answers
17 views
Sort table by group with highest sum and displaying individual entries
I have following scenario where i want to order the table and arrange by groups having highest to lowest sum
name score
----------------
abc 10
pqr 9
abc 7
pqr 3
abc 10
...
0
votes
0answers
14 views
triggers are not firing when I use bulk copy in code
I have a trigger called "updateFriendlyURLTitle" in dbo.Aritcle table. When a individual article inserted, that trigger working fine.
But in article importing process: I've used the following codes. ...
0
votes
2answers
29 views
Which table to specify in this update?
I have two tables that are identical in structure. Table1 holds moderated data, table2 holds the rest.
Table 1
+------+--------+---------------+--------+-----------+
| "id" | "name" | "description" ...
0
votes
1answer
22 views
Inserting data using subqueries
I am using the following query to insert data in MS access from another table but getting an error
INSERT INTO PROJECT ([PROJECT].[Target date],[PROJECT].[percent]) VALUES
SELECT [PROJECT ...
0
votes
0answers
18 views
CREATE DATABASE permission denied in database 'master'. Cannot attach the file 'C:\co\App_Data\xxx.mdf' as database 'xxx'
I have a problem with attaching the database with information about users. I'm trying to move the asp.net mvc4 project to the IIS. MS SQL Server 2008 Express.
<add name="DefaultConnection" ...
-1
votes
3answers
63 views
MySQL returns infinite number of values
I am trying to build a autocomplete input for suggesting users to page.
I have a table called 'users' with fields
'id', 'fullname','username', 'picture',
a table 'project_admin' with fields
...
1
vote
0answers
6 views
print some indiviual forms together using visual studio repoter
I'm writing a program using c# and sql. I have some factors and want to print them separately but in one process with visual studio reporter(rdlc).
I can print them individualy now but I don't know ...
-1
votes
0answers
24 views
MySQL - Regex in where for comma list - Bigger or lower than
To set the scene.. The user enters a zipcode min & max.
In the database i then have following fields:
zip_min,
zip_max,
zip_list (Comma list of zipcodes)
The min & max user then enters has ...
0
votes
2answers
35 views
Need mysql DATE related query
I have a table three fields:
ID || Date || Closing price
Where date wise closing price present for a product. I want to calculate last 120 days closing price average for each day.
The table ...
0
votes
0answers
8 views
subquery in JPA on elementCollection?
I've 2 tables:
create table mi_market
(
id int primary key not null,
name varchar not null
)
One market has got many languages
create table mi_market_language (
id int primary key not ...
0
votes
3answers
35 views
How can reduce the time of query
I have a table called ResultValues where I have 6 columns, 4 are integers, 1 is datatime and 1 is varbinary (1640).
Total number of records are '27,389,918' so this table is very huge. now when i ...
0
votes
1answer
12 views
Migrating Datetime to DateTimeOffset
The time has come in the application I am working on to migrate DateTime fields in SQL Server to DateTimeOffset.
Was wondering if there were any automated tools in SQL Server that could help me with ...