Daily Archives

Articles indexed Wednesday October 31 2012

Page 2/17 | < Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >

  • SQL SERVER – Copy Data from One Table to Another Table – SQL in Sixty Seconds #031 – Video

    - by pinaldave
    Copy data from one table to another table is one of the most requested questions on forums, Facebook and Twitter. The question has come in many formats and there are places I have seen developers are using cursor instead of this direct method. Earlier I have written the similar article a few years ago - SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLE. The article has been very popular and I have received many interesting and constructive comments. However there were two specific comments keep on ending up on my mailbox. 1) SQL Server AdventureWorks Samples Database does not have table I used in the example 2) If there is a video tutorial of the same example. After carefully thinking I decided to build a new set of the scripts for the example which are very similar to the old one as well video tutorial of the same. There was no better place than our SQL in Sixty Second Series to cover this interesting small concept. Let me know what you think of this video. Here is the updated script. -- Method 1 : INSERT INTO SELECT USE AdventureWorks2012 GO ----Create TestTable CREATE TABLE TestTable (FirstName VARCHAR(100), LastName VARCHAR(100)) ----INSERT INTO TestTable using SELECT INSERT INTO TestTable (FirstName, LastName) SELECT FirstName, LastName FROM Person.Person WHERE EmailPromotion = 2 ----Verify that Data in TestTable SELECT FirstName, LastName FROM TestTable ----Clean Up Database DROP TABLE TestTable GO --------------------------------------------------------- --------------------------------------------------------- -- Method 2 : SELECT INTO USE AdventureWorks2012 GO ----Create new table and insert into table using SELECT INSERT SELECT FirstName, LastName INTO TestTable FROM Person.Person WHERE EmailPromotion = 2 ----Verify that Data in TestTable SELECT FirstName, LastName FROM TestTable ----Clean Up Database DROP TABLE TestTable GO Related Tips in SQL in Sixty Seconds: SQL SERVER – Insert Data From One Table to Another Table – INSERT INTO SELECT – SELECT INTO TABLE Powershell – Importing CSV File Into Database – Video SQL SERVER – 2005 – Export Data From SQL Server 2005 to Microsoft Excel Datasheet SQL SERVER – Import CSV File into Database Table Using SSIS SQL SERVER – Import CSV File Into SQL Server Using Bulk Insert – Load Comma Delimited File Into SQL Server SQL SERVER – 2005 – Generate Script with Data from Database – Database Publishing Wizard What would you like to see in the next SQL in Sixty Seconds video? Reference: Pinal Dave (http://blog.sqlauthority.com)   Filed under: Database, Pinal Dave, PostADay, SQL, SQL Authority, SQL in Sixty Seconds, SQL Query, SQL Scripts, SQL Server, SQL Server Management Studio, SQL Tips and Tricks, T SQL, Technology, Video Tagged: Excel

    Read the article

  • RPi and Java Embedded GPIO: It all begins with hardware

    - by hinkmond
    So, you want to connect low-level peripherals (like blinky-blinky LEDs) to your Raspberry Pi and use Java Embedded technology to program it, do you? You sick foolish masochist. No, just kidding! That's awesome! You've come to the right place. I'll step you though it. And, as with many embedded projects, it all begins with hardware. So, the first thing to do is to get acquainted with the GPIO header on your RPi board. A "header" just means a thingy with a bunch of pins sticking up from it where you can connect wires. See the the red box outline in the photo. Now, there are many ways to connect to that header outlined by the red box in the photo (which the RPi folks call the P1 header). One way is to use a breakout kit like the one at Adafruit. But, we'll just use jumper wires in this example. So, to connect jumper wires to the header you need a map of where to connect which wire. That's why you need to study the pinout in the photo. That's your map for connecting wires. But, as with many things in life, it's not all that simple. RPi folks have made things a little tricky. There are two revisions of the P1 header pinout. One for older boards (RPi boards made before Sep 2012), which is called Revision 1. And, one for those fancy 512MB boards that were shipped after Sep 2012, which is called Revision 2. So, first make sure which board you have: either you have the Model A or B with 128MB or 256MB built before Sep 2012 and you need to look at the pinout for Rev. 1, or you have the Model B with 512MB and need to look at Rev. 2. That's all you need for now. More to come... Hinkmond

    Read the article

  • See the exciting new features available for iProcurement and Sourcing with 12.1.3 Rollup Patch 14254641:R12.PRC_PF.B!

    - by user793044
    See the exciting new features available for iProcurement and Sourcing with 12.1.3 Rollup Patch 14254641:R12.PRC_PF.B! Functional Area New Feature Note Reference Sourcing Suppliers can now accept Terms and Conditions to comply with the buyer's Non-Disclosure Agreements (NDA). The PDF generation process has been enhanced to provide faster generation of negotiation PDFs containing large amounts of data. Note 1499944.1 Sourcing New features From Procurement RUP Family R12.1.3 September Update 2012: Accept Terms and Conditions to Comply With NDA iProcurement Users can now do the following: Requesters can specify the GL date (encumbrance date) for each distribution against a line at the time of creating requisitions.  Enter an Accounting Date on and Procurement Requisition, if Dual Budgetary Control is enabled for Purchasing. Choose a Favorite Charge Account to override your default charge account, using the Preferences page.  Buyers can update the unit price, suggested supplier, and site details while requesting a catalog item (inventory item) that is not linked to a blanket purchase agreement. Note 1499911.1 iProcurement New Features From RUP Family R12.1.3 September Update 2012: GL/Accouting Date,PO_CUSTOM_FUNDS_PKG.plb,Price and Supplier Update For new features across all the Procurement product groups and information about applying Patch 14254641 see Note 1468883.1.

    Read the article

  • Suggestion: ALLFILES option for RESTORE

    - by Greg Low
    The default action when performing a backup is to append to the backup file yet the default action when restoring a backup is to restore just the first file.I constantly come across customer situations where they are puzzled that they seem to have lost data after they have completed a restore. Invariably, it's just that they haven't restored all the backups contained within a single OS file. This happens most commonly with log backups but also happens when they have not restored the most recent database backup file.It is not trivial to achieve this within simple T-SQL scripts, when the number of backup files within the OS file is unknown. It really should be.I'd like to see a FILES=ALLFILES option on the RESTORE command. For RESTORE DATABASE, it should restore the most recent database backup plus any subsequent log files. For RESTORE LOG (which is the most important missing option), it should just restore all relevant log backups that are contained.If you agree, you know what to do: please vote:  https://connect.microsoft.com/SQLServer/feedback/details/769204/option-to-restore-all-backups-files-within-a-media-setAlternately, how would you write a T-SQL command to restore all log backups within a single OS file where the number of files is unknown? Would love to hear creative solutions because all the ones that I think of are pretty messy and need dynamic SQL. 

    Read the article

  • Need multiple sound outputs to multiple speakers

    - by Usman Sajeel Haider
    How do I play 3 different music tracks at the same time on my computer, such that song1 is played in speaker1, song2 in speaker2... Is this possible programatically? What additional hardware will I need? Do I need 3 seperate sound cards? Given that the hardware is in place, how would I "route" the sound output for a particular song to a particular speaker. Alternatively, is there a special hardware that can handle multiple inputs and outputs? Appreciate your expert opinions.

    Read the article

  • Scripting custom drawing in Delphi application with IF/THEN/ELSE statements?

    - by Jerry Dodge
    I'm building a Delphi application which displays a blueprint of a building, including doors, windows, wiring, lighting, outlets, switches, etc. I have implemented a very lightweight script of my own to call drawing commands to the canvas, which is loaded from a database. For example, one command is ELP 1110,1110,1290,1290,3,8388608 which draws an ellipse, parameters are 1110x1110 to 1290x1290 with pen width of 3 and the color 8388608 converted from an integer to a TColor. What I'm now doing is implementing objects with common drawing routines, and I'd like to use my scripting engine, but this calls for IF/THEN/ELSE statements and such. For example, when I'm drawing a light, if the light is turned on, I'd like to draw it yellow, but if it's off, I'd like to draw it gray. My current scripting engine has no recognition of such statements. It just accepts simple drawing commands which correspond with TCanvas methods. Here's the procedure I've developed (incomplete) for executing a drawing command on a canvas: function DrawCommand(const Cmd: String; var Canvas: TCanvas): Boolean; type TSingleArray = array of Single; var Br: TBrush; Pn: TPen; X: Integer; P: Integer; L: String; Inst: String; T: String; Nums: TSingleArray; begin Result:= False; Br:= Canvas.Brush; Pn:= Canvas.Pen; if Assigned(Canvas) then begin if Length(Cmd) > 5 then begin L:= UpperCase(Cmd); if Pos(' ', L)> 0 then begin Inst:= Copy(L, 1, Pos(' ', L) - 1); Delete(L, 1, Pos(' ', L)); L:= L + ','; SetLength(Nums, 0); X:= 0; while Pos(',', L) > 0 do begin P:= Pos(',', L); T:= Copy(L, 1, P - 1); Delete(L, 1, P); SetLength(Nums, X + 1); Nums[X]:= StrToFloatDef(T, 0); Inc(X); end; Br.Style:= bsClear; Pn.Style:= psSolid; Pn.Color:= clBlack; if Inst = 'LIN' then begin Pn.Width:= Trunc(Nums[4]); if Length(Nums) > 5 then begin Br.Style:= bsSolid; Br.Color:= Trunc(Nums[5]); end; Canvas.MoveTo(Trunc(Nums[0]), Trunc(Nums[1])); Canvas.LineTo(Trunc(Nums[2]), Trunc(Nums[3])); Result:= True; end else if Inst = 'ELP' then begin Pn.Width:= Trunc(Nums[4]); if Length(Nums) > 5 then begin Br.Style:= bsSolid; Br.Color:= Trunc(Nums[5]); end; Canvas.Ellipse(Trunc(Nums[0]),Trunc(Nums[1]),Trunc(Nums[2]),Trunc(Nums[3])); Result:= True; end else if Inst = 'ARC' then begin Pn.Width:= Trunc(Nums[8]); Canvas.Arc(Trunc(Nums[0]),Trunc(Nums[1]),Trunc(Nums[2]),Trunc(Nums[3]), Trunc(Nums[4]),Trunc(Nums[5]),Trunc(Nums[6]),Trunc(Nums[7])); Result:= True; end else if Inst = 'TXT' then begin Canvas.Font.Size:= Trunc(Nums[2]); Br.Style:= bsClear; Pn.Style:= psSolid; T:= Cmd; Delete(T, 1, Pos(' ', T)); Delete(T, 1, Pos(',', T)); Delete(T, 1, Pos(',', T)); Delete(T, 1, Pos(',', T)); Canvas.TextOut(Trunc(Nums[0]), Trunc(Nums[1]), T); Result:= True; end; end else begin //No space found, not a valid command end; end; end; end; What I'd like to know is what's a good lightweight third-party scripting engine I could use to accomplish this? I would hate to implement parsing of IF, THEN, ELSE, END, IFELSE, IFEND, and all those necessary commands. I need simply the ability to tell the scripting engine if certain properties meet certain conditions, it needs to draw the object a certain way. The light example above is only one scenario, but the same solution needs to also be applicable to other scenarios, such as a door being open or closed, locked or unlocked, and draw it a different way accordingly. This needs to be implemented in the object script drawing level. I can't hard-code any of these scripting/drawing rules, the drawing needs to be controlled based on the current state of the object, and I may also wish to draw a light a certain shade or darkness depending on how dimmed the light is.

    Read the article

  • Are non Turing-complete languages considered programming languages at all?

    - by user1598390
    Reading a recent question: Is it actually possible to have a 'useful' programming language that isn't Turing complete?, I've come to wonder if non Turing-complete programming languages are considered programming languages at all. Since Turing-completeness means a language has to have variables to store values as well as control structures ( for, while )... Is a language that lacks these features considered a programming language ?

    Read the article

  • Should I continue teaching old Java input methods alongside the new ones?

    - by user1598390
    I've been imparting a Java introduction course for several years. Some slides explain how to read from files and keyboard using BufferedReaders, InputStreams, FileInputStreamReaders etc. I'm adding slides explaining how to achieve this using more up to date approaches like Scanner. Should I leave out the old BufferedReaders, InputStreams and FileInputStreamReaders slides altogether, and teach only the new methods, or should I continue to teach these methods for the sake of completeness ? Will my students benefit from learning how to read from files and keyboard the old way ?

    Read the article

  • Should static parameters in an API be part of each method?

    - by jschoen
    I am currently creating a library that is a wrapper for an online API. The obvious end goal is to make it as easy for others to use as possible. As such I am trying to determine the best approach when it comes to common parameters for the API. In my current situation there are 3 (consumer key, consumer secret, and and authorization token). They are essentially needed in every API call. My question is should I make these 3 parameters required for each method or is there a better way. I see my current options as being: Place the parameters in each method call public ApiObject callMethod(String consumerKey, String consumerSecret, String token, ...) This one seems reasonable, but seems awfully repetitive to me. Create a singleton class that the user must initialize before calling any api methods. This seems wrong, and would essentially limit them to accessing one account at a time via the API (which may be reasonable, I dunno). Make them place them in a properties file in their project. That way I can load the properties that way and store them. This seems similar to the singleton to me, but they would not have to explicitly call something to initialize these values. Is there another option I am not seeing, or a more common practice in this situation that I should be following?

    Read the article

  • Is data integrity possible without normalization?

    - by shuniar
    I am working on an application that requires the storage of location information such as city, state, zip code, latitude, and longitude. I would like to ensure: Location data is accurate Detroit, CA Detroit IS NOT in California Detroit, MI Detroit IS in Michigan Cities and states are spelled correctly California not Calefornia Detroit not Detriot Cities and states are named consistently Valid: CA Detroit Invalid: Cali california DET d-town The D Also, since city/zip data is not guaranteed to be static, updating this data in a normalized fashion could be difficult, whereas it could be implemented as a de facto location if it is denormalized. A couple thoughts that come to mind: A collection of reference tables that store a list of all states and the most common cities and zip codes that can grow over time. It would search the database for an exact or similar match and recommend corrections. Use some sort of service to validate the location data before it is stored in the database. Is it possible to fulfill these requirements without normalization, and if so, should I denormalize this data?

    Read the article

  • Picking a code review tool

    - by marcog
    We are a startup looking to migrate from Fogbugz/Kiln to a new issue tracker/code review system. We are very happy with Jira, especially the configurability, but we are undecided on a code review tool. We have been trialing Bitbucket, but it doesn't fit our workflow well. Here are the problems we have identified with BB: Comments can be hard to find: when commenting on code not visible in the diff when code that is commented on is later changed viewing the full file doesn't include comments (also doesn't show changes) Viewing comments on individual commits can be a pain We have the implementer merge the diff and close the issue, whereas pull requests are more suited to the open source model where someone with commit rights merges We would like to automate creation of the code review (either from Jira or a command line tool) No syntax highlighting Once the pull request exceeds a certain size, BB won't show the whole thing and you have to view individual commits Linking BB pull requests to Jira issues is a bit janky: we have a pull request URL field on Jira, but this doesn't work when there are changes in multiple repositories Does anyone have any good suggestion given the above? We are tight on budget, and Jira integration is a big plus. We also have multiple commits per issue, and would like to have the option of viewing individual commits in the review. It might also be worth noting that we have a separate reviewer and tester for each issue.

    Read the article

  • How difficult did you find the Java Certification Exam

    - by user22904
    I'm just starting out as a Java programmer and have very minimal experience. I would like to improve my knowledge and study for the Java certification. I realize everyone will have a different answer but for those who have taken the certification and passed it, I'd really appreciate if you could tell me your experiences. Just a couple of lines to let me know if you found it hard, very hard. Also how much time did you spend studying. Sorry that this is not a good question. My native language is not English so it is hard for me to say what I want to ask.

    Read the article

  • Problems booting Ubuntu 10.10 with Nvdia GeForce 6600gt

    - by SlyrNemesis
    I am quite new to Ubuntu and I already stumbled upon a problem. I run Ubuntu 10.10 Maverick Meerkat now and Install went fine, when trying to boot the screen popped black and I faced this message "gpu lockup - switching to software fbcon." When setting the display to onboard VGA through BIOS Ubuntu has no problem at all, but when I switch back to my AGP card (which is a Nvidia GeForce 6600GT) I get that message again. I do not use VGA for that card I use my DVI cable for it. Does anyone have an answer for me to make this work? Thank you

    Read the article

  • Why df and du show different output

    - by Nischay
    When I execute command df -h /tmp it says disk utilization is 100% but when it tried du -sh /tmp it says disk utilization is 2%. I want to know why these commands shows different output and these two commands work and what is the solution of this problem. /var is installed on it own file system .I am using Ubuntu 12.04 server edition on my vps account.Due to this problem utilization of /tmp 100% according to df some programs complain about free space in /tmp.

    Read the article

  • Cannot get past "Installation type" screen after choosing "Install Ubuntu inside Windows 7"

    - by Greg
    After getting to the screen that states: "This computer currently has Windows 7 on it. What would you like to do?" I am not able to continue with the installation process after selecting "Install Ubuntu inside Windows 7". I am running Ubuntu off a USB drive after using UNetBootin and then selecting the "Install Ubuntu 12.04 LTS" shortcut. Everything included on the online guides worked perfectly up to this point. Very new to Linux, please help?

    Read the article

  • Evolution email forgets all settings after reboot

    - by jbrendel
    My Evolution email client keeps forgetting all settings after a reboot or even a logout/login! Please help! I have recently installed Ubuntu 12.04 on a new laptop. To move my Evolution settings and email over to the new machine, I selected "backup", which creates a single tar.gz archive of all Evolution settings and mail. I copied the file to the new computer, started Evolution which presented me with the startup assistant. I selected 'restore from backup', pointed at the tar.gz file and all was beautifully restored. All seemed to work just fine. However, after a reboot I noticed that Evolution seems to have forgotten all settings: I get the startup assistant again when I start Evolution. I checked that the .conf/evolution and .local/share/evolution directories were still present, yet, none of that seemed to matter, it wanted me to restore from a backup again. The version of Ubuntu (12.04) and Evolution (3.2.3) are the same on the old and new laptop. Just stopping and restarting Evolution does not cause this problem. Even if I manually kill all Evolution related processes, the settings will be remembered and it can start up no problem. The problem only happens on logout/login or reboot. Any help is greatly appreciated! Thank you very much!

    Read the article

  • Cant install 12.04.1 or 12.10 in Asus GT75VW laptop

    - by Software companies in perth
    I got this new laptop that comes with a 256 GB ssd drive 128 GB are used for the preinstalled Windows 7 I want to install Ubuntu on the other 128 Gb. I first installed 12.10, it worked and booted once into the OS bu then it started booting onto a black screen so i tried with 12.04.1, i tried installing it a few times with the normal and alternate installer but after saying the installation was OK, it boots onto this distorted graphics screen with a purpelish background where you can't do anything.... What do i do?

    Read the article

  • Audio is working, but the speaker test doesn't work

    - by Pacquo
    I've installed Ubuntu 12.04 LTS from a minimal cd on a netbook (Asus 1001 PXD). I've installed the ubuntu-desktop package using the --no-install-recommends option. Everything works fine, except the "sound test" for headphones or analog speakers. Clicking on the "test" buttons (front left and front right) I don't hear any sound. Despite this, the audio is working properly. I've checked the audio levels with alsamixer; I have also checked that the test sounds actually exist in /usr/share/sounds/alsa. I tried an installation of Ubuntu 12.04 LTS made with the desktop-cd, and in this case the speaker test works properly. I suppose, therefore, that the problem could depend on the lack of a package, but I have not identified which one.

    Read the article

  • Installation failure

    - by Peter Kelson
    I have just downloaded Ubuntu and burned an installation DVD. I used it to install Ubuntu on a PC running Windows XP choosing the option to run Ubuntu alongside Windows. I chose to install the additional updates after initial installation. When I choose Ubuntu from the menu displayed on boot-up I get a purple and yellow screen which is completely blank except for the functioning mouse pointer. I would be grateful for suggestions on how to fix this.

    Read the article

  • ASUS Q500A will not boot from live DVD

    - by Sly
    I just purchased a new PC yesterday, an ASUS Q500A. I downloaded Ubuntu 12.10, burned it to a DVD, and tried to install it. As expected, I came to a screen that asked if I wanted to try, install, OEM install, or check the disc. After going to try, the DVD spins up as if it's about to boot the system and then immediately spins down again to leave a black screen. I've tried several boot options: noacpi nolacpi acpi=off Removing quiet splash -- nolacpi results in the DVD drive not spinning up at all. The rest have no effect. Some stats about the system: Intel i5-3210M processor Intel Integrated Graphics 4000 Any tips on other things to try?

    Read the article

  • Ubuntu and surround sound

    - by keith
    I'm trying to connect my Logitech x.530 to my Dell studio 1558 and get 5.1 sound. I have 3 jacks and in Windows I automatically could switch between line in adn mic. Which means I could get 5.1 surround over these 3 jacks. Ubuntu does not realise that one of the three jacks should be switched to give sound to the center and LFE speaker. I tried all the tips in the forums, but nothing works. I can only select 4.0 sound in pulse audio. As the dell and the IDT 92hd89e chip for the sound are probably famous laptops I thought there must be someone who has similar issues in the 5.1 sound. I would like to stay at Linux but without this hardware support it's almost impossible.

    Read the article

  • SSH password entered too many times Connection refused

    - by Ole Henrik Skogstrøm
    I tried connecting to my new installed Ubuntu 12 server via SSH and I was asked for my password. (I had used "myusername@ipadress" to connect) After entering the right password a few times (with no luck; access denied) I started getting an error directly telling me that the connection was refused without asking me for a password anymore. It seems like I have managed to blacklist myself. It has been like this for about 2 hours now, is there a quick solution for this?

    Read the article

  • Stuck With grub rescue> console

    - by rej santos
    Here is the background of my issue: I just recently installed the latest version of Ubuntu along side with Windows 8 Enterprise. However upon checking the disk size, it seems that some of the portions of the hd memory were gone so I decided to check the disk partition and have seen that is was being used by another file system. Thinking that the Ubuntu takes it boots stuff from my drive C: , I deleted that partition and formated so I can use it to store some movies, music etc. Now, as I switch on my machine, I am stucked with: error: unknown filesystem grub rescue> I googled a lot and saw the following command which seems no to me like sudo, chainloader etc, all of these command only returns unknown command in the console. What I just wanted is to boot from my Windows 8 OS. Just to add, I can't open the BIOS menu so I could choose what media to boot. As I open my machine it automatically takes me to grub rescue console. Here are the thing I already have: Ubuntu Installation Disk Windows 8 System repair Disk I just don't know how to boot into these things. Let me know what to do.

    Read the article

  • 12.04 Ambiance dark side bar issue when clicking folder on desktop

    - by Lou Crittenden
    Concerning an updated custom ambiance theme: why is there no dark side bar when I click on a folder, like the home folder icon on the desktop, but the theme works as planned when I type nautilus in the terminal to open the home folder or when opening a folder up as root? Permissions issue perhaps? Note: I am using Cinnamon instead of Unity and I noticed it uses the Nemo file manager instead of Nautilus and I suspected that it was causing me the grief. I uninstalled it and now am using Nautilus only as the file manager. I found this out when I typed: sudo killall nemo and the problem went away. I'll see how this goes (and hopefully cinnamon doesn't care about it...) Has anyone else had any issues with this?

    Read the article

  • How do I install Myunity on 12.10?

    - by Brenton Horne
    Basically as is the title how do you install Myunity on 12.10. I've tried adding the repository ppa:myunity/ppa and doing: sudo add-apt-repository ppa:myunity/ppa sudo apt-get update sudo apt-get install myunity At which point I got the error: W: Failed to fetch http://ppa.launchpad.net/myunity/ppa/ubuntu/dists/quantal/main/binary-i386/Packages 404 Not Found E: Some index files failed to download. They have been ignored, or old ones used instead.

    Read the article

< Previous Page | 1 2 3 4 5 6 7 8 9 10 11 12  | Next Page >