Stuugie 50 Marketing Strategist

Well, after picking at pritaeas's brain and with a little help internally, I have the following which did the job perfectly:

insert into dbo.tblBank_Indicator_List(Bank_ID, Demographic_ID, Indicator_Type)
select b.Bank_ID, d.Demo_ID, f.BEFI_ID
from dbo.tblBanks as b, dbo.tblBankDemographics as d, dbo.tblEconomicFinancialIndicators as f

This issue is resolved.

Stuugie 50 Marketing Strategist

I'm always in favour of explicitly setting ranges and cells to the worksheets they are supposed to update. When you just use Cells(blah), if the worksheet changes then the new worksheet will change. It also allows for intellisense, which I really like and find very convenient.

Now, I don't know if this corrects your issues because I cannot test this and as Begginnerdev points out, the problem might be with your data so it's tought to say but let me know if the following works or not

Private Sub OKButton_Click()

    Dim ws3 As Worksheet, ws4 As Worksheet
    Dim emptyRow As Long
    Dim x As Long

    Set ws3 = Sheets(3)
    Set ws4 = Sheets(4)
    If UnplannedCategoryComboBox.Value = "Anti-Surge Valve System (AVS)" Then
        emptyRow = ws3.Cells(ws3.Rows.Count, 1).End(xlUp).Offset(1, 0).Row
        With ws3
            .Cells(emptyRow, 1).Value = UnplannedDateTextBox.Value
            .Cells(emptyRow, 2).Value = UnplannedMonthComboBox.Value
        End With
        For x = 2 To 9
            If UnplannedYearComboBox.Value = "200" & x Then ws3.Cells(emptyRow, x + 1).Value = UnplannedDurationTextBox.Value
        Next x
    End If
    ws3.Cells(emptyRow, 11).Value = UnplannedCauseFailureTextBox.Value
    If UnplannedCategoryComboBox.Value = "Centrifugal Gas Compressor (GC)" Then
        emptyRow = ws4.Cells(ws4.Rows.Count, 1).End(xlUp).Offset(1, 0).Row
        With ws4
            .Cells(emptyRow, 1).Value = UnplannedDateTextBox.Value
            .Cells(emptyRow, 2).Value = UnplannedMonthComboBox.Value
        End With
        For x = 2 To 9
            If UnplannedYearComboBox.Value = "200" & x Then ws4.Cells(emptyRow, x + 1).Value = UnplannedDurationTextBox.Value
        Next x
        ws4.Cells(emptyRow, 11).Value = UnplannedCauseFailureTextBox.Value
    End If

End Sub
Begginnerdev commented: Nice code snippet. +8
Stuugie 50 Marketing Strategist

Sure, this should be close to what you need

<html>
    <head>
        <script type="text/javascript">
            function clicky(){
                location.href = 'http://www.daniweb.com';
            }
        </script>
    </head>
    <body>
        <button onclick="clicky();">Next</button>
    </body>
</html>
Stuugie 50 Marketing Strategist

where's the student table? That's an important one.

adil.ghori commented: I did the other one, check the next post +0
Stuugie 50 Marketing Strategist

Looks like good practice for you and your studies/assignment. Good for you for doing this on your own!

adil.ghori commented: thank you +0
Stuugie 50 Marketing Strategist

I'm definitely not dogging the outputting capabilities of a PDF format. Our department secretary creates PDF documents for corporate use every month. I also find them good and easy to create with Acrobat Pro and I just downloaded Foxit Reader and am impressed by that too. I just wish our sources would provide us with better formats for extracting data. The copy/paste method that I was hoping to skirt will still be prevalent and that is unfortunate. Oh well.

Stuugie 50 Marketing Strategist

In my university they started us off by learning Java. I would suggest that too and am of the opinion that once you learn one language, others become easier to learn. Syntaxes may change a bit between languages but they tend to function the same. For example, looping is a very generic topic but important in (probably) all languages. As for resources, try here. Books help too but there are many and I can't be specific for you at the moment.

Stuugie 50 Marketing Strategist

Oh, and I was able to successfully share this with LinkedIn

Stuugie 50 Marketing Strategist

"I always know the right thing to say, after the right time to say it has passed". ~Ashleigh Brilliant

Reverend Jim commented: I thought of saying that but it was too late. +0
Stuugie 50 Marketing Strategist

Yes, my band and I played in front of 2500 people! What a rush that was.

Have you ever farted in a packed elevator?

cproger commented: lol +0
Stuugie 50 Marketing Strategist

This formula gives me 0s but only in column A. I can't see why you'd have problems with columns B and C unless the cells in those columns are referencing column A cells.

Stuugie 50 Marketing Strategist

Just add a counter of type int and add it to both the if and else if statements. Once in place, add a print line to your final "else" when the user gets it right which will output the counter. I would offer you code but this looks like an assignment and we get our hands slapped when we post solutions to assignments.

Here's the last print lines, you should be able to figure out the rest I think

System.out.println ("good! you guessed correct");
counter +=1;
System.out.println("It took you " + counter + " tries.");
Stuugie 50 Marketing Strategist

Thanks a lot for the link LastMitch, it helps a lot.

