Archive for September, 2009

Microsoft Access 2003: How can I make the value of a WHERE in SQL SELECT statement depend on a field within…?

September 27, 2009 - 11:15 am 2 Comments

Microsoft Access 2003: How can I make the value of a WHERE in SQL SELECT statement depend on a field within the query?

For example: In XYZ Query, having Field1, Field2, Field3, Field3 has a SQL SELECT * FROM ABC Table WHERE Field1 (from ABC Table) = Field1 (from XYZ Query). I want to make it so that the value in Field1 (ABC Table) will be filtered depending on the value of Field1 (XYZ Query).

Specifically: I have a table named Table1 with fields SNumber and Quantity. The value of the fields are as follows respectively: 001, 10; 001, 15; 001, 30; 002, 25; 003, 35; 004, 5; 004, 15. I have a query named Query1 that shows the total of Table1 with fields SNumber and Total. The value of SNumbers are those the value of SNumbers from Table1 but with duplicates such as 001; 002; 003; 004 only and will show the total of the Quantity from Table1.

I made an expression in Query1, Total (field): (SELECT SUM(Quantity) FROM Table1 WHERE SNumber(*this refers to SNumber of Table1)=How(*The SNumber field from Query1)). I want the query to filter the quantity to sum.

The query should produce this output:
Query1
SNumber——–Total
001—————-55
002—————-25
003—————-35
004—————-20

Based on the data from this table
Table1
SNumber——–Quantity
001—————-10
001—————-15
001—————-30
002—————-25
003—————-35
004—————-5
004—————-15

Please send me a YM at goshenite_2004 for more info.

SELECT SNumber, SUM(Quantity) As Total FROM Table1
GROUP BY SNumber

Who are the morons that watch over this site and delete people’s questions?

September 27, 2009 - 11:15 am 10 Comments

You should be more concerned about abuse and discrimination, not deleting questions that are innocent and not offensive.
It’s good they don’t allow kids under 13 - the age limit should be 18 because of all the XXX content here. I have never seen so much abuse in one spot. Someone made the statement of raping a child and liking it….but my questions get deleted?

I noticed that too, some people post repeat questions that are purposely racist, sexist or out right offensive and every day they are on here posting away, and Ive seen questions that are thought provoking and honest and they are gone as soon as they are posted because people are morons

10 Points for best updates to this statement by Archbishop Sheen?

September 27, 2009 - 11:14 am 5 Comments

This statement was originally written in regards to some Christians by Archbishop Sheen. Since then, we have many more folks of different religions, including those who believe you cannot know, or believe there is no God, who make untrue statements about Catholics that may appear true to them.

There are probably many ways to update this; I’d like your suggestions.

from Preface
by Rt. Rev. Msgr. Fulton J. Sheen, D.D.
There are not over a hundred people in the United States who hate the Catholic Church. There are millions, however, who hate what they wrongly believe to be the Catholic Church—which is, of course, quite a different thing. These millions can hardly be blamed for hating Catholics because Catholics “adore statues”; because they “put the Blessed Mother on the same level with God”; because they say “indulgence is a permission to commit sin”; because the Pope “is a Fascist”; because the “Church is the defender of Capitalism.” If the Church taught or believed any one of these things it should be hated, but the fact is that the Church does not believe nor teach any one of them. It follows then that the hatred of the millions is directed against error and not against truth. As a matter of fact, if we Catholics believed all of the untruths and lies which were said against the Church, we probably would hate the Church a thousand times more than they do….

From Radio Replies Volume 1, first published in 1938

A common misrepresentation in the media nowadays is that Catholics are haters when we practice our religion, so that could be inserted somehow in the above quote. We do love the sinner, but hate the sin.
People might misunderstand us because they believe priests should be married which is not allowed.

They may suppose incorrectly that we discriminate against women, when women work in many areas of the Chruch; we need to work on racism more than discrimination against gender.

The media will often make statements that imply the Church is wrong for the ban on artificial contraception, sterilization, stem cell research, abortion, artificial insemination, and illegal marriages.

There is nothing new under the sun. I think Archbishop Sheen made a great statement that can work well to help us view other Christians more charitably. My question is meant to expand this outreach to agnostics and atheists.

It is perfect the way it is. One minor statement can be said in regard to scandals in the church is that one must separate the sins of man from the divine institution. It would be nice to see programming like his on mainstream T.V. again

"If voting changed anything, they’d make it illegal." –is this a true statement?

September 27, 2009 - 11:14 am 3 Comments

I’m inclined to think it’s true. All political parties are just part of the machine, even those smug libertarians. All politicians are cut from the same cloth. It’s all rich guys getting the not-so-rich to play ball and go into debt, whether it’s at the checkout or at tax time or at the bank or wherever. *And* get your kids to join the military and "keep us free" while theirs go to college so they can lead the next generation of the process. No election ever changed that. Is it all a farce?

definitely true!

Blacksunshine, "usurper", are you referring to the elections shrub stole?

What is the Walt Disney Companys motto , mission statement , and symbol ?

September 27, 2009 - 11:14 am 1 Comment

What is the Walt Disney Companys motto , mission statement , and symbol ? or any good walt disney company websites would be a great help !!

The official Website of the Company is the best way to find out:
http://corporate.disney.go.com/corporate/overview.html

What is the best way to research hundreds of companies’ financial statements?

September 27, 2009 - 11:14 am 4 Comments

I would like to do stock research on public companies using their financial statements on spreadsheet. I would like to downloand them to Excel for my investment research. Punching numbers by hand is hassle I need many companies. What is the best way?
What I want to do is customized ratio analysis, for example sales volatility calculation, of multiple companies in the easiest way.

