First  |  Prev |  Next  |  Last
Pages: 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54
Need Query help
Hello, [SQL2000] CREATE TABLE toll_drive ( Amount INT, dte DATETIME ); GO INSERT INTO toll_drive SELECT 10,'JAN 1 2010'; INSERT INTO toll_drive SELECT 100,'JAN 11 2010'; INSERT INTO toll_drive SELECT 65,'JAN 30 2010'; INSERT INTO toll_drive SELECT 10,'JAN 31 2010'; INSERT INTO toll_drive SELECT 24,'FEB ... 11 May 2010 23:25
SQL Job, DTS and RunAs (Impersonation)
Hi, At a client I'm working at, we need to send files via SFTP to a server on completion of several steps of a SQL Job. The client has a command line SFTP program which requires when invoking, to impersonate a particular user otherwise the SFTP connection is not accepted. I have developed a small C# console a... 6 May 2010 19:52
Simulating Connection Error
Hi -- We're having a problem where once in a while, a database connection goes bad and some queries within a process fail. We've put in code to handle that, but we're trying to test it and can't think of a way to test it in our lab to make sure our fix corrects the problem. When we try to kill the process with... 6 May 2010 16:32
Trying to get a % of responses from a survey in a query
This is the query that returns the result count, but I want to get the count/totalresponses: Select q.surveyquestionid, q.surveyquestion, c.surveychoiceid, c.ordposition, c.surveychoice, count(r.surveyresultid) as ResultCount from SurveyQuestion q join surveychoices c on q.surveyquestionid = c.surveyquestioni... 6 May 2010 23:09
Update using SELECT
Hi, Can anyone help me how to Update an existing SQL Server 2008 table using the following select statement: SELECT TOP 1 SNAME, COUNT(*)[SNAME_CNT] FROM ConusSolLyr WHERE TAXCL <> ' ' AND TAXOR = 'Alfisols' GROUP BY SNAME ORDER BY SNAME_CNT DESC I'd like to update TaxOrder table's SNAME field with the re... 9 May 2010 17:37
SQL Server Performance Local vs Remote.
I've got an script running on a Windows Web Server 2008 R2 dedicated box. The script reads a .csv file line by line processes the data and sticks it into SQL Server. When connecting to a remote sql server 2008 on a shared web host the script takes about 20 minutes to run, which is perfectly acceptable g... 8 May 2010 11:13
Few confusing things about transactions
Hi Sorry for putting so many questions into one thread, but in my opinion questions are somewhat related. If it’s a problem, I can break the questions into several threads. 1) “Each COMMIT TRANSACTION issued when @@TRANCOUNT is greater than 1 simply decrements @@TRANCOUNT by 1.” I assume calling rollback ... 7 Jun 2010 15:30
if statement
Why doesn't this work? In real life this will be the start of a sql report and the value of @AlertId will change. It could be 'ALL' or an integer. I need to actually see 'ALL' as -1. declare @AlertId as char set @AlertId = 'ALL' declare @AlertId2 as int if @AlertId = 'ALL' set @AlertId2=-1 else se... 6 May 2010 10:48
Statistics from DTA
I ran DTA on my select statements and found that it suggested about 8 statistics. But how do you determine if that if you should use all 8 or just some. There is already about 30 on that file (all assigned by the system) which all have only one column on them. Wouldn't there be a perfomance hit on this tab... 8 May 2010 11:13
copying rows
Hi, I am writing a query to insert a copy of the row in the same table with one or two columns having different values. How can I do it? Lets say I have a table 'Users' with following columns UserId, UserCountry, UserFirstName, UserLastName, UserEmail, UserPwd So I would like to copy over all the columns ... 5 May 2010 12:40
First  |  Prev |  Next  |  Last
Pages: 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54