Stuugie 50 Marketing Strategist

Thanks a lot for those links LastMitch, I searched sqlservercentral but my search criteria didn't get me that thread and the Googles didn't get me that great blog.

Stuugie 50 Marketing Strategist

Granted but at the time you jump, the moon moves slightly out of the way and you float for eternity in space.

I wish I could time-travel!

cproger commented: :) +0
Stuugie 50 Marketing Strategist

Granted but the moment you get into it you'll be electrcuted.

I wish I didn't eat that!

cproger commented: lol +0
Stuugie 50 Marketing Strategist

Print "Who?" once? I can't see it looping because i will never be < 2 when it starts at 5. That being said, the only print should be "Who?".

Stuugie 50 Marketing Strategist

97 I like outmeal-raisin cookies

cproger commented: :) +0
Stuugie 50 Marketing Strategist

Saturday December 15, 1973. Ahh, I remember that like it was yesterday! Oh wait, I'm only remembering yesterday.

Stuugie 50 Marketing Strategist

Yes it does but you should really think about looking at why it works compared to your code that you provided. It has been brought to my attention, and rightly so, that I may have in fact helped you cheat on an assignment but I really hope not. Cheating on an assignment won't help you at exam time. That aside, you really need to understand your loops and indexing better. Perhaps another read of the chapter from your text book would be a good idea.

Stuugie 50 Marketing Strategist

Hi, You need to watch your indexing with arrays. At one point you index with a double type and at other points you indexed movies with just a 0. I've clean up your code a bit and made a couple alterations and I think it works the way you need it to now. Please though, print out both codes and look at the differences. Not to say what I gave you is perfect but I don't write a lot of Java.

import java.util.Scanner;
/**
 *
 * @author Stuugie
 * All work already done, helped with errors.
 */
