Viewing 15 posts - 16 through 30 (of 55 total)
Your initial sum is wrong. It should be referencing the field names from the inner Union query (amt) not FinalAmount, which doesn't exist.
It should be:
select a.CountryName, Sum(a.amt) as Total
from...
July 17, 2014 at 7:45 am
As far as I know MSQuery only works with named ranges. That is all I've ever used.
July 17, 2014 at 6:38 am
Your Welcome! Glad I could help.
FYI - The C:\TestSource ref. was a separate workbook for data; wasn't sure of your setup and wouldn't be required for a single workbook as...
June 30, 2014 at 8:48 am
I had that same problem and it seemed to give me that when I had syntax errors elsewhere in the query. I would double check everything.
June 30, 2014 at 8:30 am
You could do something like the following:
select a.Country, Sum(a.Amt) as Total
from (
SELECT TheBigData.Country as Country, TheBigData.amt as amt
FROM `C:\DataTestSource.xlsx`.TheBigData TheBigData
union all
SELECT TheLittleData.Country as Country, TheLittleData.amt as amt
...
June 27, 2014 at 10:24 am
The other thing you may be running into is that the AS400 requires all tables accessed for anything but reading need to be journalled. If the table(s) you run only...
April 4, 2014 at 9:23 am
This seems to work for all combinations of time values.
Create Table #test (
TestDate varchar(9)
)
Insert into #test
Select '0'
union
select '01:00:22'
union
select '39:00'
union
select '02:19'
union
select '-03:06'
Select TestDate
...
April 5, 2013 at 11:22 am
order by convert(decimal(5,2),REPLACE(TestDate,':','.'))
Doesn't work for hours:min:sec either: Error converting data type varchar to numeric
April 5, 2013 at 10:55 am
What about a calculated field based on the decimal portion of the internal time representation. Such as:
Create Table #test (
TestDate varchar(9)
)
Insert into #test
Select '0'
union
select '00:22'
union
select '00:39'
union
select '02:19'
union
select '-03:06'
Select TestDate,...
April 5, 2013 at 10:38 am
Do you really need the data in Access?
If not, you could setup a linked table(s) to the source data in SQL and design the report on those tables.
March 13, 2013 at 11:20 am
You're welcome! Glad I could help!
Thx for the feedback.
April 30, 2012 at 3:53 pm
Sorry, missed that.
Looking at the existing functions there isn't one to use. I think you would have to write your own function and do some kind of char. by char....
March 20, 2012 at 9:33 am
While I have never worked with MySQL, looking at the function syntax for it you could use the REGEXP function which looks very close to PATINDEX.
March 20, 2012 at 9:10 am
I'm assuming from the .XYZ file extension that the file is on the IFS file system not the native file system as there is no extension on the native.
To FTP...
February 7, 2012 at 11:15 am
I have been using the following to convert to JDE:
Select (DATEPART(yy, getdate()) - 1900) * 1000 + DATEPART(dy, getdate())
November 22, 2011 at 9:05 am
Viewing 15 posts - 16 through 30 (of 55 total)