In my gridview after an insert operation has been done I am filtering the sqldatasource by ID. I am getting an error that the item drop down box selected value is not in the list. To test my theory I created a new sql data source with only the select statement and after the insert operation I am binding it to my grid view and filtering b...
OK, my statement executes well in phpMyAdmin, but not how I expect it in my php page.
This is my statement:
SELECT `egid`, `group_name` , `limit`, MAX( `date` )
FROM employee_groups
GROUP BY `egid`
ORDER BY `egid` DESC ;
This is may table:
CREATE TABLE `employee_groups` (
`egid` int(10) unsigned NOT NULL,
`date` date NOT NUL...
I am trying to run the following SQL statement:
"SELECT *, (IIF([Field]=TRUE,'StringValue1','StringValue2') AS [NewField] FROM [Table1] ORDER BY [NewField] ASC"
But this gives me an error "Parameter NewField has no default value". How can I solve it?
I am using Microsoft Access (MDB) database using Jet Engine from Delphi 7.
Thank yo...
I've got a monitoring system that is collecting data every n seconds (n ~=10 but varies). I'd like to aggregate the collected data by 15 minute intervals. Is there a way to corral the timestamp column into 15 minute chunks to allow for grouping to work?
...
I am getting the following nhibernate error when saving an entity (via: NHibernateSession.Save(entity);) despite it being persisted to the database fine
"Value cannot be null.Parameter name: id"
This is my hbm file
<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" namespace="mydatabase.Doma...
I need a formula for showing results on my classifieds website.
I am now done with the paging of records, but this formula for showing results remains.
I want it like this:
Showing 1-50 of 123 found.
Now what is the formula for this?
I have these variables which should be enough I think:
$results_per_page = 50; //results per p...
I'm making a little web based game and need to determine where to put logic that checks the integrity of some underlying data in the sql database.
Each user keeps track of points assigned to him, and points are awarded by various tasks. I keep a record of each task transaction to make sure they're not repeated, and to keep track of th...
Nothing technical here. Suppose I have a lot of different categorized data, and I would like to create a database out of it. Would someone literally hand plug in all that info with SQL code itself? Or do some people make a mock website just to input data? What are some of your strategies?
...
I have a problem with Hibernate Native Query. I have one SELECT that selects array slice (PostgreSQL database).
The problem is that hibernate recognizes the following part: ":300" from "SELECT my_array[1:300]..." as named parameter and I get the following exception: Not all named parameters have been set.
I tried to escape the colon (:...
I have a postgresql table containing movements of different items (models) between warehouses.
For example, the following record means that 5 units of model 1 have been sent form warehouse 1 to 2:
source target model units
------ ------ ----- -----
1 2 1 5
I am trying to build a SQL query to obtain the difference be...
I am working on a webapplication
How can i create SQL for the following
Database Information
User information
Username - String
Password - String
Admin or Client - boolean
Last login – Date/Time
LogItem
typeLogItem – String (Page name?)
hitCount – int
View
PageURL
UserID
Transaction
User – String
DateTimeStamp
SKU – int
Purchase-bo...
How can I translate this SQL into a named_scope? Also, I want the total comments param to be passed through a lambda.
"select users., count() as total_comments from users, comments where (users.id = comments.user_id) and (comments.public_comment = 1) and (comments.aasm_state = 'posted') and (comments.forum_user_id is null) group by user...
If it matters, I'm using Firebird 2.1 database.
I have three tables, one with keywords, one with negative keywords, and the other with required keywords. I need to be able to filter the data so the output has just the keywords that meat the stipulation of not being in the negative keyword list, and IF there are any required words, th...
I have a NoSQL system for storing real estate houses.
One piece of information I have in my key-value store for each house is the longitude and latitude.
If I wanted to retrieve all houses within a geo-lat/long box, like the SQL below:
SELECT * from houses
WHERE latitude IS BETWEEN xxx AND yyy
AND longitude IS BETWEEN www AND zzz
Q...
hi!
I've a table(TableA) with contents like this:
Col1
-----
A
B
B
B
C
C
D
i want to remove just the duplicate values without using temporary table in Microsoft SQL Server. can anyone help me?
the final table should look like this:
Col1
-----
A
B
C
D
thanks :)
...
I've got a SQL Server 2008 table with addresses. I've got some C# code that can individually geocode the addresses. I've got a Google Maps API for geocoding. Now I'm trying to figure out the most efficient way to use these resources.
I could write a console app that manually updates the tables using my C# library, but the data I have...
i save a user like this in doctrine:
$user = User();
$user->name = 'peter';
$user->save();
is there a way to save 20 users in one sql query?
or do i have to loop the above code 20 times hence creating 20 sql queries?
thanks
...
From the SQL::Statement::Functions documentation:
Creating User-Defined Functions
...
More complex functions can make use of a number of arguments always passed to functions automatically. Functions always receive these values in @_:
sub FOO { my( $self, $sth, $rowhash, @params ); }
#!/usr/bin/env perl
use 5.012;
use warning...
Hi,
I have an SQL query that returns an amount of tuples (about 50).
Now I need to display the results, 15 tuples at a time, then I will have a "view more" button to view the next 15 results.
Can you please help me how I can make this? The issue is that I cannot use the 'limits' because each time I run the query the results will be dif...
In Java, I have written a program that reads a UTF8 text file. The text file contains a SQL query of the SELECT kind. The program then executes the query on the Microsoft Access 2007 database and writes all fields of the first row to a UTF8 text file.
The problem I have is when a row is returned that contains unicode characters, such as...