Search Results

Search found 6630 results on 266 pages for 'cname record'.

Page 172/266 | < Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >

  • mysql query the latest date

    - by user295189
    I am running this query SEL ECT sh.*, u.initials AS initals FROM database1.table1 AS sh JOIN database2.user AS u ON u.userID = sh.userid WHERE id = 123456 AND dts = ( SELECT MAX(dts) from database1.table1 ) ORDER BY sort_by, category In the table1 I have records like this dts status category sort_by 2010-04-29 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:27 Civil Engineers Occupation 1 2010-04-28 12:20:54 Married Marital Status 2 2010-04-28 12:21:15 Smoker Tobbaco 3 2010-04-27 12:20:27 Civil Engineers Occupation 1 2010-04-27 12:20:54 Married Marital Status 2 2010-04-27 12:21:15 Smoker Tobbaco 3 2010-04-26 12:20:27 Civil Engineers Occupation 1 2010-04-26 12:20:54 Married Marital Status 2 2010-04-26 12:21:15 Smoker Tobbaco 3 so if you look at my data, I am choosing the latest entry by category and sort_id. however in some case such as on 29th (2010-04-29 12:20:27) I have only one record. So in this case I want to show occupation for latest and then the rest of them (latest). But currently it displays only one row. Thanks

    Read the article

  • Linq2SQL using Update StoredProcedure

    - by PeterTheNiceGuy
    We use queries generated by Linq for data retrieval but for INSERT and UPDATE we do not allow generated SQL, but restrict to the use of stored procedures. I connected the Update and the Insert behaviour in the DBML to the stored procedures. The procedures are called, the data gets inserted/updated = all if fine, except in the case of optimistic concurrency. If a record was changed between retrieval and update, the update should fail. When Linq generates the Update statement itself, it throws a ChangeConflictException as expected, but using the stored procedure no Exception is thrown. Thanks a lot for any help on this!

    Read the article

  • Any tutorial for Python PalmDB library?

    - by roddik
    Hello, I've downloaded the Python PalmDB lib, but can't find any info on how to use it. I've tried reading docstrings and so far I've been able to come up with the following code: from pprint import pprint from PalmDB.PalmDatabase import PalmDatabase pdb = PalmDatabase() with open('testdb.pdb','rb') as data: pdb.fromByteArray(data.read()) pprint(dir(pdb)) pprint(pdb.attributes) print pdb.__doc__ #print pdb.records print pdb.records[10].toXML() which gives me the xml representation of a record (?) with some nasty long payload attribute, which doesn't resemble any kind of human-readable text to me. I just want to read the contents of the pdb file. Is there a guide/tutorial for this library? What would you do to figure out the proper way to make things done in my situation?

    Read the article

  • SSIS - Upgrade from 2005 to 2008 - How to set a project property when I don't have a project

    - by Greg
    I have about 160 SSIS packages that I'm trying to upgrade from 2005 to 2008. When I run SSISUpgrade.exe on them, I get the following error messages on many of the packages: Error 0xc0209303: ...: SSIS Error Code DTS_E_OLEDB_NOPROVIDER_64BIT_ERROR. The requested OLE DB provider MICROSOFT.JET.OLEDB.4.0 is not registered -- perhaps no 64-bit provider is available. enter code here`Error code: 0x00000000. An OLE DB record is available. Source: "Microsoft OLE DB Service Components" Hresult: 0x80040154 Description: "Class not registered". This fellow says that to fix this I need to set the run64bitruntime debugging property to False. However each of these packages exists outside of a project file. How can I set this property without having a project file?

    Read the article

  • MySQL Trigger creation

    - by Bruce Garlock
    I have an application where I need to INSERT an auto_increment value from a PK in another table. I know how to do this in PHP, but I need to have this done at the DB level, since I cannot change the program logic. I am new to triggers, so I'm sure this will be an easy answer for someone. Here is what I have so far: DELIMITER // CREATE TRIGGER new_project AFTER INSERT ON m_quality_header FOR EACH ROW BEGIN INSERT INTO m_quality_detail (d_matl_qa_ID) VALUES (NEW.h_matl_qa_ID); END// DELIMITER ; I just want the value of the auto_increment value from h_matl_qa_ID to be inserted as a new record into d_matl_qa_ID. The error I get is: "This version of MySQL doesn't yet support 'multiple triggers with the same action time and event for one table' But, I don't want to update the table that has the trigger, so why is my current code considered a 'multiple' trigger? This is on MySQL 5.0.45-7.el5 running on a CentOS 5 server (64-bit Intel) If I have to, I can modify the PHP code, but that needs to be the last resort.

    Read the article

  • difference between adobe flash media server products

    - by Oren Mazor
    Hey folks, I've been told that I can only record streams with flash media interactive server. I already have Flash media streaming server running to stream flvs. it would seem to be trivial to set up the interactive server, and adobe obliges me by having a developer download. however, once I extracted that download, it appears to contain just standard flash media streaming server? is adobe screwing with me? the more I look into this the more it seems that nobody is actually differentiating between the two except adobe (who charge $1000 for fms, and $4000 for fmis).

    Read the article

  • How to extract frequency information from samples from PortAudio using FFTW in C

    - by houbysoft
    Hi all, I want to make a program that would record audio data using PortAudio (I have this part done) and then display the frequency information of that recorded audio (for now, I'd like to display the average frequency of each of the group of samples as they come in). From some research I've done, I know that I need to do an FFT. So I googled for a library to do that, in C, and found FFTW. However, now I am a little lost. What exactly am I supposed to do with the samples I recorded to extract some frequency information from them? What kind of FFT should I use (I assume I'd need a real data 1D?)? And once I'd do the FFT, how do I get the frequency information from the data it gives me? Thanks a lot in advance.

    Read the article

  • Removing New line character in Fields PHP

    - by Aruna
    Hi, i am trying to upload an excel file and to store its contents in the Mysql database. i am having a problem in saving the contents.. like My csv file is in the form of "1","aruna","IEEE paper" "2","nisha","JOurnal magazine" actually i am having 2 records and i am using the code <?php $string = file_get_contents( $_FILES["file"]["tmp_name"] ); //echo $string; foreach ( explode( "\n", $string ) as $userString ) { echo $userString; } ? since in the Csv record there is a new line inserted in between IEEE and paper it is dispaying me as 3 records.. How to remove this new line code wise and to modify the code so that only the new line between the records 1 and 2 is considered... Pls help me....

    Read the article

  • oracle pl sql dump result into file

    - by CC
    Hi. I'm working on a pl sql stored procedure. What I need is to do a select, use a cursor and for every record build a string using values. At the end I need to write this into a file. I try to use dbms_output.put_line("toto") but the buffer size is to small because I have about 14 millions lines. I call my procedure from a unix ksh. I'm thinking at something like using "spool on" (on the ksh side) to dump the result of my procedure, but I don' know how to do it (if this is possible) Anyone has any idea? Thank alot. C.C.

    Read the article

  • searching for address matches using sql server 2008 full text search

    - by Sridhar
    Hi, I am not sure how to search for address matches using sql server 2008 full text search. This is what I tried but it doesn't return any records. TableA ------ Address1 Address2 City State Zip All the above columns in the table are full text indexed. Let's say if the user enters "123 Apple street FL 33647" and I have a record in the table as Address1 = "123" , Address2 = "Apple street", City = "Tampa", State = "FL" and Zip = "33647" I would like the query to return this. can you please let me know how I would do this. query tried -------------- SELECT * FROM TableA WHERE CONTAINS((Address1, Address2, City, State, zip), N'FORMSOF(THESAURUS, 123AppleStreetFL33647)'); If I put spaces in the search word, it is giving syntax error. Thanks, sridhar.

    Read the article

  • InfoPath Repeating Group with Data from SharePoint and User Input

    - by 0x808080
    I have a series of questions which are pulled from a SharePoint list and loaded into a repeating section. The section has three elements, the Question # (from SharePoint), and Question itself (from SharePoint), and a drop down box Yes/No (NOT from SharePoint)... The repeating group portion works just fine, it is pulling all Question # and Questions from the SharePoint site, but I cannot bind the drop down box (yes/no) to any sort of local data source in order to record the information. Essentially what I have is a dynamically generated form which pulls questions off a SharePoint and a user will answer Yes or No for each question. I cannot associate the Yes/No drop down with anything because it resides within a Repeating section... Thanks for any help!

    Read the article

  • passing table id

    - by soclose
    Hi In Android, I make a list view that describe the name fields from a table in SQLite. Clicking long-term on any List Item, context menu appears and then I wanna get the ID of that item (I mean in the table, there are ID and name fields) and pass this ID to next layout. Why I wanna pass this ID is to update this record in SQLite table. Here the next layout will be tablelayout. how to pass any value from one layout to another? how to code?

    Read the article

  • SQL Query with ORDER BY Part 2

    - by Brett
    Hi SQL'ers, This is a followup question to: SQL Query with ORDER BY But I think the SQL logic is going to be quite different, so I am posting it as separate question. I am trying to extend my sql SELECT query it and having some trouble: I have the table: id type radius ------------------------- 1 type1 0.25 2 type2 0.59 3 type1 0.26 4 type1 0.78 5 type3 0.12 6 type2 0.45 7 type3 0.22 8 type3 0.98 and I am trying to learn how to SELECT the second smallest radius for each given type. So the returned recordset should look like: id type radius ------------------------- 3 type1 0.26 2 type2 0.59 7 type3 0.22 (Note: in the referenced question, I was looking for the lowest radius, not the second lowest radius). I am assuming I have to use LIMIT and OFFSET, but if I use the MIN() won't that return a distinct record containing the minimum radius? Does anyone have any thoughts on how to attack this? Many thanks, Brett

    Read the article

  • MDE Access decrypt JDBC

    - by michelemarcon
    I want to perform JDBC SQL queries on a MDE Access file. I've set up the data source ODBC and everything worked well for a MDE file. Now, I'm working with a newer version of the MDE file, and here is the result: java.sql.SQLException: [Microsoft][Driver ODBC Microsoft Access] Cannont read record. Read authorization unavailable for "tbl_mytable". If I open the MDE with Access Runtime I am asked for a password, and after leaving a blank password I can see all the data. Of course, "tbl_mytable" does exist inside the database.

    Read the article

  • oracle global temporary tables

    - by mrp
    I created the global temp table. when I execute the code as an individual scripts it works fine. but when I execute it as a single script in TOAD then no record was created. there was just an empty global temp table. eg. CREATE GLOBAL TEMPORARY TABLE TEMP_TRAN ( COL1 NUMBER(9), COL2 VARCHAR2(30), COL3 DATE ) ON COMMIT PRESERVE ROWS / INSERT INTO TEMP_TRAN VALUES(1,'D',sysdate); / INSERT INTO TEMP_TRAN VALUES(2,'I',sysdate); / INSERT INTO TEMP_TRAN VALUES(3,'s',sysdate); / COMMIT; When I run the above code one statement at a time it works fine. But when I execute it as a script it runs fine but there was no records in temp table. can anyone help me on this please?

    Read the article

  • SQL: Need to SUM on results that meet a HAVING statement

    - by Wasauce
    I have a table where we record per user values like money_spent, money_spent_on_candy and the date. So the columns in this table (let's call it MoneyTable) would be: UserId Money_Spent Money_Spent_On_Candy Date My goal is to SUM the total amount of money_spent -- but only for those users where they have spent more than 10% of their total money spent for the date range on candy. What would that query be? I know how to select the Users that have this -- and then I can output the data and sum that by hand but I would like to do this in one single query. Here would be the query to pull the sum of Spend per user for only the users that have spent 10% of their money on candy. SELECT UserId, SUM(Money_Spent), SUM(Money_Spent_On_Candy) / SUM(Money_Spent) AS PercentCandySpend FROM MoneyTable WHERE DATE >= '2010-01-01' HAVING PercentCandySpend > 0.1;

    Read the article

  • Is it safe to use Select Top and Delete Top in sequence?

    - by Rob Nicholson
    I often write T-SQL loops that look like this While Exists (Select * From #MyTable) Begin Declare @ID int, @Word nvarchar(max) Select Top 1 @ID=ID, @Word=[Word] From #MyTable -- Do something -- Delete #MyTable Where ID=@ID End Works a treat but I noticed the new Delete Top function which would be useful when #MyTable is just a list of strings. In this case, would this work: While Exists (Select * From #MyTable) Begin Declare @Word nvarchar(max) Select Top 1 @Word=[Word] From #MyTable -- Do something -- Delete Top(1) #MyTable End Well yes, it works in my test script but is this safe? Will Select Top 1 and Delete Top(1) always refer to the same record or is Top a little more vague. Thanks, Rob.

    Read the article

  • Oracle(10) SQL: calculating final sum depending on two field

    - by Zsolt Botykai
    First the disclaimer: I never learnt any programming in school, and just have to deal with various SQL problems (too). So now I've got two tables, TABLE1: ACCNO BAL1 BAL2 11111 20 10 And TABLE2 (which has the ACCNO key, of course) related rows to '11111': DATENUM AMT 1 -5 2 -10 3 8 4 -23 5 100 6 -120 7 140 Now I have to find the new BAL1 and BAL2 using the following rules: BAL1 AMT must be substracted from or added to BAL1 until BAL1 == 0 (and BAL2 0) if BAL1 reaches 0 then the (if any) remainder of BAL1 must be substracted from BAL2 if BAL2 reaches 0 too, from then only BAL1 should be modified. So using the above data: DATENUM AMT BAL1 BAL2 0 0 20 10 /*starting record*/ 1 -5 15 10 2 -10 5 10 3 8 13 10 4 -23 0 0 5 100 100 0 6 -120 -20 0 7 140 20 0 And I need the last two BAL1 and BAL2. How can I calculate them using (Oracle 10) SQL?

    Read the article

  • Simple Linq Dynamic Query question

    - by Dr. Zim
    In Linq Dynamic Query, Scott Guthrie shows an example Linq query: var query = db.Customers. Where("City == @0 and Orders.Count >= @1", "London", 10). OrderBy("CompanyName"). Select("new( CompanyName as Name, Phone)"); Notice the projection new( CompanyName as Name, Phone). If I have a class like this: public class CompanyContact { public string Name {get;set;} public string Phone {get;set;} } How could I essentially "cast" his result using the CompanyContact data type without doing a foreach on each record and dumping it in to a different data structure? To my knowledge the only .Select available is the Dymanic Query version which only takes a string and parameter list.

    Read the article

  • Database design: circular references

    - by SlappyTheFish
    I have three database tables: users emails invitations Emails are linked to users by a user_id field. Invitations are also linked to users by a user_id field Emails can be created without an invitation, but every invitation must have an email. I would like to link the emails and invitations tables so it is possible to find the email for a particular invitation. However this creates a circular reference, both an invitation and an email record hold the id for the same user. Is this bad design and if so, how could I improve it? My feeling is that with use of foreign keys and good business logic, it is fine.

    Read the article

  • Web Services: more frequent "small" calls, or less frequent "big" calls

    - by Klay
    In general, is it better to have a web application make lots of calls to a web service getting smaller chunks of data back, or to have the web app make fewer calls and get larger chunks of data? In particular, I'm building a Silverlight app that needs to get large amounts of data back from the server in response to a query created by a user. Each query could return anywhere from a few hundred records to a few thousand. Each record has around thirty fields of mostly decimal-type data. I've run into the situation before where the payload size of the response exceeded the maximum allowed by the service. I'm wondering whether it's better (more efficient for the server/client/web service) to cut this payload vertically--getting all values for a single field with each call--or horizontally--getting batches of complete records with each call. Or does it matter?

    Read the article

  • VBA - Create ADODB.Recordset from the contents of a spreadsheet

    - by robault
    Hello, I am working on an Excel application that queries a SQL database. The queries can take a long time to run (20-40 min). If I've miss-coded something it can take a long time to error or reach a break point. I can save the results to a sheet fine, it's when I am working with the record sets that things can blow up. Is there a way to load the data into a ADODB.Recordset when I'm debugging to skip querying the database (after the first time)? Would I use something like this? http://stackoverflow.com/questions/2086234/query-excel-worksheet-in-ms-access-vba-using-adodb-recordset

    Read the article

  • TypeInitializationException When Getting an NHibernate Session

    - by Paul Johnson
    I’ve run into what appears to be an NHibernate config problem. Basically, I ran up a simple proof of concept persistence integration test using NUnit, the test simply querys an Oracle database and successfully returns the last record received by the underlying table. However, when the assemblies are taken out of the NUnit test environment and deployed as they would be for an actual application build, my call for an NHibernate session results in a ‘TypeInitializationException’ whilst executing the code line: sessionFactory = New Configuration().Configure().BuildSessionFactory() The application is a vb.net console app running against an Oracle 9.2 database, using a ‘coding framework’ published on the web by Bill McCafferty entitled 'NHibernate Best Practices with ASP.NET' (pre S#harp Architecture). I am running version 2.1.2.4000 of NHibernate. Any assistance much appreciated. Kind Regards Paul J.

    Read the article

  • multiple records using the select_tag

    - by JZ
    I'm attempting to display multiple records, with each record displaying its own selection box. I would like to submit this form and pass a hash, having the Add.id function as the key of the hash, and the selection box option pass as the information in the hash. How could I fix my code? is this even possible with the select_tag method? <%= form_tag yardsign_adds_path, :method => :post do %> <%= select_tag "support_code[]", options_for_select([[ "1 - Strong Supporter", add.id ], [ "2 - Likely Voter" ], [ "3 - Undecided" ], [ "4 - Likely Opposed" ], [ "5 - Strongly Opposed" ]]) %> <%= submit_tag "Update" %> <% end %> Current terminal output: Started POST "/adds/yardsign" for 127.0.0.1 at 2010-04-17 01:36:03 Processing by AddsController#yardsign as HTML Parameters: {"commit"=>"Update", "authenticity_token"=>"VQ2jVfzHI7pB+87lQa9NWqvUK3zwJWiJE7CwAnIewiw=", "support_code"=>["1", "3 - Undecided", "3 - Undecided"]}

    Read the article

  • archiving table records to another table by trigger(move daialy table records to weekly table, evry

    - by sirvan
    I have written this trigger in mysql 5: create trigger changeToWeeklly after insert on tbl_daily for each row begin insert into tbl_weeklly SELECT * FROM vehicleslocation v where v.recivedate < curdate(); delete FROM tbl_daily where recivedate < curdate(); end; i want to archive records by date, move yesterday inserted record from dailly to weekly table and last weekly table to mounthly table and deletes this records from previous table this trigger has following error when insert in daily tabled occurred : "Can't update table 'tbl_daily' in stored function/trigger because it is already used by statement which invoked this stored function/trigger." please help me to solve th problem of archive old data in related tables: move yesterday inserted records to weekly table, if there is a reliable solution tell me please.

    Read the article

< Previous Page | 168 169 170 171 172 173 174 175 176 177 178 179  | Next Page >