public class OnDemandMovieHits1_AngelaBransley 
{
    public static void main(String[]args)
    {
        String[] movieName = new String[7];
        Scanner input = new Scanner (System.in);
        System.out.println("Enter the name of 7 movies that can be purchased");

        for (int i = 0; i < movieName.length; i++)
        {
            System.out.println("\nEnter movie " + (i+1));
            movieName[i] = input.nextLine();
            System.out.println("\nThe name of the movie " + (i+ 1) + " is: " + movieName[i]);
        }
        double[]moviePrice = new double [7];
        System.out.println("Enter the cost of each movie");
        //double digit[7];


        for (int i = 0; i < moviePrice.length; i++)
        {
            System.out.println(" The cost for the movie: " + movieName[i]+ " is: ");
            moviePrice[i] = input.nextDouble();

        }
        System.out.println("movie name    ticket price");

        for (int i = 0; i < movieName.length; i++)
        {
            System.out.println(movieName[i] + "                 $" + moviePrice[i]);
        }
        String movie;
        System.out.println("Select the movie you want to see: ");
        movie = input.next();
        double totalMoviePrice;

        boolean pickCheck=false;
        boolean checked=false;
        for (int i=0;i<movieName.length;i++)
        {
            if (movie.equals(movieName[i]))
            {
                pickCheck=true;
                if …
Stuugie 50 Marketing Strategist

Well, since forums like this contain either retired people or workers that run puppy mills (dog f^^^ers), there's probably a few puppies around. LoL, kidding all, just kidding. :)

Stuugie 50 Marketing Strategist

Having something to sell will often earn you money.

Stuugie 50 Marketing Strategist

I wouldn't know how to rate my learning in the past year. I went from knowing basically nothing about SSIS and writing SQL statements (other than basic select statements) to creating a database that uses SSIS to perform ETL processes that load millions of records into the db each month. My VBA skills keep improving too with regards to automating Excel workbooks. If I wasn't a fulltime student I would be learning and advancing even more.

There's still so much more to learn too, I'm lucky this site exists to help me learn when I get stuck.

Stuugie 50 Marketing Strategist

I said, "you don't need an actual website to do that". If you are a student then learn everything you can about html, css, and even javascript. JorgeM is right though as there are a number of different GUIs out there where anyone with no knowledge of html and etc is needed but if you want to actually learn about building a website from scratch, I wouldn't recommend that route.

Personally I don't write much html, I use SharePoint's gui to set up our internal website but I understand the basics (and maybe a little more) regarding html, css, and jscript.

Stuugie 50 Marketing Strategist

When my own brother shot and tried to kill me. For real!

Stuugie 50 Marketing Strategist

Just as a side note in case this happens again and trim doesn't work. Example, yesterday I was dealing with what looked like white spaces at the end of each string in on of my tables. Therewere two spaces and the table accepted them as white spaces but in fact they were Extended ASCII characters. RTRIM would not remove them and another guru and I spent hours trying to figure out what they were and how to remove them. We had to settle on doing a REPLACE on the strings where the ASCII characters were greater than 54. The data was from a website and no matter what we couldn't see them as characters until we did and ASCII check. So in saying this, if there is ever an issue where the trailing spaces won't trim, run an ASCII check on the last characters and replace them with "".

I can post the exact statement I used later if it is wanted.

Reverend Jim commented: Very good point. +12
Stuugie 50 Marketing Strategist

I agree with IIM, Notepad++ is an excellent text editor for a wide range of code writing (Java, HTML, SQL). In saying that, when I work with Java I prefer to use Netbeans but the learning curve of the software was difficult in the beginning. I like they way you can step through each line of code, watch variables, methods, and classes with Netbeans. While taking the Java intro courses in university, we were supposed to use JCreator but I didn't much care for it so I started using Netbeans right away. Others in my class used and still use BlueJ so there is another option.

Stuugie 50 Marketing Strategist

Google can be your best friend for this too. Query "Android Developement" and you'll find out what you need on your computer to start.

Stuugie 50 Marketing Strategist

You had mentioned Shawshank Redemption Reverend Jim and one of my favorite quotes came from that movie, which I feel applies to my education and the 2 degrees I am working on right now.

He swam through 2 miles of sh%t and came out clean on the other side

That's how I feel right now and in the spring of 2013, I will feel clean.

Stuugie 50 Marketing Strategist

I solved this, it was a simple mistake:

stmt = "select Release_Date From tblRelease_Dates Where (Release_Date Between '" + fileCreatedDate + "' And GETDATE())
Stuugie 50 Marketing Strategist

Hey rotten69, I wouldn't say that math is a huge part of the topics that I mentioned but I found some of the concepts to be tricky to think through line by line. Most of my coding background thus far comes in the form of programming Excel books via VBA, VB.NET, SQL, Java, and C# with the brunt of my limited knowledge in Excel coding. With VBA, I have no problems putting thoughts into code, line by line. However with Java and C#, I have a harder time doing that. Linked Nodes have been my crutch with regards to linked lists and trees as I have a hard time mentally processing how each node via code points to the next node and it's element. I got hung up on this in class and wound up failing it because of when nodes became doubly linked nodes. Since I didn't get that, doubly linked lists, trees, and mapping were never truly understood. I've had classmates tell me not to worry about how or why the code does what it does with regards to nodes but to just memorize the data structures. I don't learn by memorizing, I learn by understanding and I'm still foggy headed if I think about data structures and algorithms.

In saying all that, if you get how nodes and doubly linked nodes work, the structures and algorithms won't be that tough for you to learn. I for one know that if I need to code a tree structure …

rotten69 commented: thanks for the reply +4
Stuugie 50 Marketing Strategist

You could also try and think about some real world possibilities for writing code and then start writing. Why is it called writing code when we type it? Anyhow, practice makes perfect so practice a lot. I just perused the outline for Java in 21 days and there is so much more to learn but at least you have the basics. Other Java areas you should look into are Generics, Lists & Linked Lists, Mapping, Trees, GUIs, and many more but my brain just sto.... :)

Stuugie 50 Marketing Strategist

It's going to take you weeks of well-supported learning and effort

@JamesCherrill, I wish it only took me weeks to learn! I entered the analysis and coding world when I started university 4 years ago and I have years worth of learning to still accomplish.

@joejo, as stated throughout many posts here, it's not just the coding that you are unfamiliar with but the analysis and requirements based design is unfamiliar to you to. I'm curious, are you getting paid by the church or are you volunteering your time? If you are volunteering your time, all should be good but if you've been paid by them and will receive more $$ form them then I would suggest refunding them to save face. Also, has your church considered using Excel? I ask because I'm of the belief that people shouldn't try to re-invent the wheel if they don't have to and Excel would meet most if not all of your requirements, even if you don't know what they are.

Ezzaral commented: Agreed. +14
Stuugie 50 Marketing Strategist

Sorry for the bad first impression.

You can control programs but you can't control people and what they do with their time. Some people troll the interwebs doing stuff like what we have seen from these recent PMs. I've seen it way worse on other forums out there. You all do it up right here and I personally like this site over many, even if I don't post here as often as other sites.

Stuugie 50 Marketing Strategist

After using this site for a day now I have to say that I like its funcionality. However, I don't much care for how my screen blacks out when I hover over an advert. While I know that adverts are important and generate $$, I find this kind of advertising somewhat annoying. Other than that, you have an excellent site cscgal.

Stuugie 50 Marketing Strategist

Hi asif49, I am also working on my degree in computer science, specifically information systems. I landed a darn good job as an information systems analyzer/support 2 years ago (as a student). I have done a fair bit of coding for the department I work for but have now moved into the database world of coding and absolutely love it. In saying this, I have been primarily about analysis and design. There are some nice people in the company I work for from the IT department that have helped a lot with implementing my designs. I have a freedom in this position that I never thought was possible and my department loves having a guy like me around managing their data.

As for travelling the world, I haven't but I am content. Are there really CS positions out there where travelling is possible? I would have figure that our line of work isn't travelable (made that up) because we can do our work for another company in a completely different country from the security of our own homes, thus making travel moot. Any how, this probably isn't the answer you are looking for but I am board while waiting for my post to be solved in another thread.

Cheers and Good Luck!

Stuugie 50 Marketing Strategist

In life, there are really only two types of people: Either you are an a-hole or you are not! All else is moot!

codeorder commented: .interesting. :), brb, got to google.define "moot". +0