Search Results

Search found 34207 results on 1369 pages for 'query output'.

Page 91/1369 | < Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >

  • mysql partitioning

    - by Yang
    just want to verify that database partition is implemented only at the database level, when we query a partitioned table, we still do our normal query, nothing special with our queries, the optimization is performed automatically when parsing the query, is that correct? e.g. we have a table called 'address' with a column called 'country_code' and 'city'. so if i want to get all the addresses in New York, US, normally i wound do something like this: select * from address where country_code = 'US' and city = 'New York' if now the table is partitioned by 'country_code', and i know that now the query will only be executed on the partition which contains country_code = US. My question is do I need to explicitly specify the partition to query in my sql statement? or i still use the previous statement and the db server will optimize it automatically? Thanks in advance!

    Read the article

  • Why does Sql Server recommends creating an index when it already exist?

    - by Pierre-Alain Vigeant
    I ran a very basic query against one of our table and I noticed that the execution plan query processor is recommending that we create an index on a column The query is SELECT SUM(DATALENGTH(Data)) FROM Item WHERE Namespace = 'http://some_url/some_namespace/' After running, I get the following message // The Query Processor estimates that implementing the following index could improve the query cost by 96.7211%. CREATE NONCLUSTERED INDEX [<Name of Missing Index, sysname,>] ON [dbo].[Item] ([Namespace]) My problem is that I already have such index on that column: CREATE NONCLUSTERED INDEX [IX_ItemNamespace] ON [dbo].[Item] ( [Namespace] ASC )WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] Why is Sql Server recommending me to create such index when it already exist?

    Read the article

  • MySQL parameter resource error

    - by Derek
    Here is my error: Warning: mysql_query() expects parameter 2 to be resource, null given... This refers to line 23 of my code which is: $result = mysql_query($sql, $connection) My entire query code looks like this: $query = "SELECT * from users WHERE userid='".intval( $_SESSION['SESS_USERID'] )."'"; $result = mysql_query($query, $connection) or die ("Couldn't perform query $query <br />".mysql_error()); $row = mysql_fetch_array($result); I don't have a clue what has happpened here. All I wanted to do was to have the value of the users 'fullname' displayed in the header section of my web page. So I am outputting this code immediately after to try and achieve this: echo 'Hello '; echo $row['fullname']; Before this change, I had it working perfectly, where the session variable of fullname was echoed $_SESSION['SESS_NAME']. However, because my user can update their information (including their name), I wanted the name displayed in the header to be updated accordingly, and not displaying the session value.

    Read the article

  • Mysql - Grouping the result based on a mathematical operation and SUM() function

    - by SpikETidE
    Hi all... I'm having the following two tables... Table : room_type type_id type_name no_of_rooms max_guests rate 1 Type 1 15 2 1254 2 Type 2 10 1 3025 Table : reservation reservation_id start_date end_date room_type booked_rooms 1 2010-04-12 2010-04-15 1 8 2 2010-04-12 2010-04-15 1 2 Now... I have this query SELECT type_id, type_name FROM room_type WHERE id NOT IN (SELECT room_type FROM reservation WHERE start_date >= '$start_date' AND end_date <= '$end_date') What the query does is it selects the rooms that are not booked between the start date and end date. Also, as you can see from the reservation table, we also have 'number of rooms booked between the two dates' factor also... I need to add this 'no.of booked rooms between the two dates' factor also in to the query... The query should return the type of rooms for which at least one room is free between the two dates. I worked out the logic but just can't represent it as a query....! How will you do this...? Thanks for your suggestions..!

    Read the article

  • mysql - check if data exists across multiple tables

    - by Dd Daym
    I am currently running this query inside MySQL to check if the specified values exists within the table associated with them. SELECT COUNT(artist.artist_id), COUNT(album.album_id), COUNT(tracks.track_id) FROM artist, album, tracks WHERE artist.artist_id = 320295 OR album.album_id = 1234 OR tracks.track_id = 809 The result I get from running this query is all 1, meaning that all the statements after the WHERE clause is true. To further check the query's reliability, I changed the tracks.track_ = 809 to 802, which I know does not match. However the results displayed are still all 1, meaning that they were all successfully matched even when I purposefully inserted a value which would not have matched. How do I get it to show 1 for a match and 0 for no matches within the same query? EDIT: I have inserted an image of the query running

    Read the article

  • Which index is used in select and why?

    - by Lukasz Lysik
    I have the table with zip codes with following columns: id - PRIMARY KEY code - NONCLUSTERED INDEX city When I execute query SELECT TOP 10 * FROM ZIPCodes I get the results sorted by id column. But when I change the query to: SELECT TOP 10 id FROM ZIPCodes I get the results sorted by code column. Again, when I change the query to: SELECT TOP 10 code FROM ZIPCodes I get the results sorted by code column again. And finally when I change to: SELECT TOP 10 id,code FROM ZIPCodes I get the results sorted by id column. My question is in the title of the question. I know which indexes are used in the queries, but my question is, why those indexes are used? I the second query (SELECT TOP 10 id FROM ZIPCodes) wouldn't it be faster if the clusteder index was used? How the query engine chooses which index to use?

    Read the article

  • MySQL - Counting rows in preparation for greatest-n-per-group not working?

    - by John M
    Referring to SO and other sites have given me examples of how to use MySQL to create a 'greatest-n-per-group' query. My variant on this would be to have a query that returns the first 3 rows of each category. As the basis for this I need to sort my data into a usable sequence and that is where my problems start. Running just the sequence query with row numbering shows that changes in category are mostly ignored. I should have 35 categories returning rows but only 5 do so. My query: set @c:=0; set @a:=0; SELECT IF(@c = tdg, @a:=@a+1, @a:=1) AS rownum, (@c:=tdg) , julian_day, sequence, complete, year, tdg FROM tsd WHERE complete = 0 order by tdg, year, julian_day, sequence Do I have a syntax mistake with this query?

    Read the article

  • mkfs.xfs: libxfs_device_zero write failed: Input/output error

    - by Crazy_Bash
    I can't find a way to create a filesystem on one of my disks. first i'm geting the following output: [root@~]# mkfs.xfs /dev/sdb1 mkfs.xfs: /dev/sdb1 appears to contain a partition table (dos). mkfs.xfs: Use the -f option to force overwrite. after using -F flag: [root@~]# mkfs.xfs -f /dev/sdb1 meta-data=/dev/sdb1 isize=256 agcount=32, agsize=22892696 blks = sectsz=512 attr=2 data = bsize=4096 blocks=732566272, imaxpct=5 = sunit=0 swidth=0 blks naming =version 2 bsize=4096 ascii-ci=0 log =internal log bsize=4096 blocks=357698, version=2 = sectsz=512 sunit=0 blks, lazy-count=1 realtime =none extsz=4096 blocks=0, rtextents=0 **mkfs.xfs: libxfs_device_zero write failed: Input/output error** /dev/sdb: Disk /dev/sdb: 3001GB 1 1049kB 3001GB 3001GB primary Linux: Centos 6.3 Linux 1 2.6.32-279.el6.x86_64 #1 SMP Fri Jun 22 12:19:21 UTC 2012 x86_64 x86_64 x86_64 GNU/Linux what i've tried so far: recreating partition with parted rm 1

    Read the article

  • Output php mail calls to log file

    - by Tom McQuarrie
    This question relates to the question found here: Find the php script thats sending mails Trying to do the exact same thing but can't get the log to output what I need. Not too experienced with serverfault and ideally I'd post my followup on the original question, or PM adam to see if he ever found a solution, but looks as though server fault doesn't work that way. I can post an "answer" but that's definitely not what this is. I have a script located at /usr/local/bin/sendmail-php-logged, with the following: #!/bin/sh logger -p mail.info sendmail-php: site=${HTTP_HOST}, client=${REMOTE_ADDR}, script=${SCRIPT_NAME}, filename=${SCRIPT_FILENAME}, docroot=${DOCUMENT_ROOT}, pwd=${PWD}, uid=${UID}, user=$(whoami) /usr/sbin/sendmail -t -i $* This is logging to /var/log/maillog, but as Adam mentions in his question, none of the server variables work. Output I'm getting is: Oct 4 12:16:21 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/var/www/html/aro_chroot/sites/arocms, uid=48, user=apache Oct 4 12:16:21 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/var/www/html/aro_chroot/sites/arocms, uid=48, user=apache Oct 4 12:17:03 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/var/www/html/aro_chroot/sites/arocms, uid=48, user=apache Oct 4 12:17:05 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/root, uid=0, user=root Oct 4 12:17:11 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/var/www/html/aro_chroot/sites/arocms, uid=48, user=apache Oct 4 12:17:14 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/root, uid=0, user=root Oct 4 12:17:29 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/root, uid=0, user=root Oct 4 12:17:41 fluke logger: sendmail-php: site=, client=, script=, filename=, docroot=, pwd=/root, uid=0, user=root User ID, current user, and pwd are all working, probably because they're globally accessible script resources, and not specific to PHP, like all the others are. I've tried using other server variables as per labradort's instructions, but no joy. Here's some sample tests: logger -p mail.info sendmail-php SCRIPT_NAME: ${SCRIPT_NAME} logger -p mail.info sendmail-php SCRIPT_FILENAME: ${SCRIPT_FILENAME} logger -p mail.info sendmail-php PATH_INFO: ${PATH_INFO} logger -p mail.info sendmail-php PHP_SELF: ${PHP_SELF} logger -p mail.info sendmail-php DOCUMENT_ROOT: ${DOCUMENT_ROOT} logger -p mail.info sendmail-php REMOTE_ADDR: ${REMOTE_ADDR} logger -p mail.info sendmail-php SCRIPT_NAME: $SCRIPT_NAME logger -p mail.info sendmail-php SCRIPT_FILENAME: $SCRIPT_FILENAME logger -p mail.info sendmail-php PATH_INFO: $PATH_INFO logger -p mail.info sendmail-php PHP_SELF: $PHP_SELF logger -p mail.info sendmail-php DOCUMENT_ROOT: $DOCUMENT_ROOT logger -p mail.info sendmail-php REMOTE_ADDR: $REMOTE_ADDR And the output: Oct 4 12:58:02 fluke logger: sendmail-php SCRIPT_NAME: Oct 4 12:58:02 fluke logger: sendmail-php SCRIPT_FILENAME: Oct 4 12:58:02 fluke logger: sendmail-php PATH_INFO: Oct 4 12:58:02 fluke logger: sendmail-php PHP_SELF: Oct 4 12:58:02 fluke logger: sendmail-php DOCUMENT_ROOT: Oct 4 12:58:02 fluke logger: sendmail-php REMOTE_ADDR: Oct 4 12:58:02 fluke logger: sendmail-php SCRIPT_NAME: Oct 4 12:58:02 fluke logger: sendmail-php SCRIPT_FILENAME: Oct 4 12:58:02 fluke logger: sendmail-php PATH_INFO: Oct 4 12:58:02 fluke logger: sendmail-php PHP_SELF: Oct 4 12:58:02 fluke logger: sendmail-php DOCUMENT_ROOT: Oct 4 12:58:02 fluke logger: sendmail-php REMOTE_ADDR: I'm running php 5.3.10. Unfortunately register_globals is on, for compatibility with legacy systems, but you wouldn't think that would cause the environment variables to stop working. If someone can give me some hints as to why this might not be working I'll be a very happy man :)

    Read the article

  • combining sed with xargs to obtain a source and output file name

    - by Lytithwyn
    I have a situation where I have some input files like this: M2U0001.MPG M2U0180.MPG And I want to run a command (in a bash shell) on each similarly named file in the directory. I'd like the current file name to be given to this command as an input and a modified version of the filename to be given as an output file. Here's an example: ffmpeg -i M2U0001.MPG M2U0001_fixed.MPG I had the idea of using xargs and sed, but this is as far as I got: ls -1 *.MPG | xargs -I{} ffmpeg -i {} `echo {} | sed -r 's/[0-9]{2,}/&_fixed/'` But this results in the original filename being output in both positions. Am I totally going about this the wrong way? I found that if I echo the filename directly to the embedded chunk like this it works: echo M2U0001.MPG | sed -r 's/[0-9]{2,}/&_fixed/'

    Read the article

  • graphics cards with no HDMI output

    - by Noam Gal
    I am currently looking at Gainward GTX260 896MB GS GLH, but I've seen it also on the x275 version - the card doesn't have an HDMI output, only two dvi and one tv out (s-video?). They claim they support HDMI using a dvi-HDMI converter. Will I get a true high definition quality on my TV (assuming it supports it) like that? Or is it not as good, and I should stick to cards that have an HDMI output (ATI), or pay way too much for x295? What about connecting the audio? The x260 comes with an internal spdif cable - does that mean I can connect my soundcard to my graphics card, and have the audio come out through the dvi, and into the HDMI cable? Or am I mixing it all up here, and I have to somehow connect the sound to the TV using a seperate cable (Hoping it has a seperate audio-in for the HDMI channel)?

    Read the article

  • Linux command to concatenate audio files and output them to ogg

    - by hasen j
    What command-line tools do I need in order to concatenate several audio files and output them as one ogg (and/or mp3)? If you can provide the complete command to concatenate and output to ogg, that would be awesome. Edit: Input files (in my case, currently) are in wma format, but ideally it should be flexible enough to support a wide range of popular formats. Edit2: Just to clarify, I don't want to merge all wmas in a certain directory, I just want to concatenate 2 or 3 files into one. Thanks for the proposed solutions, but they all seem to require creating temporary files, if possible at all, I'd like to avoid that.

    Read the article

  • X-FI optical output not being recognized.

    - by Luciano
    Hello there! I have an issue and I don't know what to do! I have a SoundBlaster X-FI Xtreme Gamer, which has a spdif mini-optical output. I have it connected to a home theater, via a toslink cable and an adapter to fit in the mini plug. It used to work perfectly, but now it doesn't anymore. There is light travelling through the cable, but the HT doesn't pick up the signal. The sound card of the motherboard also has an optical output (regular, not mini) and it works ok, so the cable and the HT are fine, I think. What else should I try? Thanks, Luciano. PS: I only enabled the onboard card for testing, but usually it's disabled to avoid any kind of conflicts. PPS: I'm using Windows 7 64bit with latest drivers of everything, but like I said. It used to work.

    Read the article

  • getting input/output error from NFS client on RHEL5

    - by Andrew Watson
    i have two RHEL5 boxes on a private network together (192.168.2.0/24) and I am trying to export a file system from one to the other but I keep getting the following error: mount.nfs: Input/output error on the client side I see this output: mount: trying 192.168.2.101 prog 100003 vers 3 prot tcp port 2049 mount: trying 192.168.2.101 prog 100005 vers 3 prot tcp port 960 and on the server side I see this: Sep 20 14:14:32 omicron mountd[18739]: authenticated mount request from 192.168.2.87:635 for /srv/nfs/web (/srv/nfs/web) but that's all. I opened up iptables so that the whole 192.168.2.0/24 network is allowed to communicate freely but the public side is locked down to 22,80 etc.... any ideas?

    Read the article

  • VIDEO Streaming - How to output the video timestamp?

    - by Emmanuel Brunet
    I would like to backup an ASF video stream with the time stamp (I mean the original recording date/time) on the output stream ? Usage I convert / store my video using the mkv format (Matroska) with libx264 (video) and aac (audio) codecs. Assume the IP camera webcam user account is account, the password password $ ffmpeg -i http://admin:alpha1237@webcam/videostream.asf -c:v libx264 -s 768X432 -crf 13 -b:v 2500K -pix_fmt yuv420p -c:a libfdk_aac output.mkv This works fine on a tenvis JPT3815W camera How to I need to get the video timestamp available for display as a subtitle or other meta data field managed by standard video players, and ideally to be able to hide it or not during video reading. Does anybody knows how to achieve that ? Thanks in advance for your help.

    Read the article

  • How to get both PIPESTATUS and output in bash script

    - by Mustafa Serdar Sanli
    I'm trying to get last modification date of a file with this command TM_LOCAL=`ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }'` TM_LOCAL has value like "2012-05-16 23:18" after execution of this line I'd also like to check PIPESTATUS to see if there was an error. For example if file does not exists, ls returns 2. But $? has value 0 as it has the return value of awk. If I run this command alone, I can check the return value of ls by looking at ${PIPESTATUS[0]} ls -l --time-style=long-iso ~/.vimrc | awk '{ print $6" "$7 }' But $PIPESTATUS does not work as I've expected if I assign the output to a variable as in the first example. In this case, $PIPESTATUS array has only 1 element which is same as $? So, the question is, how can I get both $PIPESTATUS and assign the output to a variable at the same time?

    Read the article

  • 7zip: how to extract to std output?

    - by Jason S
    I have 7z 4.65 and am trying to extract a single file to standard output. The 7z command-line help says -so is the command-line parameter to extract to standard output, but when I try this: >>> 7z e -so dist\dlogpkg.jar META-INF/MANIFEST.MF 7-Zip 4.65 Copyright (c) 1999-2009 Igor Pavlov 2009-02-03 Error: I won't write data and program's messages to same terminal how can I fix this? There doesn't seem to be a command line param to suppress the normal 7z stdout messages. (edit: the equivalent operation in "unzip" would be unzip -p dist\dlogpkg.jar META-INF/MANIFEST.MF which works fine. But I'd like to use 7z for various reasons.)

    Read the article

  • Colour output piped to less

    - by mmacaulay
    Operating system: Mac OS 10.6.2 I'd like to be able to see colour output when piping certain commands through less. Two examples: I've got ls aliased to ls --color=auto, so I'd like to be able to see colour when I do this: ls -l | less I've also got the color extension turned on in Mercurial, so I'd like to see colour output from: hg diff | less and hg st | less After some googling, it seems like some versions of less support either -r or -R to make this work, but no dice for me. I can't see anything in the man page that looks like what I need. (-r or -R SEEM to be the right options, but again, they don't seem to work)

    Read the article

  • Grepping grep output fails

    - by viraptor
    I'm trying to grep the output of ngrep. Unfortunately when I add another grep to the pipeline, I get no output at all. It can be some other command too - cat / grep / tee - everything breaks the chain. Example: # this works: $ ngrep -l -q -T -Wbyline -d any udp and port 5060 | egrep -B1 '^SIP/2.0 180' -- U +1.469535 xxx:5060 -> xxx:5060 SIP/2.0 180 Ringing. -- U +0.001384 xxx:5060 -> xxx:2048 SIP/2.0 180 Ringing. but #these don't: $ ngrep -l -q -T -Wbyline -d any udp and port 5060 | egrep -B1 '^SIP/2.0 180' | egrep '^U' $ ngrep -l -q -T -Wbyline -d any udp and port 5060 | egrep -B1 '^SIP/2.0 180' | cat $ ngrep -l -q -T -Wbyline -d any udp and port 5060 | egrep -B1 '^SIP/2.0 180' | tee test If I use cat somefile instead of ngrep at the start, everything works as expected. Any ideas what could go wrong here?

    Read the article

  • Finding text in Ubuntu (gnome) terminal output

    - by Rickson
    Imagine this scenario: You run a command at gnome terminal. This command has made a bunch of outputs to the terminal. After some time, you realize you need the value of a variable (let's say variable_needed) that was printed by the command somewhere in the terminal. How to find it? KDE terminal used to have a shortcut ctrl+shift+f which searched the terminal output. It seems that gnome-terminal doesn't have it (at least at Ubuntu 10.04.2 LTS). Is there any way of adding it? Is there any other good terminal I could use that has it? Notice that the output has already been written so I don't want (cannot) run the command again combined with grep, |, , vim, emacs, etc.

    Read the article

  • Disable MathML output of eLyXer

    - by Gryllida
    eLyXer is a standalone LyX to HTML converter. In the resulting file, equations are formatted as MathML, and the file itself starts with an XML tag. This causes two problems: LibreOffice does not read the XML file (it can read HTML files, but not XHTML). I am unable to copy and paste the equations into a document editor such as LibreOffice with the goal of subsequent conversion into .doc, because .doc files do not support MathML. The eLyXer help page mentions an option to only use simple math, but there is no option to set math equations to output as images. And I already set Document Settings Output Math equations Format: images in LyX, which presumably is saved in the lyx document somewhere. A web search did not come up with any solutions.

    Read the article

  • Automatic switching between "digital output" (HDMI) and built-in speakers in Vista

    - by Laurence Gonsalves
    We occasionally connect my wife's laptop, which runs Vista, to our TV. Whenever we do this we have to manually switch the default audio output to "digital output" for the sound to go through the HDMI connection, and we also have to restart any apps that we want to send sound to the TV. We then have to perform a similar process when disconnecting. Is there any way to just have this be automatic? It seems absurd to have to do so much manual fiddling when a 40 year old transistor radio is "smart" enough to turn off the speakers and send sound to the headphones when headphones are plugged in. In case it helps, the name "RealTek" shows up in the sound card settings dialog.

    Read the article

  • Log Files from bash script output

    - by neildeadman
    I have a script that runs (this works fine). I'd like to produce logfiles from its output and still show it on screen. I have this command that creates three files from this blog: ((./fk.sh 2>&1 1>&3 | tee errors.log) 3>&1 1>&2 | tee output.log) 2>&1 | tee final.log This does exactly what I want it to. My only issue is that I create files in my script and copy them somewhere, and I'd like to copy these logfiles there too, which I can't do whilst this script is running. I also wanted to make it easier for any user to run my script, so I created another script to run this script. According to this post (see last post) I can put a . before the script name and I can use variables assigned in my called script from the first script if I use them in the first. It doesn't seem to work though and I can't figure out why or find alternative methods. Can anyone help?

    Read the article

  • Manually "draw" data for chart, output to CSV

    - by Ambidex
    I need a service that will allow me to draw a chart line by hand and generate data points for what I drew. This might sound crazy, but I need some data (preferably in CSV output) that will only approximately show value X at time Y and I do not want to go and produce these values by hand. I only have to know how it will flow along. Anyone know how to actually accomplish this? So, I would actually want to draw a line on a graph, and then get the output (X + Y) from that line I drew in a (preferably) CSV.

    Read the article

  • No picture on HDMI Output from a Pioneer 921 AV Receiver to a Projector

    - by Alexey Kulikov
    I am trying hard to tackle a what seemed to be simple problem if wiring my setup together. The setup: Mac Mini (2011) with HDMI Output Pioneer 921 K AV Receiver Acer HD Projector (HDMI) When I hook up my Mac Mini directly to the Projector with a 30 foot (10 meter) HDMI Cable everything is just fine. The picture is sharp and the colors brilliant. However, when I send HDMI to the receiver (into the BD HDMI Input) then I get absolutely no HDMI output to the projector, it keeps saying "no signal". Is there perhaps some magic combination of setup buttons that may help me resolve this problem?

    Read the article

< Previous Page | 87 88 89 90 91 92 93 94 95 96 97 98  | Next Page >