There are two Yahoo groups that can help you get a lot of information into EXCEL from the web:

http://tech.groups.yahoo.com/group/xltraders/
http://finance.groups.yahoo.com/group/smf_addin/

The first group has files in the library that use combinations of VBA and web queries to get information into EXCEL. The discussion board can also be very helpful in helping you find specific solutions.

The second one is my group. In the files area, you can find a free open-source EXCEL add-in, documentation, and templates that can grab information from the web using user-defined functions.

One good source for an enormous amount of quarterly and annual financial data is AdvFN. For example, on IBM:

http://www.advfn.com/p.php?pid=financials&symbol=IBM

Click on the "Annual Reports" and "Quarterly Reports" button for the detailed info. There is also a "data downloads" button on that page which can download a chunk of information as a CSV file, but you’ll need to go through the free registration process first.

You can also set up web queries to place the annual and quarterly information directly into a spreadsheet. Here’s an example of one I created for someone else:

http://ogres-crypt.com/iqy/advfn-annual-financial-query.xls

After changing the ticker symbol, it will take 20-30 seconds to refresh the queries and get the data for that company.

Complete each statement. Using inductive reasoning, suggest a formula for the sum of the angle measures at the

September 25, 2009 - 12:18 pm 1 Comment

tips of an n-pointed star. Can you deductively prove your formula?

5 Pointed star
m<A + m<B + m<C + m<D + m<E = ?

6 Pointed star
m<A + m<B + m<C + m<D + m<E + m<F = ?

the 6 pointed star is made out of two equilateral triangles (one upside down). So the angles at the tips are 60 degrees.

a 4-pointed star is a square. angles at tips 90 degress.

inductively, i speculate that the 5-pointed star (pentangle) has angles 72 degrees (360/5)

What is wrong with my SQL INSERT INTO statement?

September 25, 2009 - 12:18 pm 3 Comments

Hi.

The statement is:
"INSERT INTO myTable (Address, Interval) VALUES (’C:\\Ads\\myMovie.swf’, ‘189000′)"

But I keep getting an error saying there is an error in the syntax.

I’m using a OleDbConnection to a Microsoft Access Database.

Yes, both coloums exist.
Yes, both values should be strings.
Yes, the table does exist.

Any help would be GREATLY appreciated.
Thanks.

Perhaps the problem is related to the (escaped) backslashes in the values. First try the statement with a more simple value, if that works then everything else is good. The weblink cited below has a code snippet that might solve a backslash problem.

How to subtract results from two SQL select statement?

September 25, 2009 - 12:18 pm 1 Comment

How will I subtract in SQL? For example:

SELECT SUM(rs_amount_conv)
FROM RS_BALANCES_T
WHERE supp_id = :VAR_SUPP_ID_1 AND period_year = :VAR_YEAR_1 AND rs_tran_type_id = 1

SELECT SUM(rs_amount_conv)
FROM RS_BALANCES_T
WHERE supp_id = :VAR_SUPP_ID_2 AND period_year = :VAR_YEAR_2 AND (rs_tran_type_id = 2 OR rs_cr_dtl_id IS NOT NULL)

I am using Oracle Database 10g,

SELECT SUM(rs_amount_conv) - (SELECT SUM(rs_amount_conv) FROM RS_BALANCES_T
WHERE supp_id = :VAR_SUPP_ID_2 AND period_year = :VAR_YEAR_2 AND (rs_tran_type_id = 2 OR rs_cr_dtl_id IS NOT NULL) )
FROM RS_BALANCES_T
WHERE supp_id = :VAR_SUPP_ID_1 AND period_year = :VAR_YEAR_1 AND rs_tran_type_id = 1

You need to subtract the amount from the first with a subquery

is it possible to use an "if" statement in batch files??? and add a yes no question?

September 25, 2009 - 12:18 pm 2 Comments

I’m writing a script code for a user friendly deletion batch file.

@echo off

title delete program

echo delete program will now delete files.

pause

del./f /q /s>NUL

del./f /q /s

echo deletion complete

:again

echo Do you want to quit? [y/n]

YN

if errorlevel 49 goto again

if errorlevel 21 goto end

:end

echo Quitting the Master delete program program.

————————————————————————-
the information above I got from this website :

http://www.palmtoppaper.com/ptphtml/25/pt250058.htm

what im trying to do is make a batch file that deletes other files but not itself until the very end, where I want to put an if statement that says if the user answers yes to the Exit? question it deletes the batch file.

but I dont know how to add the exit y/n question or the if statement. and I want to hide the output of the del. command.
to make it look neater!

thats all!! all answers are much appreciated!!

Here’s a snippet that might help. Save this as "test.bat"

It uses the "del" function to ask a yes/no question. You can do what you want in the ":YES" or ":NO" sections. In this case, I’ve added the code needed to for the batch file to delete itself.

=================
@echo off
type nul>%temp%\~YesOrNo.tmp
echo Would you like to delete this batch file now [y/n]?
del /p %temp%\~YesOrNo.tmp >nul
if not exist %temp%\~YesOrNo.tmp goto Yes
:NO
Echo Selected "No"
del %temp%\~YesOrNo.tmp
goto end
:YES
Echo Selected "Yes"
Start cmd /c del test.bat
:END
==================

To hide the output of the del command you can do what I’ve done above in the 4th line of code. You use the ">" redirector symbol to redirect the output of "del" to the NULL device. That’s done with ">nul". This means that the output normally displayed on the screen will be displayed nowhere.