Search Results

Search found 4685 results on 188 pages for 'queries'.

Page 10/188 | < Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >

  • Joining two queries into one query or making a sub-query

    - by gary A.K.A. G4
    I am having some trouble with the following queries originally done for some Access forms: SELECT qry1.TCKYEAR AS Yr, COUNT(qry1.SID) AS STUDID, qry1.SID AS MID, table_tckt.tckt_tick_no FROM table_tckt INNER JOIN qry1 ON table_tckt.tckt_SID = qry1.SID GROUP BY qry1.TCKYEAR, qry1.SID, table_tckt.tckt_tick_no HAVING (((table_tckt.tick_no)=[forms]![frmNAME]![cboNAME])); SELECT table_tckt.sid, FORMAT([tckt_iss_date], 'yyyy') AS TCKYEAR, table_tckt.tckt_tick_no, table_tckt.licstate FROM table_tckt WHERE (((table_tckt.licstate)<>"NA")); I am no longer working with Access, but JSP for the forms. I need to somehow either combine these two queries into one query or find another way to have a query 'query' another one.

    Read the article

  • Different execution plan for similar queries

    - by Graham Clements
    I am running two very similar update queries but for a reason unknown to me they are using completely different execution plans. Normally this wouldn't be a problem but they are both updating exactly the same amount of rows but one is using an execution plan that is far inferior to the other, 4 secs vs 2 mins, when scaled up this is causing me a massive problem. The only difference between the two queries is one is using the column CLI and the other DLI. These columns are exactly the same datatype, and are both indexed exactly the same, but for the DLI query execution plan, the index is not used. Any help as to why this is happening is much appreciated. -- Query 1 UPDATE a SET DestKey = ( SELECT TOP 1 b.PrefixKey FROM refPrefixDetail AS b WHERE a.DLI LIKE b.Prefix + '%' ORDER BY len(b.Prefix) DESC ) FROM CallData AS a -- Query 2 UPDATE a SET DestKey = ( SELECT TOP 1 b.PrefixKey FROM refPrefixDetail b WHERE a.CLI LIKE b.Prefix + '%' ORDER BY len(b.Prefix) DESC ) FROM CallData AS a

    Read the article

  • Avoiding Nested Queries

    - by Midhat
    How Important is it to avoid nested queries. I have always learnt to avoid them like a plague. But they are the most natural thing to me. When I am designing a query, the first thing I write is a nested query. Then I convert it to joins, which sometimes takes a lot of time to get right. And rarely gives a big performance improvement (sometimes it does) So are they really so bad. Is there a way to use nested queries without temp tables and filesort

    Read the article

  • Performing complicated XPath queries in Scala

    - by Ken Bloom
    What's the simplest API to use in scala to perform the following XPath queries on a document? //s:Annotation[@type='attitude']/s:Content/s:Parameter[@role='type' and not(text())] //s:Annotation[s:Content/s:Parameter[@role='id' and not(text())]]/@type The only documentation I can find on Scala's XML libraries has no information on performing complicated real XPath queries. I used to like JDOM for this purpose (in Java), but since JDOM doesn't support generics, it will be painful to work with in Scala. (Other XML libraries for Java have tended to be even more painful in Java, but I admit I don't know the landscape real well.)

    Read the article

  • Which can handle a huge surge of queries: SQL Server 2008 Fulltext or Lucene

    - by Luke101
    I am creating a widget that will be installed on several websites and blogs. The widget will analyse the remote webpage title and content, then it will return relevent articles/links on my website. The amount of traffic we expect will be very huge roughly 500K queries a day and up from there. I need the queries to be returned very quickly, so I need the candidate to be high performance, similar to google adsense. The remote title can be from 5 to 50 words and the description we will use no more then 3000 words. Which of these two do you think can handle the load.

    Read the article

  • fluent nhibernate not caching queries in asp.net mvc

    - by AWC
    I'm using a fluent nhibernate with asp.net mvc and I not seeing anything been cached when making queries against the database. I'm not currently using an L2 cache implementation. Should I see queries being cached without configuring an out of process L2 cache? Mapping are like this: Table("ApplicationCategories"); Not.LazyLoad(); Cache.ReadWrite().IncludeAll(); Id(x => x.Id); Map(x => x.Name).Not.Nullable(); Map(x => x.Description).Nullable(); Example Criteria: return session .CreateCriteria<ApplicationCategory>() .Add(Restrictions.Eq("Name", _name)) .SetCacheable(true); Everytime I make a request for an application cateogry by name it is hitting the database is this expected behaviour?

    Read the article

  • Logging NHibernate SQL queries

    - by GuestMVCAsync
    Is there a way to access the full SQL query, including the values, inside my code? I am able to log SQL queries using log4net: <logger name="NHibernate.SQL" additivity="false"> <level value="ALL"/> <appender-ref ref="NHibernateSQLFileLog"/> </logger> However, I would like to find a way to log SQL queries from the code also. This way I will log the specific SQL query that causes an exception in my try/catch statement. Right now I have to data-mine the SQLFileLog to find the query that caused the exception when an exception occurs and it is not efficient.

    Read the article

  • SQLite problem with some parameterized queries

    - by Trevor Balcom
    I am having some trouble using SQLite and parameterized queries with a few tables. I have noticed some queries using the "SELECT * FROM Table WHERE row=?" are returning 1 row when there should be more rows returned. If I change the parameterized query to "SELECT * FROM Table WHERE row='row'" then the correct number of rows is returned. Does anyone know why sqlite3_step would return only 1 row when using a parameterized query vs. using the same query in a traditional non-parameterized way? I am using a very thin C++ wrapper around SQLite3. I suspect there could be a problem with the wrapper, but this problem only exists on a few tables. It makes me wonder if there is something wrong with the way those tables are setup. Any advice is appreciated.

    Read the article

  • Voting Script, Possibility of Simplifying Database Queries

    - by Sev
    I have a voting script which stores the post_id and the user_id in a table, to determine whether a particular user has already voted on a post and disallow them in the future. To do that, I am doing the following 3 queries. SELECT user_id, post_id from votes_table where postid=? AND user_id=? If that returns no rows, then: UPDATE post_table set votecount = votecount-1 where post_id = ? Then SELECT votecount from post where post_id=? To display the new votecount on the web page Any better way to do this? 3 queries are seriously slowing down the user's voting experience Edit In the votes table, vote_id is a primary key In the post table, post_id is a primary key. Any other suggestions to speed things up?

    Read the article

  • Associating multiple MySQL queries w/ PHP?

    - by anon
    I am trying to create a simple inventory request system. A user can enter multiple SKU's that will query the inventory database. My problem is I am trying to do is associate these multiple queries into a type of list. This list can later be retrieved and contains all queries that were submitted simultaneously. When the list is filled it can then be deleted. Is this possible? I am just looking to be pointed in the right direction. Thanks

    Read the article

  • How can I join this 2 queries?(A select query with join and An unpivot query)

    - by MANG KANOR
    Here are my two queries SELECT EWND.Position, NKey = CASE WHEN ISNULL(Translation.Name, '') = '' THEN EWND.Name ELSE Translation.Name END, Unit = EW_N_DEF.Units FROM EWND INNER JOIN EW_N_DEF ON EW_N_DEF.Nutr_No = EWND.Nutr_No LEFT JOIN Translation ON Translation.CodeMain = EWND.Nutr_no WHERE Translation.CodeTrans = 1 ORDER BY EWND.Position And this is the unpivot one SELECT * FROM (SELECT N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19,N20,N21,N22,N23,N24,N25,N26,N27,N28,N29,N30,N31,N32,N33,N34 FROM EWNVal WHERE Code=6035) Test UNPIVOT (Value FOR NUTCODE IN (N1,N2,N3,N4,N5,N6,N7,N8,N9,N10,N11,N12,N13,N14,N15,N16,N17,N18,N19,N20,N21,N22,N23,N24,N25,N26,N27,N28,N29,N30,N31,N32,N33,N34) )AS test Both Queries put out same number of rows but not columns, Is it possible to join this two? I tried the union but it has problems that I cant solve Thanks in advance!

    Read the article

  • Voting Script, Possiblity of Simplifying Database Queries

    - by Sev
    I have a voting script which stores the post_id and the user_id in a table, to determine whether a particular user has already voted on a post and disallow them in the future. To do that, I am doing the following 3 queries. SELECT user_id, post_id from votes_table where postid=? AND user_id=? If that returns no rows, then: UPDATE post_table set votecount = votecount-1 where post_id = ? Then SELECT votecount from post where post_id=? To display the new votecount on the web page Any better way to do this? 3 queries are seriously slowing down the user's voting experience

    Read the article

  • See queries that hit SQL

    - by Shaded
    I have a really basic stupid easy question about sql... and I'll probably get -100 points... but here it goes anyway... Is there a way using sql 2008 Management Studio to look at the queries that hit the server? I'm trying to debug a program and I get messages like "Incorrect syntax near the keyword 'AND'". Since the queries are being dynamically generated it's a hassle to figure out what is going to the server. Any help is appreciated!

    Read the article

  • Can I ask Postgresql to ignore errors within a transaction

    - by fmark
    I use Postgresql with the PostGIS extensions for ad-hoc spatial analysis. I generally construct and issue SQL queries by hand from within psql. I always wrap an analysis session within a transaction, so if I issue a destructive query I can roll it back. However, when I issue a query that contains an error, it cancels the transaction. Any further queries elicit the following warning: ERROR: current transaction is aborted, commands ignored until end of transaction block Is there a way I can turn this behaviour off? It is tiresome to rollback the transaction and rerun previous queries every time I make a typo.

    Read the article

  • Mixing JPA annotations and XML configuration

    - by HDave
    I have a fairly large (new) project in which we have annotated many domain classes with JPA mappings. Now it is time to implement many named queries -- some entities may have as many as 15-20 named queries. I am thinking that writing these named queries in annotations will clutter the source files and therefore am considering putting these in XML mapping files. Is this possible? Mort importantly, is this reasonable? Are there better approaches? How is this done?

    Read the article

  • Dig returns "status: REFUSED" for external queries?

    - by Mikey
    I can't seem to work out why my DNS isn't working properly, if I run dig from the nameserver it functions correctly: # dig ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> ungl.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24585 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;ungl.org. IN A ;; ANSWER SECTION: ungl.org. 38400 IN A 188.165.34.72 ;; AUTHORITY SECTION: ungl.org. 38400 IN NS ns.kimsufi.com. ungl.org. 38400 IN NS r29901.ovh.net. ;; ADDITIONAL SECTION: ns.kimsufi.com. 85529 IN A 213.186.33.199 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sat Mar 13 01:04:06 2010 ;; MSG SIZE rcvd: 114 but when I run it from another server in the same datacenter I receive: # dig @87.98.167.208 ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> @87.98.167.208 ungl.org ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 18787 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;ungl.org. IN A ;; Query time: 1 msec ;; SERVER: 87.98.167.208#53(87.98.167.208) ;; WHEN: Sat Mar 13 01:01:35 2010 ;; MSG SIZE rcvd: 26 my zone file for this domain is $ttl 38400 ungl.org. IN SOA r29901.ovh.net. mikey.aol.com. ( 201003121 10800 3600 604800 38400 ) ungl.org. IN NS r29901.ovh.net. ungl.org. IN NS ns.kimsufi.com. ungl.org. IN A 188.165.34.72 localhost. IN A 127.0.0.1 www IN A 188.165.34.72 The server is running Ubuntu 9.10 and Bind 9, if anyone can shed some light on this for me it'd make me very happy! thanks

    Read the article

  • need help with automating a CMD java tool which queries alexa AWS using batch

    - by Eli.C
    Hi everyone, I need to get all available info on 600 URLs from "Alexa Web Information Service", I downloaded the java tool and I'm able to run a single query each time with a single switch/Response Group. I would like to ask how to write a batch file that would automate the process? The java tool runs from the CMD with the following: C:\>java UrlInfo (key1) (key2) (URL) (Response Group) UrlInfo - constant key1 - constant key2 -constant URL - variable (I guess I need to use the "(" sign to read from a file) Response Group - variable - (14 total, and I need to run each Response Group on each of the URLs once ) the app returns data in clear text formatted as XML after each query, here is an example: C:\>java UrlInfo (key1) (key2) www.url.com Rank Response: (?xml version="1.0"?) (aws:UrlInfoResponse xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:Response xmlns:aws="http://awis.amazonaws.com/doc/2005-07-11") (aws:OperationRequest) (aws:RequestId)ec2b6-e8ae-b392(/aws:RequestId) (/aws:OperationRequest) (aws:UrlInfoResult) (aws:Alexa) (aws:TrafficData) (aws:DataUrl type="canonical")url.com/(/aws:DataUrl) (aws:Rank)**472906**(/aws:Rank) (/aws:TrafficData) (/aws:Alexa) (/aws:UrlInfoResult) (aws:ResponseStatus xmlns:aws="http://alexa.amazonaws.com/doc/2005-10-05/") (aws:StatusCode)Success(/aws:StatusCode) (/aws:ResponseStatus) (/aws:Response) (/aws:UrlInfoResponse) Any help would be really appreciated Thanks and regards Eli.C

    Read the article

  • Queries related to Windows 8 Upgrade installation media

    - by Karan
    I don't expect all these questions to be answered right away. Gradually over time is fine. Also, I guess the answers would differ depending on the language, so I'm looking for information related to the English/en-US versions only (I believe there is an en-GB version as well?) The Windows 8 Upgrade Assistant allows one to create USB/DVD (ISO) media: Is the media customised per-PC in any way, or are copies created on different PCs with different base OSes (XP/Vista/7) exactly the same? If the ISOs are not customised, are they exactly the same content-wise as the Upgrade DVDs available for purchase?

    Read the article

  • Bonjour/DNS Service Discovery queries

    - by senloe
    I'm trying to implement dns service discovery in my application (no, I'm not asking for a programmatic answer). What I believe is one of my big pain points is generating the query. I know I need to send out a multicast broadcast on port 5353 and want to look for devices of type _ipp._tcp and _print._tcp, but I don't know what the question section needs to look like. For example, in SSDP I sent out a query that looks like the following: "M-SEARCH * HTTP/1.1\r\n" "HOST: 239.255.255.250:1900\r\n" + "MAN: \"ssdp:discover\"\r\n" "ST: urn:schemas-upnp-org:device:Printer:1\r\n" "MX: 5000\r\n\r\n" From what I know about a DNS query I need to send something like: "_ipp.tcp,all,all" but I know there needs to be more. Any pointers to documentation, etc would be greatly appreciated! update rfc1035 appears to contain promising information re the message structure.

    Read the article

  • PowerDNS 3+ - Recursive queries for subdomains

    - by PDNS Troubles
    We are trying to find functionality in the PDNS 3.x that existed in PDNS < 2.9.2.5. Whereby if we have a domain in the database backend with records, if a query is unable to resolve a subdomain it would then query the recursor setup in the pdns.conf file. We have found that on Centos 6.x the rpm packages are the latest verison of pdns where by 5.x available was pdns-2.9.22-4.el5. The pdns-2.9.22-4.el5 package works as expected but when upgrading servers to Centos 6.x we loose this required functionality. pdns-backend-mysql-2.9.22-4.el5.rpm fails to install on Centos 6.x due to mysql libs that aren't availble, this is caused by an upgrade in the mysql version whereby the pdns backend mysql requires older mysql libs then what is available on centos 6.x . Installing from source is also troublesome with the following errors - http://pastebin.com/B5cUuD08

    Read the article

  • Dig returns "status: REFUSED" for external queries?

    - by Mikey
    I can't seem to work out why my DNS isn't working properly, if I run dig from the nameserver it functions correctly: # dig ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> ungl.org ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: NOERROR, id: 24585 ;; flags: qr aa rd ra; QUERY: 1, ANSWER: 1, AUTHORITY: 2, ADDITIONAL: 1 ;; QUESTION SECTION: ;ungl.org. IN A ;; ANSWER SECTION: ungl.org. 38400 IN A 188.165.34.72 ;; AUTHORITY SECTION: ungl.org. 38400 IN NS ns.kimsufi.com. ungl.org. 38400 IN NS r29901.ovh.net. ;; ADDITIONAL SECTION: ns.kimsufi.com. 85529 IN A 213.186.33.199 ;; Query time: 1 msec ;; SERVER: 127.0.0.1#53(127.0.0.1) ;; WHEN: Sat Mar 13 01:04:06 2010 ;; MSG SIZE rcvd: 114 but when I run it from another server in the same datacenter I receive: # dig @87.98.167.208 ungl.org ; <<>> DiG 9.5.1-P2.1 <<>> @87.98.167.208 ungl.org ; (1 server found) ;; global options: printcmd ;; Got answer: ;; ->>HEADER<<- opcode: QUERY, status: REFUSED, id: 18787 ;; flags: qr rd; QUERY: 1, ANSWER: 0, AUTHORITY: 0, ADDITIONAL: 0 ;; WARNING: recursion requested but not available ;; QUESTION SECTION: ;ungl.org. IN A ;; Query time: 1 msec ;; SERVER: 87.98.167.208#53(87.98.167.208) ;; WHEN: Sat Mar 13 01:01:35 2010 ;; MSG SIZE rcvd: 26 my zone file for this domain is $ttl 38400 ungl.org. IN SOA r29901.ovh.net. mikey.aol.com. ( 201003121 10800 3600 604800 38400 ) ungl.org. IN NS r29901.ovh.net. ungl.org. IN NS ns.kimsufi.com. ungl.org. IN A 188.165.34.72 localhost. IN A 127.0.0.1 www IN A 188.165.34.72 and the named.conf.options is default: options { directory "/var/cache/bind"; // If there is a firewall between you and nameservers you want // to talk to, you may need to fix the firewall to allow multiple // ports to talk. See http://www.kb.cert.org/vuls/id/800113 // If your ISP provided one or more IP addresses for stable // nameservers, you probably want to use them as forwarders. // Uncomment the following block, and insert the addresses replacing // the all-0's placeholder. // forwarders { // 0.0.0.0; // }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { ::1; }; listen-on { 127.0.0.1; }; allow-recursion { 127.0.0.1; }; }; named.conf.local: // // Do any local configuration here // // Consider adding the 1918 zones here, if they are not used in your // organization // include "/etc/bind/zones.rfc1918"; zone "eugl.eu" { type master; file "/etc/bind/eugl.eu"; notify no; }; zone "ungl.org" { type master; file "/etc/bind/ungl.org"; notify no; }; The server is running Ubuntu 9.10 and Bind 9, if anyone can shed some light on this for me it'd make me very happy! thanks

    Read the article

  • wmic output well formed xml on remote queries

    - by Mervin
    I want to use the WMI command line tool (wmic) to get information about windows computers on the network and output it as valid xml. However, I can't seem to find the right way to do this as the outputted xml currently contains invalid tokens for which I think I should use the /TRANSLATE:basicxml switch. The command: wmic /NODE:"tech-demo" /IMPLEVEL:Impersonate /USER:MyUser /PASSWORD:MyPassword /PRIVILEGES:DISABLE /AUTHLEVEL:Pkt /AUTHORITY:"ntlmdomain:companydomain.local" PATH Win32_LogicalDisk GET * /FORMAT:rawxml This command runs but returns invalid xml tokens ('<' and '' I think? edit: it appears to fail parsing at ‹) When I add the translate switch I get the message: Can not use credentials for local connections a bit strange that it tries to query the local pc when I add the switch.. Help would be greatly appreciated.

    Read the article

  • Large Queries in Google

    - by marienbad
    I have a large query I want to do in google. It's just a string of OR's for the purpose of determining which search terms are ranked the highest compared to the others. It's not ABSURDLY large -- it's only 5,500 characters. But Google says: Request-URI Too Large The requested URL /search... is too large to process. Is there a way around?

    Read the article

  • php server settings for restrict post queries

    - by Korjavin Ivan
    I have php script on hosting, which receive big data with ajax/post. Just now, after some works on hosting, I see that script is broken. I checked with curl: file temp1: user_avatar=&user_baner=&user_sig=.... 237 chars total, and curl -H "X-Requested-With: XMLHttpRequest" -X POST --data @temp1 'http://host/mypage.php' works perfect. But with file temp2: name=%D0%9C%D0%B5%D0%B1%%B5%D0%BB%D1%8C%D0%A4%%B0%D0%B1%D1%80%D0%B8%D0%BA%D1%8A&user_payed=0000-00-00&...positions%5B5231%5D=on total chars: 65563 curl -H "X-Requested-With: XMLHttpRequest" -X POST --data @temp2 'http://host/mypage.php' curl return nothing. Looks like a problem with apache/php/php.ini or something like that. I check .htaccess php_value post_max_size 20M Which other parameters I should check? Is it possible that %BO encode kill php/apache? Or total number of parameters (about 2800) ?

    Read the article

  • How to have your DNS servers forward queries for internet names

    - by Xavier Hutchinson
    I have 2 Domain Controllers / DNS servers on Windows 2012, their IPs are 10.0.1.10 and 10.0.1.11 Another server acts as the DHCP server for clients, and sets their primary and secondary DNS to the IP addresses of the previously mentioned domain controllers / DNS servers. However I cannot resolve internet domain names, presumably as they are not hosted on the DNS servers. So my question is what do I have to do on my setup to resolve external domains? Thank you! Xavier.

    Read the article

< Previous Page | 6 7 8 9 10 11 12 13 14 15 16 17  | Next Page >