Search Results

Search found 6988 results on 280 pages for 'if else statement'.

Page 125/280 | < Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >

  • What is faster in MySQL? WHERE sub request = 0 or IN list

    - by Nicolas Manzini
    Hello I was wondering what is better in MySQL. I have a SELECT querry that exclude every entry associated to a banned userID currently I have a subquerry clause in the WHERE statement that goes like AND (SELECT COUNT(*) FROM TheBlackListTable WHERE userID = userList.ID AND blackListedID = :userID2 ) = 0 Which will accept every userID not present in the TheBlackListTable Would it be faster to retrieve first all Banned ID in a previous request and replace the previous clause by AND creatorID NOT IN listOfBannedID Thank you!

    Read the article

  • what does 'legend' mean in sql?

    - by every_answer_gets_a_point
    im doing some practice sql problems one of the questions is: Prepare a shipping statement for customer 'C001' it should show the date, the legend 'Delivery' and the total value of the products shipped on each day. 'delivery' is not a table nor is it a column in any table. what does legend mean??

    Read the article

  • How can I get the name of all tables in a JavaDB database?

    - by Jonas
    How can i programmatically get the names of all tables in a JavaDB database? Is there any specific SQL-statement over JDBC I can use for this or any built in function in JDBC? I will use it for exporting the tables to XML, and would like to do it this way so I don't miss any tables from the database when exporting.

    Read the article

  • Fortran: output format dependent on a variable

    - by Flux Capacitor
    I would like to have a FORTRAN write statement formatted to depend on some variable. For example, I could write: write(*,'(3f15.3,3f9.2)') x,y,z,(var(i),i=1,nvari) where nvari = 3 But, what if, in some cases, I actually have 4 variables (i.e. nvari = 4) I would like to write something like this: write(*,'(3f15.3,nvari(f9.2))') x,y,z,(var(i),i=1,nvari) Now, nvari can be anything and the output will work as I like. How can I make something like this work?

    Read the article

  • nhibernate intercept select query

    - by mjmcloug
    Hey, I'm looking at the nhibernate interceptor. It seems to be able to intercept save, update and delete queries but is there anyway I can intercept a select query. The problem I have is that I automatically want to append some additional sql filters to the executing sql statement in certain cases. Any thoughts Thanks Mat

    Read the article

  • How to calculate the maximum block length in C of a binary number

    - by user1664272
    I want to reiterate the fact that I am not asking for direct code to my problem rather than wanting information on how to reach that solution. I asked a problem earlier about counting specific integers in binary code. Now I would like to ask how one comes about counting the maximum block length within binary code. I honestly just want to know where to get started and what exactly the question means by writing code to figure out the "Maximum block length" of an inputted integers binary representation. Ex: Input 456 Output: 111001000 Number of 1's: 4 Maximum Block Length: ? Here is my code so far for reference if you need to see where I'm coming from. #include <stdio.h> int main(void) { int integer; // number to be entered by user int i, b, n; unsigned int ones; printf("Please type in a decimal integer\n"); // prompt fflush(stdout); scanf("%d", &integer); // read an integer if(integer < 0) { printf("Input value is negative!"); // if integer is less than fflush(stdout); return; // zero, print statement } else{ printf("Binary Representation:\n", integer); fflush(stdout);} //if integer is greater than zero, print statement for(i = 31; i >= 0; --i) //code to convert inputted integer to binary form { b = integer >> i; if(b&1){ printf("1"); fflush(stdout); } else{ printf("0"); fflush(stdout); } } printf("\n"); fflush(stdout); ones = 0; //empty value to store how many 1's are in binary code while(integer) //while loop to count number of 1's within binary code { ++ones; integer &= integer - 1; } printf("Number of 1's in Binary Representation: %d\n", ones); // prints number fflush(stdout); //of ones in binary code printf("Maximum Block Length: \n"); fflush(stdout); printf("\n"); fflush(stdout); return 0; }//end function main

    Read the article

  • Cleaning up a SQL SP with Regex

    - by Douglas Osborne
    1) If I am running a find and replace in SQL 2005 - what would be the regular expression to find tab and space sequences ( or space and tab sequences ) and replace them with just tab? 2) If I have a line which begins with a space - is there a regular expression to convert that leading space to a tab? 3) What would be the regular expression to remove all of the spaces before a CR/LF in a SQL statement? TIA for the help - I know this will be trivial to most of you, Doug

    Read the article

  • MSSQL - select date field in table

    - by thegunner
    Hi, In my table I have a date column which the date is displayed in the format "2009-11-18 10:55:28.370" How can just get the date value of this field in a select statement. e.g. select id from risks, where creation_date = getdate()

    Read the article

  • Serialize checkbox array, also get checkboxes with off-value

    - by guzh
    Hi, I was wondering if this is possible. The serialize-string will be inserted in a mySQL-database, so it would be fine if all checkboxes would be inserted and not only the ones that is ticked(on). it's possible to make on column in the database for each of the checkboxes, and use this if/else-statement: if(isset($_GET['checkbox'])) { // It's checked! } else { // not checked! } but its a bit unappropriate...

    Read the article

  • Executing Page Page Load from Popup

    - by cem
    Hi, is it possible to trigger Parent's page load event from a popup.When i use javascript function window.parent.document.form.submit,this creates a postback.I want a function which creates "reload" for page because some of my functions work in the "if not postback" statement.

    Read the article

  • Can't use "continue <label>"

    - by M28
    I am trying this code: entLoop:for(var i:*in entities) { for(var i2:*in ignoreEntities) { if(entities[i].type==ignoreEntities[i2]) { continue entLoop; } } } Why is it not working? The error is: Target of continue statement was not found.

    Read the article

  • JRadio Menu buttons - JAVA

    - by user337465
    I have a relatively easy question. I have to create a java GUI to do math based calculations. I have to have a menu item that will double the variable that I am doing calculations with. For example variable = 1 if radio button = selected{ variable = variable * 2 } So, how would I achieve the if statement there? thankyou

    Read the article

  • PostGres if query?

    - by KnockKnockWhosThere
    Is there a way to select records based using an if statement? My table looks like this: id | num | dis 1 | 4 | 0.5234333 2 | 4 | 8.2234 3 | 8 | 2.3325 4 | 8 | 1.4553 5 | 4 | 3.43324 And I want to select the num and dis where dis is the lowest number... So, a query that will produce the following results: id | num | dis 1 | 4 | 0.5234333 4 | 8 | 1.4553

    Read the article

  • Apple script Editor, write message to the "Result" window

    - by Patrick
    I am using the Mac OS X Apple Script Editor and (while debugging) instead of writing a lot of display dialog statements, I'd like to write the results of some calculation in the window below, called "Result" (I have the German UI here, so the translation is a guess). So is there a write/print statement that I can use for putting messages in the "standard out" window? I am not asking to put the messages in a logfile on the file system, it is purely temporary.

    Read the article

  • Init array with bool values

    - by iFloh
    my attempt to init an array with a number of bool values using: [myArray initWithObjects:[NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES], [NSNumber numberWithBool:YES], nil]; seems to fail since the debugger shows an empty array after this statement is carried out ... Any clues?

    Read the article

  • c# calculation help

    - by Jonas B
    Hi, I'm pretty useless when it comes to math and I have a problem I need help with. This has nothing to do with schoolwork, it's in fact about alcatel and the ticketextractor. I have two values that needs to be calculated in a c# application according to a formula specified in their documentation: "The global callid is equal to: callid1 multiplied by 2 power 32 plus callid2" As I said I'm not big with maths so that statement says nothing to me. If anyone know how to calculate it i'd appreciate it! Thanks

    Read the article

< Previous Page | 121 122 123 124 125 126 127 128 129 130 131 132  | Next Page >