Search Results

Search found 4 results on 1 pages for 'sqlnoob'.

Page 1/1 | 1 

  • Netbeans and EOF

    - by sqlnoob
    Hey there, Java, ANTLR and Netbeans newbie here. I have installed a jdk and netbeans. I started a new project on netbeans 6.8 and i have added the antlr-3.2.jar as a library. I also created a lexer and parser class using AntlrWorks. These classes are named ExprParser.java and ExprLexer.java. I copied them into a directory named path-to-netbeans-project/src/parsers. I have a main file: package javaapplication2; import org.antlr.runtime.*; import parsers.*; public class Main { public static void main(String[] args) throws Exception{ ANTLRInputStream input = new ANTLRInputStream(System.in); ExprLexer lexer = new ExprLexer(input); CommonTokenStream tokens = new CommonTokenStream(lexer); ExprParser parser = new ExprParser(tokens); parser.prog(); } } The application builds fine. The book I'm reading says I should run the program and type in some stuff and then press Ctrl+Z (I'm on windows) to send EOF to the console. Problem is that nothing happens when I press Ctrl+z in the netbeans console. When I run from the command line, ctrl+z works fine. This is probably WAY too much information, but I can't figure it out. Sorry. Probably not a good idea to learn 3 new technologies at once.

    Read the article

  • Open an Access database and run one of its Macros from Excel

    - by sqlnoob
    From Excel, I need to open an Access database and run one of the database's macros. I'm using Excel and Access 2007. Here is my code in Excel: Sub accessMacro() Dim appAccess As New Access.Application Set appAccess = Access.Application appAccess.OpenCurrentDatabase "C:\blah.mdb" appAccess.Visible = True appAccess.DoCmd.RunMacro "RunQueries.RunQueries" appAccess.CloseCurrentDatabase End Sub In the Access Database, there is a procedure named RunQueries in a module named RunQueries. Each time I run this, I get the following error: Runtime error '2485': Microsoft Access Office can't find the object 'RunQueries.' I have also tried: appAccess.DoCmd.RunMacro "RunQueries" and I get the same errors message. Any idea how to do this? By the way, I could go into a long explanation about why I need to do this, but let me just say that I've already argued against it, and I have to do it this way (meaning, I have to use Excel as a frontend to open several Access dbs and run their macros).

    Read the article

  • SQL: Getting the full record with the highest count.

    - by sqlnoob
    I'm trying to write sql that produces the desired result from the data below. data: ID Num Opt1 Opt2 Opt3 Count 1 A A E 1 1 A B J 4 2 A A E 9 3 B A F 1 3 B C K 14 4 A A M 3 5 B D G 5 6 C C E 13 6 C C M 1 desired result: ID Num Opt1 Opt2 Opt3 Count 1 A B J 4 2 A A E 9 3 B C K 14 4 A A M 3 5 B D G 5 6 C C E 13 Essentially I want, for each ID Num, the full record with the highest count. I tried doing a group by, but if I group by Opt1, Opt2, Opt3, this doesn't work because it returns the highest count for each (ID Num, Opt2, Opt3, Opt4) combination which is not what I want. If I only group by ID Num, I can get the max for each ID Num but I lose the information as to which (Opt1, Opt2, Opt3) combination gives this count. I feel like I've done this before, but I don't often work with sql and I can't remember how. Is there an easy way to do this?

    Read the article

  • Categorize data without consolidating?

    - by sqlnoob
    I have a table with about 1000 records and 2000 columns. What I want to do is categorize each row such that all records with equal column values for all columns except 'ID' are given a category ID. My final answer would look like: ID A B C ..... Category ID 1 1 0 3 1 2 2 1 3 2 3 1 0 3 1 4 2 1 3 2 5 4 5 6 3 6 4 5 6 3 where all columns (besides ID) are equal for IDs 1,3 so they get the same category ID and so on. I guess my thought was to just write a SQL query that does a group by on every single column besides 'ID' and assign a number to each group and then join back to my original table. My current input is a text file, and I have SAS, MS Access, and Excel to work with. (I could use proc sql from within SAS). Before I go this route and construct the whole query, I was just wondering if there was a better way to do this? It will take some work just to write the query, and I'm not even sure if it is practical to join on 2000 columns (never tried), so I thought I'd ask for ideas before I got too far down the wrong path. EDIT: I just realized my title doesn't really make sense. What I was originally thinking was "Is there a way I can group by and categorize at the same time without actually consolidating into groups?"

    Read the article

1