I want to permantently store all records from my Project_Table into a table called Excluded_Trades where the Project_ID field of Project_Table is equal to 276.
My next operation is to delete these records from Project_Table
Can anyone see what is wrong with this:
UPDATE Excluded_Trades
INNER JOIN Project_Table
SET Excluded_Trades.* = Project_Table.*
WHERE Project_Table.Project_ID = 276;
If I can't use wild cards, how would I do this?
I should add that Excluded_Trades has the same table structure as...
Hi Pivateer, thanks for your reply.
I want to do the join on 'currency pair' and date. Made this effort which was rejected by access:
UPDATE [SE2 Project Table]
INNER JOIN TimeStampData ON ([SE2 Project Table].[Trade Date]=DateValue(TimeStampData.Date_Time)) AND ([SE2 Project...
I have the following query which nicely calculates the standard deviation from my table TSTable where the dates are within a given range and the currency is as defined:
SELECT STDEV(vol)
FROM [SELECT (High+Low)/2 AS vol
FROM TSTable
WHERE (Date_Time Between #6/2/2011# And #6/3/2011#) And...
There is nothing like re-inventing the wheel!
Thanks both for your help, got it working with the timeserial function and also doing it on the fly.
Martin
Thanks for your reply, and the select case.
On the fly is probably best and I may move to that. For now though I am not sure how to apply a user defined function in an SQL statement. Doing...
strSQL = "UPDATE [SE2 Project Table] " & _
"SET [SE2 Project...
Ok I think I have solved it with following functions. But how do I call this function in an SQL statement. is it just:
UPDATE MainTable
SET MainTable.RoundedTime = Module2.RoundedDate(MainTable.TimeStamp)
Function RoundDwn(ByVal InNum As Integer) As Integer
If InNum < 15 Then...
Ok I could do this perhaps using the Datepart function to breakout the minutes, hours etc. In Excel i would glue this back together with the time function. But it seems there is no equivalent in VBA?
On the double click event of chart view I have:
Me.PivotTable.Export "D:\filepath\test.xls", plExportActionOpenInExcel
But this does not give me the chart, just the pivot table and data. It also gives the error "Problems during load".
Doing:
Me.ChartSpace.ExportPicture...
Against all odds, I figured it out myself:
INSERT INTO [Excluded Trades]
SELECT *
FROM [SE2 Project Table]
WHERE [Type Forward/Spot]='Forward' And ([Forward Outright High] Is Null Or [Forward Outright Low] Is Null) And [Project ID]=61;
I want to delete records from one table [Project Table] where there are blanks and add these records to a different existing table [Excluded Trades].
[Excluded Trades] has the same structure as [Project Table].
This query succesfully selects the records to be extracted:
Table [Excluded...
Here is the logic:
if field-a and field-b are in table-y then field-c is set to alpha
here is my SQL
UPDATE TableX
INNER JOIN TableY
ON (TableX.FieldA = TableY.Currency AND TableX.FieldB=TableY.Currency)
SET TableX.FieldC = 'alpha';
But this doesn't update when it should. Where am I...