Search Results

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

Page 72/1369 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • MySQL – Introduction to CONCAT and CONCAT_WS functions

    - by Pinal Dave
    MySQL supports two types of concatenation functions. They are CONCAT and CONCAT_WS CONCAT function just concats all the argument values as such SELECT CONCAT('Television','Mobile','Furniture'); The above code returns the following TelevisionMobileFurniture If you want to concatenate them with a comma, either you need to specify the comma at the end of each value, or pass comma as an argument along with the values SELECT CONCAT('Television,','Mobile,','Furniture'); SELECT CONCAT('Television',',','Mobile',',','Furniture'); Both the above return the following Television,Mobile,Furniture However you can omit the extra work by using CONCAT_WS function. It stands for Concatenate with separator. This is very similar to CONCAT function, but accepts separator as the first argument. SELECT CONCAT_WS(',','Television','Mobile','Furniture'); The result is Television,Mobile,Furniture If you want pipeline as a separator, you can use SELECT CONCAT_WS('|','Television','Mobile','Furniture'); The result is Television|Mobile|Furniture So CONCAT_WS is very flexible in concatenating values along with separate. Reference: Pinal Dave (http://blog.sqlauthority.com)Filed under: MySQL, PostADay, SQL, SQL Authority, SQL Query, SQL Tips and Tricks, T SQL

    Read the article

  • How to log error queries in mysql?

    - by Kaizoku
    I know that there is general_log that logs all queries, but I want to find out which query has an error, and get the error message. I have tried running an error query on purpose, but it logs as a normal query and doesn't report it with error. Any ideas?

    Read the article

  • SQL SERVER – Fix Visual Studio Error : Connections to SQL Server files (.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL

    - by pinaldave
    In one of the virtual environment while I was trying to add SQL Server Database (.mdf) file to asp.net project I encountered following error: Connections to SQL Server files (.mdf) require SQL Server Express 2005 to function properly. Please verify the installation of the component or download from the URL:  For a long time I am using SQL Server 2012 but this error was a bit interesting to me. I realize that there should not be any need of the SQL Server 2005 installation. I quickly figured out that I can remove this error if I do as mentioned below: Open Microsoft Visual Studio Select Tools >> Options >> Database Tools >> Data Connections Enter the name of an installed instance in “SQL Server Instance Name” field. Click OK If you do not know the instance name, you can follow either of the options. 1) Use the command line sqlcmd utility 2) Using SQL Server Management Studio Is there any other way to resolve this error? Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: sqlcmd, Visual Studio

    Read the article

  • SQL SERVER – Caption the Cartoon Contest – Last 2 Days

    - by pinaldave
    Developer’s life is very interesting, we often want to start my day early at a job so we can go home early. However, the day never comes as the life of the developer is always about working late hours. If the developer goes to the office early – there are good chances that his co-workers will come late. Additionally, I am confident that there will be always something urgent for developers or DBA to solve right at the time they are ready to go home. This is the life of the developers!  Here is the interesting story of a DBA who was about to go to the home. He had to take his girlfriend to a movie and dinner in 30 minutes. However, his manager asks him to fix the performance related issues with their production server. In normal case, he had only two choices a) Job or b) Girlfriend. Well, our super hero DBA decided to use efficient tools and improve the performance of the production server in merely 30 minutes. When he was done, his manager was absolutely surprised by his efficiency and accuracy of the work. He asked him following question - Here is the contest – you need to guess what was the answer of our Super Hero DBA. If you guess the answer correct you may win Star Wars R2-D2 Inflatable Remote Controlled device. Additionally, if you Download DB Optimizer before Dec 8, 2012 – you will be eligible for USD 25 Amazon Gift Card (there are total 10 such awards). Please do not leave comments in this thread – to participate in the contest – please leave a comment here in the original contest page. Reference: Pinal Dave (http://blog.sqlauthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Puzzle, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • SQL SERVER – Using RAND() in User Defined Functions (UDF)

    - by pinaldave
    Here is the question I received in email. “Pinal, I am writing a function where we need to generate random password. While writing T-SQL I faced following issue. Everytime I tried to use RAND() function in my User Defined Function I am getting following error: Msg 443, Level 16, State 1, Procedure RandFn, Line 7 Invalid use of a side-effecting operator ‘rand’ within a function. Here is the simplified T-SQL code of the function which I am using: CREATE FUNCTION RandFn() RETURNS INT AS BEGIN DECLARE @rndValue INT SET @rndValue = RAND() RETURN @rndValue END GO I must use UDF so is there any workaround to use RAND function in UDF.” Here is the workaround how RAND() can be used in UDF. The scope of the blog post is not to discuss the advantages or disadvantages of the function or random function here but just to show how RAND() function can be used in UDF. RAND() function is directly not allowed to use in the UDF so we have to find alternate way to use the same function. This can be achieved by creating a VIEW which is using RAND() function and use the same VIEW in the UDF. Here is the step by step instructions. Create a VIEW using RAND function. CREATE VIEW rndView AS SELECT RAND() rndResult GO Create a UDF using the same VIEW. CREATE FUNCTION RandFn() RETURNS DECIMAL(18,18) AS BEGIN DECLARE @rndValue DECIMAL(18,18) SELECT @rndValue = rndResult FROM rndView RETURN @rndValue END GO Now execute the UDF and it will just work fine and return random result. SELECT dbo.RandFn() GO In T-SQL world, I have noticed that there are more than one solution to every problem. Is there any better solution to this question? Please post that question as a comment and I will include it with due credit. Reference: Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Function, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology Tagged: technology

    Read the article

  • Input/Output console window in XNA

    - by Will Bagley
    I am currently making a simple game in XNA but am at a point where testing various aspect gets a bit tricky, especially when you have to wait till you have 1000 score to see if your animation is playing correctly etc. Of course i could just edit the starting variable in the code before I launched but I have recently been interested in trying to implement a console style window which can print out values and take input to alter public variables during run-time. I am aware that VS has the immediate window which achieves a similar thing but i would prefer mine is an actual part of the game with the intention that the user may have limited access to it in the future. Some of the key things i have yet to find an answer to after looking around for a while are: how i would support free text entry how i would access variables during runtime how i would edit these variable I have also read about using a property grid from windows form aps (and partially reflection) which looked like it could simplify a lot of things but i am not sure how I would get that running inside my XNA game window or how i would get it to not look out of place (as the visual aspect of is seems to be aimed just for development time viewing). All in all I'm quite open to any suggestions on how to approach this task as currently I'm not sure where to start. Thanks in advance.

    Read the article

  • SQL SERVER – FIX ERROR – Cannot connect to . Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452)

    - by pinaldave
    Just a day ago, I was doing small attempting to connect to my local SQL Server using IP 127.0.0.1. The IP is of my local machine and SQL Server is installed on the local box as well. However, whenever I try to connect to the server it gave me following strange error. Cannot connect to 127.0.0.1. Login failed. The login is from an untrusted domain and cannot be used with Windows authentication. (Microsoft SQL Server, Error: 18452) The reason was indeed strange as I was trying to connect from local box to local box and it said my login was from an untrusted domain. As my system is not part of any domain, this was really confusing to me. Another thing was that I have been always able to connect always using 127.0.0.1 to SQL Server and this was a bit strange to me. I started to think what did I change since it  last time I connected to SQL Server. Suddenly I remembered that I had modified my computer’s host file for some other purpose. Solution: I opened my host file and immediately added entry like 127.0.0.1 localhost. Once I added it I was able to reconnect to SQL Server as usual. The location of the host file is C:\Windows\System32\drivers\etc. You will find file with the name hosts in it, make sure to open it with notepad. If you are part of a domain and your organization is using active directory, make sure that your account is added properly to active directory as well have proper security permissions to execute the task. Reference : Pinal Dave (http://blog.SQLAuthority.com) Filed under: PostADay, SQL, SQL Authority, SQL Error Messages, SQL Query, SQL Server, SQL Tips and Tricks, T SQL, Technology

    Read the article

  • Problem with pulseaudio / Skype / and sound Output

    - by Ash Mafiaboy SysemaicallyAffec
    Ok, i got Ubuntu 12.04 , the problem come with the sound driver, Ok, may time when my Ubuntu restarted its seem that the driver is being disable, that one problem, the other problem is that when my mike and sound is working find on skype, and when i am trying to play some music on my computer specially when i am on video call we can heard any sound out . even when i play a song from youtube i got to sign off from youtube then, its work, i got a 5.1 suround and i wonder if somebody can help me out

    Read the article

  • Dir all files to output.log, including message "File Not Found"

    - by user316687
    I'm trying to dir a bunch of files with dos command: dir My dir.bat file: dir E:\documentos\57\Asiento\01\"Asiento 3 Modificacion de Estatuto.doc" dir E:\documentos\134\Asiento\01\"File Does Not Exist.doc" dir E:\documentos\55\Asiento\01\"Asiento 5 Padron de Afiliados Segunda Entrega.doc" The second one doesn't exist. Then, when running my bat: C:\myuser>E:\dir.bat > output.log I open output.log and don't find any message about the file that was not found. Output.log : E:\documentos>dir E:\documentos\57\Asiento\01\"Asiento 3 Modificacion de Estatuto.doc" Volume in drive E is New Volume Volume Serial Number is 0027-F7F6 Directory of E:\documentos\57\Asiento\01 20/12/2005 06:41 p.m. 40,960 Asiento 3 Modificacion de Estatuto.doc 1 File(s) 40,960 bytes 0 Dir(s) 17,053,155,328 bytes free E:\documentos>dir E:\documentos\134\Asiento\01\"File Does Not Exist.doc" Volume in drive E is New Volume Volume Serial Number is 0027-F7F6 Directory of E:\documentos\134\Asiento\01 E:\documentos>dir E:\documentos\55\Asiento\01\"Asiento 5 Padron de Afiliados Segunda Entrega.doc" Volume in drive E is New Volume Volume Serial Number is 0027-F7F6 Directory of E:\documentos\55\Asiento\01 08/08/2007 08:33 a.m. 40,960 Asiento 5 Padron de Afiliados Segunda Entrega.doc 1 File(s) 40,960 bytes 0 Dir(s) 17,053,151,232 bytes free Is there any way that output.log shows "File Not Found" message?

    Read the article

  • Color distortion with Intel HD4000 over HDMI output - VGA is fine

    - by Simon Möller
    I set up a new system with i5 3570k gigabyte z77 d3h using integrated graphics (HD4000) and I've installed the 64bit Desktop version of 12.04. Connected to my Acer Screen via HDMI, the colors are horribly distorted. I think the biggest issue is that black appears as greenish. Over VGA everything is fine. Interestingly, I once observed that connecting both, the VGA and the HDMI cable at the same time, solved the issue. Ubuntu thought 2 screens were connected, I mirrored the image, and over HDMI the colors looked fine. However, after a reboot I am now unable to reproduce this behavior. I read frequently, that Intel hardware should be supported out of the box by Ubuntu but it doesn't seem to be the case here. Should I upgrade my Kernel? If so, which version would you recommend? Thank you for your answers!

    Read the article

  • No options for sound output

    - by Chef Flambe
    Newbie here. Trying out Ubuntu for kicks. I have a 10.04 Ubuntu system dual booting on my Windows 7 laptop, fully updated, an Asus A53S. I have an external Samsung monitor/tv hooked up via HDMI. I'm getting sound from the external monitor fine when using Win7 but can't get anything with Ubuntu. I've read threads here about similar stuff and they say go check my sound options but I don't have any additional options than the one listed - Internal Audio. What else can I check/do?

    Read the article

  • Logging Output of Azure Startup Tasks to the Event Log

    - by Your DisplayName here!
    This can come in handy when troubleshooting: using System; using System.Diagnostics; using System.Text;   namespace Thinktecture.Azure {     class Program     {         static EventLog _eventLog = new EventLog("Application", ".", "StartupTaskShell");         static StringBuilder _out = new StringBuilder(64);         static StringBuilder _err = new StringBuilder(64);           static int Main(string[] args)         {             if (args.Length != 1)             {                 Console.WriteLine("Invalid arguments: " + String.Join(", ", args));                 _eventLog.WriteEntry("Invalid arguments: " + String.Join(", ", args));                                 return -1;             }               var task = args[0];               ProcessStartInfo info = new ProcessStartInfo()             {                 FileName = task,                 WorkingDirectory = Environment.CurrentDirectory,                 UseShellExecute = false,                 ErrorDialog = false,                 CreateNoWindow = true,                 RedirectStandardOutput = true,                 RedirectStandardError = true             };               var process = new Process();             process.StartInfo = info;               process.OutputDataReceived += (s, e) =>                 {                     if (e.Data != null)                     {                         _out.AppendLine(e.Data);                     }                 };             process.ErrorDataReceived += (s, e) =>                 {                     if (e.Data != null)                     {                         _err.AppendLine(e.Data);                     }                 };               process.Start();             process.BeginOutputReadLine();             process.BeginErrorReadLine();             process.WaitForExit();               var outString = _out.ToString();             var errString = _err.ToString();               if (!string.IsNullOrWhiteSpace(outString))             {                 outString = String.Format("Standard Out for {0}\n\n{1}", task, outString);                 _eventLog.WriteEntry(outString, EventLogEntryType.Information);             }               if (!string.IsNullOrWhiteSpace(errString))             {                 errString = String.Format("Standard Err for {0}\n\n{1}", task, errString);                 _eventLog.WriteEntry(errString, EventLogEntryType.Error);             }               return 0;         }     } } You then wrap your startup tasks with the StartupTaskShell and you’ll be able to see stdout and stderr in the application event log.

    Read the article

  • Bluetooth Audio and SoftPhone Audio Input/Output

    - by o7th Web Design
    I have a Voip Softphone software that I would like to start using on my Ubuntu 14.04 box. Here's the thing. My system sound right now goes through my HDMI to my speaker system so I can play music all day ;-) I have a bluetooth headset connected to the machine as well. What I am wondering is if there is a way to: Auto-mute the music when a call comes in Auto-switch the sound devices when a call comes in, from my hdmi sound device, to my headset Auto-switch back when the call ends, and auto-un-mute the music Or even just an auto-switch to the headset? I can always pause the music ;)

    Read the article

  • Change the output of the facebook like button [migrated]

    - by Mechaflash
    I've tied in the code for the facebook like button from the facebook dev site (I currently use the iframe version) directly into the html of a node (or content post). I want to be able to manipulate what text is sent when someone hits the like button. you can see the site and buttons here www.masteringmoneybasics.org I've tried both the iframe and html5 versions of the button and can't see where to alter what is sent. If there is no way to directly alter what is sent, does anyone know what it looks for in content to be sent so I can structure the node correctly? If you notice, when you like the page, it doesn't get the first sentence of the content, but all content after it, and I've tried putting different content in between the two lines (in its own <p>) and it still grabs the latter. Also how it figures out which image to grab from the page? Most times it doesn't take any image, however twice it's grabbed the middle school image.

    Read the article

  • Query for server DefaultData & DefaultLog folders

    - by jamiet
    Do you ever need to query for the DefaultData & DefaultLog folders for your SQL Server instance? Well, I just did and the following script enabled me to do that: DECLARE @HkeyLocal NVARCHAR(18),@MSSqlServerRegPath NVARCHAR(31),@InstanceRegPath SYSNAME; SELECT @HkeyLocal=N'HKEY_LOCAL_MACHINE' SELECT @MSSqlServerRegPath=N'SOFTWARE\Microsoft\MSSQLServer' SELECT @InstanceRegPath=@MSSqlServerRegPath + N'\MSSQLServer' DECLARE @SmoDefaultFile NVARCHAR(512) EXEC MASTER.dbo.xp_instance_regread @HkeyLocal, @InstanceRegPath, N'DefaultData', @SmoDefaultFile OUTPUT DECLARE @SmoDefaultLog NVARCHAR(512) EXEC MASTER.dbo.xp_instance_regread @HkeyLocal, @InstanceRegPath, N'DefaultLog', @SmoDefaultLog OUTPUT SELECT ISNULL(@SmoDefaultFile,N'') AS [DefaultFile],ISNULL(@SmoDefaultLog,N'') AS [DefaultLog]' I haven’t done any rigorous testing or anything like that, all I can say is…it worked for me (on SQL Server 2012). Use as you see fit. Doubtless this information exists in a multitude of other places but nevertheless I’m putting it here so I know where to find it in the future. Just for fun I thought I’d try this out against SQL Azure Windows Azure SQL Database. Unsurprisingly it didn’t work there: Msg 40515, Level 15, State 1, Line 16 Reference to database and/or server name in 'MASTER.dbo.xp_instance_regread' is not supported in this version of SQL Server. @Jamiet

    Read the article

  • Y Axis inverted on vertex output

    - by Yonathan Klijnsma
    I've got my project running and somehow it seems my vertex y components are inverted. 10 in the positive on Y goes down and 10 negative on the Y axis goes up. I can't find anything with the initialization and I am not doing any negative scaling in the view matrix. I've never had something like this happen before, does anyone have some tips or things to look for ? How I am sending verteces to the GPU ( Currently intermediate mode ) glVertex3f( x_pos_n, 10, z_pos ); I am using CG in the project but even without shaders the Y axis seems to be inverted.

    Read the article

  • Does google see the output of document.write?

    - by merk
    I've got a site where people can list machinery for sale. Each item for sale has it's own dynamic page. On each of these pages we allow the person selling the item to have a link back to their own website. Some people only sell a handful of items and some people are selling dozens or hundreds of items. So in some cases we can have a 100 links back to their external site. Our SEO guy is saying this is bad (i'll open another question on that). So i was wondering if i take the links and spit them out using document.write, will that hide them from google and the other SE's ?

    Read the article

  • Bind9 not doing anything with forwarded query responses?

    - by Rykaro
    I have a Bind DNS server that is the local production DNS server and a Windows 2008 R2 domain controller which provides DNS for a lab environment with the domain xyz.lab. I've configured the Bind DNS to forward DNS requests for the domain xyz.lab to the Windows DNS server with this config: zone "xyz.lab" { type forward; forward only; forwarders { x.x.x.x; }; }; zone "x.x.x.in-addr.arpa" { type forward; forward only; forwarders { x.x.x.x; }; }; And Bind options are (the all_internal acl includes the subnets of both the production and lab networks as well as the loopback of the bind server): allow-query { all_internal; }; allow-recursion { all_internal; }; allow-transfer { none; }; notify no; minimal-responses yes; version "unknown"; Unfortunately, when I do an nslookup or dig on the bind server for a host on the lab domain, the request times out. The logs on the Windows 2008 DNS server show it receiving the query and responding to it and a network packet trace shows the query responses arriving at the Bind DNS server. The servers reside on the same switch with a router providing connectivity between the layer 3 subnets (production and lab are on different subnets) and there is a round trip time of between 3ms and 5ms on pings between the two servers, so I don't think there is an issue with latency causing a timeout of the query. In summary a query-response arrives back at the Bind server and the nslookup/dig times-out. Why does the Bind DNS not seem to be doing anything with the query responses when it receives them?

    Read the article

  • Skype/14.04: no sound output in conversations

    - by user272554
    I installed Skype 4.2 via PPA on my fresh 14.04 system. Skype itself makes notification sounds (though distorted), but when I am in a conversation, I receive neither sound, nor video. I tested it with my mom, she could hear and see me, but I couldn't see or hear her, and the sound test is quiet too. I didn't install any additional drivers yet, as I'm much of a newbie I'm not sure which ones to choose. Please let me know if you need any command outputs.

    Read the article

  • Using INSERT / OUTPUT in a SQL Server Transaction

    Frequently I find myself in situations where I need to insert records into a table in a set-based operation wrapped inside of a transaction where secondarily, and within the same transaction, I spawn-off subsequent inserts into related tables where I need to pass-in key values that were the outcome of the initial INSERT command. Thanks to a Transact/SQL enhancement in SQL Server, this just became much easier and can be done in a single statement... WITHOUT A TRIGGER! Join SQL Backup’s 35,000+ customers to compress and strengthen your backups "SQL Backup will be a REAL boost to any DBA lucky enough to use it." Jonathan Allen. Download a free trial now.

    Read the article

  • Exclude PHP from output from WYSIWYG in CMS

    - by bytewalls
    I'm writing a basic CMS for one of my sites and have run into an issue where some pages need to dynamically serve PHP and JS, where as others are plain HTMl. I want there to be a setting which will allow this for the pages that need it and will load ACE editor instead of a different wysiwyg editor. The challenge here is that on the pages which I do not explicitly tell it there will be code, I want to reject any inputs that code. I can set it up to insert a for all pages without JS, but how can I keep php code from running?

    Read the article

  • Output the total number of String Characters [migrated]

    - by Programmerwannabe
    My Question is what method should I use if I wanted to get the total number of characters a user inputs? without using arrays, i tried using .length() but it did not return all characters say from the first and lastname, it only returned the first name. Here's an example of my code. (Please dont laugh im really new in programming :) ) System.out.print("Enter your first and last name: "); String yourName = keyboard.next(); System.out.println("Your name has a total of " + yourName.length() + " numbers"); what happened was if i enter say "Neo Matrix" it would only return 3. I appreciate any help. thank you!

    Read the article

  • How to give default values for the sum, count if no data exist in mysql query which uses group by?

    - by Salil
    I am using following query which works fine for me except one problem SELECT f.period as month, sum(p.revenue * ((100-q.rate)/100)) as revenue ,count(distinct q.label) as tot_stmt FROM files f, reports p, rates q,albums a where f.period in ('2010-06-01','2010-05-01','2010-04-01','2010-03-01') and f.period_closed = true and q.period = f.period and a.id = q.album_id and p.file_id = f.id and p.upc = a.upc and p.revenue is not null GROUP BY month ORDER BY month DESC O/P = month            revenue     tot_stmt 2010-06-01     10.00         2 2010-05-01     340.47       2 I want result like following month            revenue     tot_stmt 2010-06-01     10.00         2 2010-05-01     340.47       2 2010-04-01     0.00           0 2010-03-01     0.00           0 Regards, Salil Gaikwad

    Read the article

  • There is insufficient system memory to run this query when creating temporary table

    - by phenevo
    StringBuilder query = new StringBuilder(); query.Append("CREATE TABLE #Codes (Code nvarchar(100) collate database_default ) "); query.Append("Insert into #Codes (Code) "); int lengthOfCodesArray = targetCodes.Length; for (int index = 0; index < lengthOfCodesArray; index++) { string targetCode = targetCodes[index]; query.Append("Select N'" + targetCode + "' "); if (index != lengthOfCodesArray - 1) { query.Append("Union All "); } } query.Append("drop table #Codes "); on: cmd.ExecuteReader() I get There is insufficient system memory to run this query when creating temporary table But weird thing is that, when I have 25k codes is ok, when 5k I get this error. Initial size is 262 MB. Lengt of each code is average 15.

    Read the article

  • SQL - query inside NOT IN takes longer than the complete query ??

    - by Aleksandar Tomic
    Hi every1, I'm using NOT IN inside my SQL query. For example: select columnA from table1 where columnA not in ( select columnB from table2) How is it possible that this part of the query select columnB from table2 takes 30sec to complete, but the whole query above takes 0.1sec to complete?? Shouldn't the complete query take 30sec + ? BTW, both queries return valid results. Thanks! Answers to Comments Is it because the second query hasn't actually completed but has only returned back the first 'x' rows (out of a very large table?) No, the query is completed after 30 seconds, not to many rows returned (eg. 50). But @Aleksandar wondered why the question congaing the performance killer was so fast. my point exactly Also how long does select distinct columnB from table2 take to execute? actually, the original query is "select distinct...

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >