Search Results

Search found 3403 results on 137 pages for 'monthly statements'.

Page 82/137 | < Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >

  • Creating an Extremely Large Index in Oracle

    - by Rudiger
    Can someone look at the linked reference and explain to me the precise statements to run? Oracle DBA's Guide: Creating a Large Index Here's what I came up with... CREATE TEMPORARY TABLESPACE ts_tmp TEMPFILE 'E:\temp01.dbf' SIZE 10000M REUSE AUTOEXTEND ON EXTENT MANAGEMENT LOCAL; ALTER USER me TEMPORARY TABLESPACE ts_tmp; CREATE UNIQUE INDEX big_table_idx ON big_table ( record_id ); DROP TABLESPACE ts_tmp; Edit 1 After this index was created, I ran an explain plan for a simple query and get this error: ORA-00959: tablespace 'TS_TMP' does not exist It seems like it's not temporary at all... :(

    Read the article

  • How does Perl's lib pragma work?

    - by Tyug
    I use use lib "./DIR" to grab a library from a folder elsewhere. However, it doesn't seem to work on my server, but it works fine on my local desktop. Any particular reasons? And one more question, does use lib get propagated within several modules? Two situations: Say I make a base class that requires a few libraries, but I know that it needs to be extended and the extended class will need to use another library. Can I put the use lib command in the base class? or will I need to put it in every extending class? Finally, can I just have a use package where package contains a bunch of use lib, will it propagate the use lib statements over to my current module? <-- I don't think so, but asking anyways

    Read the article

  • T-SQL error object exists when separated in if/else blocks

    - by Jeff O
    I get the error: Msg 2714, Level 16, State 1, Line 16 There is already an object named '#mytemptable' in the database. There are ways around it, but wonder why this happens. Seems like SQL Server is verifying both blocks of the if/else statement? declare @choice int select @choice = 1 if @choice = 1 begin select 'MyValue = 1' AS Pick into #my_temp_table end else begin select 'MyValue <> 1' AS Pick into #my_temp_table end select * from #temptable drop table #temptable If the tables have different names, it works. Or if I create the temp table and use Insert Into... statements that works as well.

    Read the article

  • PHP conditional loop help

    - by sea_1987
    Hi there in my database I have 3 columns, is_contract, is_permenant and is_temporary. Within these columns there is either a Y or N value. I am using these columns to echo onto the page what kind of work someone is looking for, my problem is that the user can be looking for more than one type of work, I am currently running 3 if statements to determine what to echo to the page, however I am struggling to add a comma if more than one of the statemnts returns as true, below is my code so far, <?php if($rslt['is_contract'] == 'Y') { echo "Contract "; } if($rslt['is_permanent'] == 'Y') { echo "Permanent "; } if($rslt['is_temporary'] == 'Y') { echo "Temporary"; } ?>

    Read the article

  • Php wrapper class for XML

    - by gms8994
    I'm working on a new class to wrap XML handling. I want my class to use simplexml if it's installed, and the built in XML functions if it's not. Can anyone give me some suggestions on a skeleton class to do this? It seems "wrong" to litter each method with a bunch of if statements, and that also seems like it would make it nearly impossible to correctly test. Any upfront suggestions would be great! EDIT: I'm talking about these built-in xml functions.

    Read the article

  • SQL Server 2005 Import from Excel

    - by user327045
    I'd like to know what my best option would be to import data from an excel file on a weekly or monthly basis. At first, I thought I would use SSIS, but after much struggle with seemingly simple tasks, I'm starting to rethink my plan. Would it be better/easier to just write the SQL by hand or use the services of an SSIS package? The basic process will be as follows: A separate process will download an .xls file to a local fileshare. The xls file will have a filename like: 'myfilename MON YY'. I will need to read the month and year from the the filename, reformat it to a sql date and then query a DimDate table to find the corresponding date key. For each row (after the first 2 header rows), insert the data with the date key, unless the row is a total row, then ignore. Here are some of the issues I've been encountering with SSIS: I can parse the date string from a flat file datasource, but can't seem to do it with an excel data source. Also, once parsed, i cannot seem to convert the string to a date in order to perform the lookup for the date key. For example, I want to do something like this: select DateKey from DimDate where ActualDate = convert(datetime, '01-' + 'JAN-10', 120) but i don't think it is possible to use the 'convert' or 'datetime' keywords in an expression builder. I have been also unable to find where I can edit the SQL to ignore the first 2 rows of data. I'm very skeptical of using SSIS because it seems like a Kludgy way of doing something that can probably be accomplished more efficiently writing the SQL yourself, but I may be forced to use SSIS. Thoughts?

    Read the article

  • How can one extract rdf:about or rdf:ID properties from triples using SPARKQL?

    - by lennyks
    It seemed a trivial matter at the beginning but so far I had not managed to get unique identifier for a given resource using SPARKQL. What I mean is given, let say, rdf:Description rdf:about="http://..." and then some properties identifying this resource, what I want to do is to first find this very resource and then retrieve all the triples given some uri. I have tried naive approaches by writing statements in a WHERE clause such as ?x rdf:about ?y and ?x rdfs:about ?y. I hope I am being precise.

    Read the article

  • Parsing files with python

    - by iHeartDucks
    My input file is going to be something like this key "value" key "value" ... the above lines repeat What I do is read the file contents, populate an object with the data and return it. There are only a set number of keys that can be present in the file. Since I am a beginner in python, I feel that my code to read the file is not that good My code is something like this ObjInstance = CustomClass() fields = ['key1', 'key2', 'key3'] for field in fields: for line in f: if line.find(field) >= 0: if pgn_field == 'key1': objInstance.DataOne = get_value_using_re(line) elif pgn_field == 'key2': objInstance.DataTwo = get_value_using_re(line) return objInstance; The function "get_value_using_re" is very simple, it looks for a string in between the double quotes and returns it. I fear that I will have multiple if elif statements and I don't know if this is the right way or not. Am I doing the right thing here?

    Read the article

  • In MSSQL, how do I create a reference variable to a table?

    - by Jón Trausti
    Hello. I'm currently using sp_executesql to execute a T-SQL statement with a dynamic table name. However, it is really ugly to see something like: set sql = 'UPDATE '+Table_Name+' SET ... WHERE '+someVar+' = ... AND '+someVar2' = ...' sp_executesql sql What I would rather like to have is a TABLE variable of which is a reference to a table, so I could do for example: UPDATE TableRef SET ... WHERE ... Because when I have really long T-SQL statements it gets really hard to read due to the format of it within a string. Any suggestions would be helpful. Thanks!

    Read the article

  • Use of LOC to determine project size

    - by acidzombie24
    How many lines of code (LOC) does it take to be considered a large project? How about for just one person writing it? I know this metric is questionable, but there is a significant difference, for a single developer, between 1k and 10k LOC. I typically use space for readability, especially for SQL statements, and I try to reduce the amount of LOC for maintenance purpose to follow as many best practice as i can. For example, I created a unified diff of the code I modified today, and it was over 1k LOC (including comments and blank lines). Is "modified LOC" a better metric? I have ~2k LOC, so it's surprising I modified 1k. I guess rewriting counts as both a deletion and addition which doubles the stats.

    Read the article

  • log4j: Change format of loggers configured in another library.

    - by Ignacio Thayer
    Using clojure, I've been able to successfully setup log4j very simply by using this log4j.properties file, and including log4j in my classpath. # BEGIN log4j.properties log4j.appender.STDOUT=org.apache.log4j.ConsoleAppender log4j.appender.STDOUT.layout=org.apache.log4j.PatternLayout log4j.appender.STDOUT.layout.ConversionPattern=%d{MMdd HHmmss SSS} %5p %c [%t] %m\n log4j.rootLogger=DEBUG, STDOUT Then after :use'ing clojure.contrib.logging, I'm able to print a statement with the desired formatting as expected like so: (info "About to print this") (debug "This is debug-level") My question is how to achieve a consistent formatting for logging statements made from loggers configured in other libraries. I thought I could find existing loggers using org.apache.log4j.LogManager.getCurrentLoggers() and change the PatternLayouts there, but I'm not able to iterate over that enumeration in clojure, as I get the following error: Dont know how to create ISeq from: java.util.Vector$1 I assume this is possible somehow, and probably very simply. How? Thanks much.

    Read the article

  • Entity Framework How to specify paramter type in generated SQL (SQLServer 2005) Nvarchar vs Varchar

    - by Gratzy
    In entity framework I have an Entity 'Client' that was generated from a database. There is a property called 'Account' it is defined in the storage model as: <Property Name="Account" Type="char" Nullable="false" MaxLength="6" /> And in the Conceptual Model as: <Property Name="Account" Type="String" Nullable="false" /> When select statements are generated using a variable for Account i.e. where m.Account == myAccount... Entity Framework generates a paramaterized query with a paramater of type NVarchar(6). The problem is that the column in the table is data type of char(6). When this is executed there is a large performance hit because of the data type difference. Account is an index on the table and instead of using the index I believe an Index scan is done. Anyone know how to force EF to not use Unicode for the paramater and use Varchar(6) instead?

    Read the article

  • Listener to prevent System.out display on the screen.

    - by harshit
    Hi, I was doing my academic project and while building and testing i have put many println() statements. But when I had to submit all prints should not be displayed. Can i implement something like listener which will be invoked when System.out is tried to be executed and prevents it from displaying. I dont know how feasible this idea is but just want to know whether its possible or not. I know i could have used a log file or write into a file but again its just a thought came into my mind if I have to disable SOP how can i do it .. thanks

    Read the article

  • C# define string format of double/floats to be US english by default

    - by neil
    Hi, I have got several thousands of lines of a web application source code, initially written on a US development system, to maintain. It makes heavy use of SQL statement strings, which are combined on the fly, e.g. string SQL = "select * from table where double_value = " + Math.Round(double_value, 2); Don't comment on bad programming style, that doesn't help me in this case :) The cruix: My system uses a German locale, which in turn leads to wrong SQL statements, like this: "select * from table where double_value = 15,5" (Note the comma as decimal separator instead of a point). Question: What is the most "elegant" way to change the locale of the web app in this case) to US or UK in order to prevent being forced to change and inspect every single line of code? .net 3.5 is not an option (would give me the chance to overwrite ToString() in an extension class) Kind regards

    Read the article

  • Best practice with respect to NPE and multiple expressions on single line

    - by JRL
    I'm wondering if it is an accepted practice or not to avoid multiple calls on the same line with respect to possible NPEs, and if so in what circumstances. For example: getThis().doThat(); vs Object o = getThis(); o.doThat(); The latter is more verbose, but if there is an NPE, you immediately know what is null. However, it also requires creating a name for the variable and more import statements. So my questions around this are: Is this problem something worth designing around? Is it better to go for the first or second possibility? Is the creation of a variable name something that would have an effect performance-wise? Is there a proposal to change the exception message to be able to determine what object is null in future versions of Java ?

    Read the article

  • Why is generated XAML spitting out namespaces that are not asked for?

    - by Matt Holmes
    I have a very simple XAML form, that has one namespace definition. For some reason, when Visual Studio processes that XAML file in to it's component .g.cs, it's sticking a bunch of namespace definitions at the top that I have not asked for in the XAML, or the code behind, and they are namespaces that no longer exist in my project. Thus the project is failing to compile. Why is Visual Studio sticking arbitrary namespace 'using' statements in my generated XAML .g.cs files? It's caused my entire project to break. Not one time did this .xaml file ever reference the namespaces in question, so it's doubly annoying.

    Read the article

  • Is Lightweight Code Generation (LCG) dead?

    - by Greg Beech
    In the .NET 2.0-3.5 frameworks, LCG (aka the DynamicMethod class) was a decent way to emit lightweight methods at runtime when no class structure was needed to support them. In .NET 4.0, expression trees now support statements and blocks, and as such appear to provide sufficient functionality to build just about any functionality you could require from such a method, and can be constructed in a much easier and safer way than directly emitting CIL op-codes. (This statement is borne from today's experimentation of converting some of our most complex LCG code to use expression tree building and compilation instead.) So is there any reason why one would use LCG in any new code? Is there anything it can do that expression trees cannot? Or is it now a 'dead' piece of functionality?

    Read the article

  • [C++] instantiating bitset using hex character.

    - by bndz
    Hey, I'm trying to figure out how to instantiate a 4 bit bitset based on a hex character. For instance, If I have a character with value 'F', I want to create a bitset of size 4 initialized to 1111 or if it is A, i want to initialize it to 1010. I could use a bunch of if statements like so: fn(char c) { bitset<4 temp; if(c == 'F') temp.set(); //... if(c == '9') { temp.set(1); temp.set(3); } //... } This isn't efficient, is there a way of easily converting the string to a decimal integer and constructing the bitset using the last 4 bits of the int? Thanks for any help.

    Read the article

  • Python comparing string against several regular expressions

    - by maerics
    I'm pretty experienced with Perl and Ruby but new to Python so I'm hoping someone can show me the Pythonic way to accomplish the following task. I want to compare several lines against multiple regular expressions and retrieve the matching group. In Ruby it would be something like this: STDIN.each_line do |line| case line when /^A:(.*?)$/ then puts "FOO: #{$1}" when /^B:(.*?)$/ then puts "BAR: #{$1}" # when ... else puts "NO MATCH: #{line}" end end My attempts in Python are turning out pretty ugly because the matching group is returned from a call to match/search on a regular expression and Python has no assignment in conditionals or switch statements. What's the Pythonic way to do (or think!) about this problem?

    Read the article

  • Compare values in each column of two Oracle Types

    - by colinjameswebb
    I've been playing around with the pluto-test-framework today, and I'd like to get some existing functions into a test harness with it. I have lots of functions with this type of specification. FUNCTION DO_SOME_STUFF (pOldSchedule IN SCHEDULE_OBJ, pNewSchedule OUT SCHEDULE_OBJ, pLoggerContext IN OUT LOGGER_CONTEXT_OBJ) RETURN NUMBER; It takes pOldSchedule, does some stuff to it, and then returns pNewSchedule. The logger_context just does logging. As part of a test, I'd like to be able to compare the values in each of the columns of the type, without having to write individual IF statements. It'll need to return boolean to signify whether or not pOldSchedule and pNewSchedule match. Any ideas?

    Read the article

  • How do I change the effective user of psql?

    - by gvkv
    I'm using psql to run a simple set of COPY statements contained in a file: psql -d mydb -f 'wbf_queries.data.sql' where wbf_queries.data.sql contains lines: copy <my_query> to '/home/gvkv/mydata' delimiter ',' null ''; ... but I get a permission denied error: ... ERROR: could not open file ... for writing: Permission denied I'm connecting under my user account (gvkv) which is also a superuser in PostgreSQL. Obviously, psql is running under a different (effective) user but I don't know how to change this. Can it be done within psql or do I need some unix-fu?

    Read the article

  • SQL Operators as text in where clause

    - by suggy1982
    I have the following table, which is used for storing bandings. The table is maintained via a web frontend. CREATE TABLE [dbo].[Banding]( [BandingID] [int] IDENTITY(1,1) NOT NULL, [ValueLowerLimitOperator] [varchar](10) NULL, [ValueLowerLimit] [decimal](9, 2) NULL, [ValueUpperLimitOperator] [varchar](10) NULL, [ValueUpperLimit] [decimal](9, 2) NULL, [VolumeLowerLimitOperator] [varchar](10) NULL The operator fields store values such as < = <=. I want to get to a position where I can use the operators values stored in the table in a case statement in a where clause. Like this. SELECT * FROM table WHERE CASE ValueLowerLimitOperator WHEN '<' THEN VALUE < X WHEN '>' THEN VALUE > X END rather than having to write mutiple case or if statements for each permutation. Does anyone have any suggestions how I can decode the operators values stored in the table as part of my query and then use them in a case/where statement?

    Read the article

  • SQL Group By equivalent

    - by MikeB
    Pretend I have a cupcake_rating table: id | cupcake | delicious_rating -------------------------------------------- 1 | Strawberry | Super Delicious 2 | Strawberry | Mouth Heaven 3 | Blueberry | Godly 4 | Blueberry | Super Delicious I want to find all the cupcakes that have a 'Super Delicious' AND 'Mouth Heaven' rating. I feel like this is easily achievable using a group by clause and maybe a having. I was thinking: select distinct(cupcake) from cupcake_rating group by cupcake having delicious_rating in ('Super Delicious', 'Mouth Heaven') I know I can't have two separate AND statements. I was able to achieve my goal using: select distinct(cupcake) from cupcake_rating where cupcake in ( select cupcake from cupcake_rating where delicious_rating = 'Super Delicious' ) and cupcake in ( select cupcake from cupcake_rating where delicious_rating = 'Mouth Heaven' ) This will not be satisfactory because once I add a third type of rating I am looking for, the query will take hours (there are a lot of cupcake ratings).

    Read the article

  • Microsoft sublanguage string to locale identifier

    - by Jacob
    I can't seem to find a way to convert, or find, a local identifier from a sublanguage string. This site shows the mappings: http://msdn.microsoft.com/en-us/library/dd318693(v=VS.85).aspx I want the user to enter a sublanguage string, such as "France (FR)" and to get the local identifier from this, which in this case would be 0x0484. Or the other way around, if a user enters 0x0480 then to return French (FR). Has anyone encountered this problem before and can point me in the right direction? Otherwise I'm going to be writing a few mapping statements to hard code it and maintain future releases if anything changes. BTW, I'm coding in C++ for Windows platform. Cheers

    Read the article

  • Syntax for combining joins in mysql

    - by UltraVi01
    I seem to remember reading somewhere that there is a way to combine LEFT JOIN statements into a more simple query. I have the following query and was hoping someone could kindly take a look at it. SET @userId = 8; SELECT ug.user_id, COUNT(DISTINCT goal_id) as matches FROM user_goal ug, user u, profile p LEFT JOIN user_block ub ON @userId = ub.blocked_id LEFT JOIN user_block ub2 ON @userId = ub2.blocker_id LEFT JOIN user_user uu ON @userId = uu.user_id LEFT JOIN friend_request fr ON @userId = fr.user_id WHERE ug.user_id = u.id AND u.profile_id = p.id AND (ub.blocker_id IS NULL OR ub.blocker_id != ug.user_id) AND (ub2.blocked_id IS NULL OR ub2.blocked_id != ug.user_id) AND (uu.user_friends_id IS NULL OR uu.user_friends_id != ug.user_id) AND (fr.to_user_id IS NULL OR (fr.to_user_id != ug.user_id)) AND ug.user_id!=@userId AND p.suggestible AND goal_id IN (SELECT iug.goal_id FROM user_goal iug WHERE user_id=@userId) GROUP BY user_id ORDER BY matches DESC LIMIT 4

    Read the article

< Previous Page | 78 79 80 81 82 83 84 85 86 87 88 89  | Next Page >