Search Results

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

Page 178/266 | < Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >

  • T-SQL aggregate function Logical error

    - by Yoda
    Hi Guys, Ok I have a data table containing duplicate Reciept numbers and a transaction value for each record, I need to simply list the total for each unique Reciept number, this is obviously a simple problem but I am missing something. Any help is much appriciated > SELECT Gf_Receipt_number AS Reciept, > SUM (Gf_Amount) AS Total FROM > [TestP].[dbo].[Gf] WHERE > Gf_Receipt_number IS NOT NULL GROUP > BY Gf_Amount Would probably help to mention the the error I am recieving is: Column 'TestP.dbo.Gf.Gf_Receipt_number' is invalid in the select list because it is not contained in either an aggregate function or the GROUP BY clause.

    Read the article

  • MS Word: Mailmerge hyperlinks with query get url string with a mergefield.

    - by oterrada
    Hi, I'm trying to send an email merging one document (docx) with a contacts database (via OleDB). Using MSWord2007, it seems easy (it works for easy things: name, address, ...) but I can't find how fill an query-get url string with a merge field inside an hyperlink. An hyperlink like: Click here where here is an hyperlink to http://domain.com/[email protected] where [email protected] is the address of the contact, a merge field. I've tried the special/merge fields: {HYPERLINK "http://domain.com/test.php?contact={MERGEFIELD contactEmail}" \o "Here"} but it doesn't work, sometimes it merge only the first record and then send all the mails with the same address, I got this alternating the view with ALT+F9. This support doc doesn't work for me because I don't have the complete URL in my database for each contact, and I can't change the design of the table or add a view (it's from the CRM), I don't like to do it exporting the table and adding the field. Any idea? Thanks in advance,

    Read the article

  • Script to download file and rename according to date on Windows Vista machine?

    - by Dave
    Hi, I need to daily run a script that will download a file from a fixed location and save it on my computer with an appropriate filename-YYYYMMDD-HHSS.ext timestamp. I need a historical record of what that file was at that particular time. I can manually check and see what the changes were, so compairson not needed. (I was looking for an online service that would do this for me, but I think a locally running script on my machine would be good enough). Although i do have php on my machine, i would prefer if its a pure windows builtin solution, just in case i have to (likely) adapt it to someone else's system (non-techies). If someone has something like this and can contribute the code - help would be most appreciated!! D

    Read the article

  • Tame this format with a cross tab ?

    - by Damien Joe
    I have result of query in form EmpId Profit OrderID CompanyName ------ ------ ------- -------------- 1 500 $ 1 Acme Company 1 200 $ 1 Evolve Corp. 2 400 $ 1 Acme Company 2 100 $ 1 Evolve Corp. 3 500 $ 1 Acme Company 3 500 $ 1 Evolve Corp. Now the desired report format is EmpId OrderId Acme's Profit Evolve's Profit ----- ------ ------------- --------------- 1 1 700 $ 700 $ 2 1 500 $ 500 $ 3 3 1000 $ 1000 $ I tried hard at the crosstab but I'm unable to figure out how to group the records. I tried moving CompanyName in CrossTab columns and moved EmpId in rows & tried a cross tab group but results are not as expected. My questions are 1) Is this format achievable with a cross tab ? 2) How do I group record's by EmpId's in my crosstab in such a way that the Companies are moved horizontally ?

    Read the article

  • Google Local Search API

    - by Gublooo
    hey guys couple of quick questions 1) In the local search results - we can get a lot of parameters like street title, address, city, state, lat, long , url etc - In order for me to uniquely identify this record - can I consider URL to be unique to this address or concatenation of latitude and longitude Ref: http://code.google.com/apis/ajaxsearch/documentation/reference.html#_class_GlocalResult 2) In terms of usage, depending upon what user enters, I'm displaying a list of local business for the user to choose. Now when a user selects a particular business address - is it legal for me to store that business address along with lat and longitude information in my database for future look ups. I've seen a lot of blogs talking about storing the lat/long info but just want to be sure that i'm not violating and google rules. Thanks

    Read the article

  • Delphi Compiler Directive to Evaluate Arguments in Reverse

    - by Peter Turner
    I was really impressed with this delphi two liner using the IFThen function from Math.pas. However, it evaluates the DB.ReturnFieldI first, which is unfortunate because I need to call DB.first to get the first record. DB.RunQuery('select awesomedata1 from awesometable where awesometableid = "great"'); result := IfThen(DB.First = 0, DB.ReturnFieldI('awesomedata1')); Obviously this isn't such a big deal, as I could make it work with five robust liners. But all I need for this to work is for Delphi to evaluate DB.first first and DB.ReturnFieldI second. I don't want to change math.pas and I don't think this warrants me making a overloaded ifthen because there's like 16 ifthen functions. Just let me know what the compiler directive is, if there is an even better way to do this, or if there is no way to do this and anyone whose procedure is to call db.first and blindly retrieve the first thing he finds is not a real programmer.

    Read the article

  • Why won't my anonymous function fire on grid.prerender?

    - by adam0101
    In my gridview I have fields for inserting a new record in the footer. In my objectdatasource selecting event if no records came back I bind a single mock row to force the footer to show so they can still add records. Since the row does not contain real data I hide the row. ... If result.ItemCount = 0 Then result = mockRow AddHandler mygridview.PreRender, AddressOf HideRow End If End Sub Private Sub HideRow(ByVal sender as Object, ByVal e as EventArgs) mygridview.Rows(0).Visible = False End Sub This works fine. However, I'd like to condense it like this: ... If result.ItemCount = 0 Then result = mockRow AddHandler mygridview.PreRender, Function() mygridview.Rows(0).Visible = False End If End Sub This compiles fine, but the row doesn't get hidden. Can anyone tell me why my anonymous function isn't getting hit?

    Read the article

  • Sorting MySQL results within a resultset

    - by InnateDev
    I have a resultset of lets say 10 results. 3 of them have a type 'Pears', and the next 3 have a type 'Apples' and the next three have a type of 'Bananas'. The last record has a type of 'Squeezing Equipment' - unrelated to the fruits. How do I return this set of results (for pagination too) in a GROUPED order that I specify WITHOUT using any inherent sort factor like ALPHABETA or ID etc? I have the all types at my disposal before running the code so they can be specified. i.e. ID | Bananas ID | Bananas ID | Bananas ID | Apples ID | Apples ID | Apples ID | Pears ID | Pears ID | Pears ID | Squeezing Equipment

    Read the article

  • How to save big "database-like" class in python

    - by Rafal
    Hi there, I'm doing a project with reasonalby big DataBase. It's not a probper DB file, but a class with format as follows: DataBase.Nodes.Data=[[] for i in range(1,1000)] f.e. this DataBase is all together something like few thousands rows. Fisrt question - is the way I'm doing efficient, or is it better to use SQL, or any other "proper" DB, which I've never used actually. And the main question - I'd like to save my DataBase class with all record, and then re-open it with Python in another session. Is that possible, what tool should I use? cPickle - it seems to be only for strings, any other? In matlab there's very useful functionality named save workspace - it saves all Your variables to a file that You can open at another session - this would be vary useful in python!

    Read the article

  • Update gridview from code behind in asp.net

    - by Zerotoinfinite
    Hi Experts, I have gridview in my asp.net 3.5 application [C#]. Which looks like this: AutoGenerateDeleteButton="true" DataKeyNames="studentId" runat="server" OnRowEditing="GridView1_RowEditing" OnRowCancelingEdit="GridView1_RowCancelingEdit" OnRowDeleting="GridView1_RowDeleting" OnRowUpdating="GridView1_RowUpdating" onpageindexchanging="GridView1_PageIndexChanging" onrowupdated="GridView1_RowUpdated" <EmptyDataTemplate> <asp:Label ID="lblNoRecord" runat="server" Text="No Record Found" ForeColor="Red"></asp:Label> </EmptyDataTemplate> </asp:GridView> Now, In rowUpdating event, I am writing the below code: protected void GridView1_RowUpdating(object sender, GridViewUpdateEventArgs e) { int mytext = Convert.ToInt16(GridView1.Rows[e.RowIndex].Cells[1].Text); string cConatiner = GridView1.Rows[e.RowIndex].Cells[4].Text; } In this, myText is giving me the correct value, i.e. of the 1st column but when I am changing the cell value to 1,2,3,4,5,6 I am getting empty. Am I doing it incorrectly ? Please help me. Thanks in advance.

    Read the article

  • How to clean sys.conversation_endpoints

    - by Manjoor
    I have a table, a trigger on the table implemented using service broker. More than Half million records are inserted daily into the table. The asynchronous SP is used to check sveral condition by using inserted data and update other tables. It was running fine for last 1 month and the SP was get executed withing 2-3 seconds of insertion of record. But now it take more than 90 minute. At present sys.conversation_endpoints have too much records. (Note that all the table are truncated daily as I do not need those records day after) Other database activities are normal (average 60% CPU Utilization). Now where i need to look?? I can re-create database without any problem but i don't think it is a good way to resolve the problem

    Read the article

  • Is it worth caching a Dictionary for foreign key values in ASP.net?

    - by user169867
    I have a Dictionary<int, string> cached (for 20 minutes) that has ~120 ID/Name pairs for a reference table. I iterate over this collection when populating dropdown lists and I'm pretty sure this is faster than querying the DB for the full list each time. My question is more about if it makes sense to use this cached dictionary when displaying records that have a foreign key into this reference table. Say this cached reference table is a EmployeeType table. If I were to query and display a list of employee names and types should I query for EmployeeName and EmployeeTypeID and use my cached dictionary to grab the EmployeeTypeIDs name as each record is displayed or is it faster to just have the DB grab the EmployeeName and JOIN to get the EmployeeType string bypassing the cached Dictionary all together. I know both will work but I'm interested in what will perform the fastest. Thanks for any help.

    Read the article

  • Mysql-how to update the "domain.com" in "[email protected]"

    - by w00t
    Hi there, In my database I have a lot of users who've misspelled their e-mail address. This in turn causes my postfix to bounce a lot of mails when sending the newsletter. Forms include (but are not limited to) "yaho.com", "yahho .com" etc. Very annoying! So i have been trying to update those record to the correct value. After executing select email from users where email like '%@yaho%' and email not like '%yahoo%'; and getting the list, I'm stuck because I do not know how to update only the yaho part. I need the username to be left intact. So I thought I would just dump the database and use vim to replace, but I cannot escape the @ symbol.. BTW, how do I select all email addresses written in CAPS? select upper(email) from users; would just transform everything into CAPS, whereas I just needed to find out the already-written-in-CAPS mails.

    Read the article

  • asp.net mvc json open dialog box problem

    - by mazhar kaunain baig
    function postForm() { $.ajax({ type: "POST", data: $("#myForm").serialize(), dataType: "json", url: '<%= Url.Action("JSONRequest","Home") %>', success: function(result) { window.alert(result.name); }, error : function() { window.alert('error'); } }); } Html.BeginForm("JSONRequest", "Home", FormMethod.Post, new { id = "myForm" }); Html.TextBox("mazhar") <input type="submit" onclick="postForm" /> Html.EndForm(); public ActionResult JSONRequest(FormCollection form) { string a = form["mazhar"]; var data = new { name = "aaaa", Success = "Record is Succesfully Saved", ErrorMessages = "abc" }; return Json(data); } Ok the problem is that the dialog box is opening after running this code which is asking to save file. Can someone tell me how to resolve this issue?

    Read the article

  • How to insert all records into a table only one time

    - by Lu Lu
    Hello, I want to get all records from a table1 & insert them into table2. Table1 & table2 are in different databases, table1 and table2 are same structure. Normally, I will get all records from table1, and for each record (foreach), I will insert it into table2 by using "INSERT ...". I want to know a effect way to insert all records into table only one time without foreach. I use C#, .NET 2.0 & WinForm. Thanks.

    Read the article

  • Pascal error with array

    - by Donator
    program s;       type info = record                    name, surname: string;                    min, sec: integer;       end;       arrays = array[2..50] of info;       var A: arrays; begin       A[1].name := 'name'; end. What is wrong with that? It gives me range check error and I have no idea what is that.

    Read the article

  • How to delete characters and append strings?

    - by devin250
    i am adding a new record to xml file im first quering all existing items and storing the count in an int int number = query.count() and then incrementing number by 1; number = number +1; now i want to format this value in a string having "N00000000" format and the number will ocuppy the last positions Pseudo code: //declare the format string sting format = "N00000000" //calculate the length of number string int length =number.ToString().Length(); // delete as many characters from right to left as the length of number string ??? // finally concatenate both strings with + operator ??? help please

    Read the article

  • 2 Column Array in SAP ABAP A = 1, B = 2... ZZZ = ?

    - by Techboy
    I need to create a 2 column array in ABAP so that a program can look up a record item (defined by the letters A - ZZZ) and then return the number associated with it. For example: A = 1 B = 2 C = 3 ... Z = 26 AA = 27 AB = 28 ... AZ = BA = ... BZ = CA = ... ... ZZZ = Please can you suggest how I can code this. Is there a better option than writing an array? Thanks.

    Read the article

  • HQL query for entity with max value

    - by Rob
    I have a Hibernate entity that looks like this (accessors ommitted for brevity): @Entity @Table(name="FeatureList_Version") @SecondaryTable(name="FeatureList", pkJoinColumns=@PrimaryKeyJoinColumn(name="FeatureList_Key")) public class FeatureList implements Serializable { @Id @Column(name="FeatureList_Version_Key") private String key; @Column(name="Name",table="FeatureList") private String name; @Column(name="VERSION") private Integer version; } I want to craft an HQL query that retrieves the most up to date version of a FeatureList. The following query sort of works: Select f.name, max(f.version) from FeatureList f group by f.name The trouble is that won't populate the key field, which I need to contain the key of the record with the highest version number for the given FeatureList. If I add f.key in the select it won't work because it's not in the group by or an aggregate and if I put it in the group by the whole thing stops working and it just gives me every version as a separate entity. So, can anybody help?

    Read the article

  • Set User Defined Language Programmatically

    - by wonea
    I've been trying to select the User Defined Language programmatically unsuccessfully through various means, another problem is the files I need to apply the user defined language have no file extension, old DOS files; NPPM_SETCURRENTLANGTYPE (only enumerates built-in languages) Macros don't seem to sense changes with language selection, I was hoping to record a macro then trigger it with NPPExec. Notepad++ accepts only in-built languages for starting from the command line I can't select a UDL as the default language for a new document. ...and my attempts at overriding an in-built language seem to have failed. I've copied details from userDefinedLang.xml to langs.xml don't work. The highlighting doesn't change. Thanks for any help!!

    Read the article

  • ASP.NET MVC AJAX value not displaying

    - by mazhar kaunain baig
    View: function success(arg) { var obj = arg.get_response().get_object(); if (obj.ErrorMessage === '') { var answer = document.createElement('div'); answer.appendChild(document.createTextNode(obj.Answer)); document.getElementById('answers').appendChild(answer); } else { document.getElementById('errors').innerHTML = obj.ErrorMessage; } } <% using (Ajax.BeginForm("EditOrganizationMeta", "Organization", new AjaxOptions { HttpMethod = "POST", OnSuccess = "success" })) { %> <input type="submit" name="button<%=OrganizationMeta.vcr_MetaKey + Lang.int_LangId %>" value="Save" /> <div id="errors"></div> <div id="answers"></div> <% } %> Controller: [HttpPost] [ValidateInput(false)] public ActionResult EditOrganizationMeta(FormCollection collection) { return Json(new { Answer = "Record Successfully Saved", ErrorMessages = "Title is required" }); } The thing is that success method in the javascript is not getting the required parameters. It is printing undefined there. Is there a problem in javascript method OnSuccess?

    Read the article

  • MySQL, C++: Retrieving auto-increment ID

    - by Thomas Matthews
    I have a table with an auto-incrementing ID. After inserting a new row, I would like to retrieve the new ID. I found an article that used the MySQL function LAST_INSERT_ID(). The article says to create a new query and submit it. I'm using MySQL Connector C++, Windows XP and Vista, and Visual Studio 9. Here are my questions: Is there an API, for the connector, that will fetch the ID out of the record? Does the result set, after an insert/append, contain the new ID? The LAST_INSERT_ID is MySQL specific. Is there an SQL standard method for obtaining the new ID?

    Read the article

  • JSON Date coming through as Today's date?

    - by Liam
    I'm trying to convert a JSON date to a dd/mm/yyyy format, which I'm managing to do semi-successfully. The problem I'm encountering is that the date from the record in the DB is for example, 2009-06-29 which is returning the usual JSON /Date(1246230000000)/, however, when I try and turn it into the previously mention dd/mm/yyyy format, it's coming through as today's date. The code I'm using to try and do this is: $('input#EmployeeName').result(function(event, data, formatted) { $('#StartDate').html(formatJSONDate(Date(!data ? '' : data.StartDate))); }); function formatJSONDate(jsonDate) { var newDate = dateFormat(jsonDate, "dd/mm/yyyy"); return newDate; } I'm using JavaScript Date Format to try and run the function. Any help is greatly appreciated.

    Read the article

  • MySqlDataAdapter or MySqlDataReader for bulk transfer?

    - by Jeff Meatball Yang
    I'm using the MySql connector for .NET to copy data from MySql servers to SQL Server 2008. Has anyone experienced better performance using one of the following, versus the other? DataAdapter and calling Fill to a DataTable in chunks of 500 DataReader.Read to a DataTable in a loop of 500 I am then using SqlBulkCopy to load the 500 DataTable rows, then continue looping until the MySql record set is completely transferred. I am primarily concerned with using a reasonable amount of memory and completing in a short amount of time. Any help would be appreciated!

    Read the article

  • Best way to implement keywords for image upload gallery

    - by Dan Berlyoung
    I'm starting to spec out an image gallery type system similar to Facebook's. Members of the site will be able to create image galleries and upload images for others to view. Images will have keywords the the uploader can specify. Here's the question, what's the best way to model this? With image and keyword tables linked vi a HABTM relation? Or a single image table with the keywords saved as comma delimited values in a text field in the image record? Then search them using a LIKE or FULL TEXT index function? I want to be able to pull up all images containing a given keyword as well as generate a keyword cloud. I'm leaning toward the HABTM setup but I wanted to see what everyone else though. Thanks!!

    Read the article

< Previous Page | 174 175 176 177 178 179 180 181 182 183 184 185  | Next Page >