I have a slightly modified AccountController that should write a row into a table upon login.
However, the page redirects before the DB action has completed and so nothing is inserted.
I've temporarily solved this by sticking in a Thread.Sleep, but I'm looking for an alternative that makes it appear seamless.
If Not String.IsNullO...
Story: today one of our customers asked us if all the data he deleted in the program was not recoverable.
Aside scheduled backups, we shrink the log file once a day, and we use the DELETE command to remove records inside our tables where needed.
Though, just for the sake of it, I opened the .mdf file with an editor (used PSPad), and se...
Hello, I am trying to make an inner join on a select statement like this:
select *
from (select* from bars where rownum <= 10 )as tab1
inner join (select * from bars where rownum <= 10 )as tab2
on tab1.close=tab2.close
and I get the following error:
ORA-00933 SQL command not properly ended
Any help would be appreciated, thank you!
...
mysql_query("update users set balance=balance+'$pwbalance'-'$totalprice' where memberid='$memberid' and (balance+'$pwbalance'-'$totalprice')>=0")or die(mysql_error());
$count=mysql_affected_rows();
When I echo $pwbalance, it is 40.00;
when I echo $totalprice, it is 40;
So there should be one record to be updated. However, when I echo $...
Hello, I am trying to make an inner join on a select statement like this:
select *
from (select* from bars where rownum <= 10 )as tab1
inner join (select * from bars where rownum <= 10 )as tab2
on tab1.close=tab2.close
and I get the following error:
ORA-00933 SQL command not properly ended
Any help would be appreciated, thank you!
...
I want to inner join with a child table based on ID and get the top Row of the child table,
I am not joining to take any data out of the child table, its just to validate that child table record exists for parent table.
If I dont include TOP row there is chances of getting multiple rows of parent in the result set.
-- Chances of multipl...
I have a paginated list of articles that needs to be sorted by rank but when an article has position <> 0 then it must be inserted in that specific position.
I thought that I can at least have the articles with the correct position extracted for the current page and then sort them in PHP to show then in the proper position.
I want to do ...
I am trying to figure out the most efficient way to format this query.
I have three tables - Transaction, Purchase and Item.
The desired result is to select sales data (quantity/sales total) for each item for a specific client.
the tables are formatted as follows: (=primary key)*
Transaction: Transaction_ID*, Timestamp
Purchase: P...
In this post "select with nested select" I read that SQL Compact 3.5 (SP1) support nested SELECT clause. But my request not work:
t1 - table 1
t2 - table 2
c1, c2 = columns
select
t1.c1,
t1.c2,
(select count(t2.c1) from t2 where t2.id = t1.id) as count_t
from
t1
Does SQL Compact 3.5 SP1 support nested SELECT clause in this c...
SELECT * FROM myDateTable
WHERE date_Start
OR date_end
BETWEEN DateValue('" & CoverMonth_start & "')
AND DateValue('" & CoverMonth_end & "')"
TheCoverMonth start and end dates are looping from January to December. This query is suppost to select only the records WHERE date_Start OR date_end BETWEEN DateValue... B...
Hi,
How to compare a date/time via VBA with a date/time in an Access DB?
The query I use
adoRS.Open "SELECT * FROM currentpositions WHERE ((currentpositions.
[dateLT])=" & "#" & date_from_message & "#" & ")", adoConn, adOpenStatic,
adLockOptimistic
I only achieve to compare a date.
Anybody an idea?
Regards
Camastanta
...
I am trying to find impact of doing DDL statement against deleted and inserted logical tables inside table trigger. I have:
CREATE TRIGGER [Trigger52]
ON [dbo].[Table1]
FOR DELETE, INSERT, UPDATE
AS
BEGIN
create table inserted (c1 int)
select * from inserted
END
When it is triggered, I expected to g...
Hello, I have a table which has columns of price and date, ordered by the ascending dates. I need to calculate from this a return vector where return = price ( i) / price ( i- 1). The time is not time based, which means that one record can be at 9h34, the next at 9h35, then 9h40 etc...
I have found the following topic:
SQL Syntax for ca...
Hi,
After entering code to create a new table in SQL ORACLE, would the changes be saved if I was to log out of the SQL Session?
...
How do I append only distinct records from a master table to another table, when the master may have duplicates. Example - I only want the distinct records in the smaller table but I need to insert/append records to what I already have in the smaller table.
...
I have the following view which contains this data
ActivityRecId RegionRecId IsExcluded
1 null 1
2 null 1
3 1 1
3 2 1
4 1 1
5 null 0
What I would like to do is join the region table to the view above to get the fo...
When running a SQL statement or a stored procedure on a database, can you connect to an external database and pull data from there?
something like:
SELECT a.UserID, b.DataIWantToGet
FROM mydb.Users as a, externaldb.Data as b
...
I have two php files so far, test.php:
<?php
include("../config_conn_fordon_db.php");
include("../config_open_db.php");
// Fix Special Characters
mysql_query("SET NAMES 'utf8'") or die(mysql_error());
mysql_query("SET CHARACTER SET 'utf8'") or die(mysql_error());
$root = realpath($_SERVER["DOCUMENT_...
Hi all,
I'm trying to create a little test application which reads chunks of a FileStream and appends it to a VarBinary(max) column on an SQL Server 2005 Express.
Everything works - the column gets filled as it's supposed to, but my machine still seems to buffer everything into memory and I just can't see why.
I'm using the following ...
What is the most straightforward approach to producing a data set that can be used in a SQL Server Reporting Services report to display the following:
SalesPerson # Sales # Gross Profit
John Doe 100 $140,000 $25,000
Everyone Else (Avg.) 1200 $2,000,000 $250,000
Jane Smith ...