Answer Questions
Bill Sempf Suggest me a simple and good tutorial for T-SQL
Hi, Can someone suggest me a simple and nice tutorial that can explain T-SQL with examples. Plizzz.... Regards.., Aazad hi i think below links are good: http://www.mssqlserver.com/tsql/ http://www.trainingbyemail.com/SQL/TSQL.aspx http://msdn.microsoft.com/library/default.asp url=/library/en-us/tsqlref/ts_tsqlcon_6lyk.asp if you need more info please say to me. good luck well...lots of places... sql server books online i guess is the most comprehensive.. also have a look at http://www.mssqlserver.com/tsql/ also a series of articles at http://www.databasejournal.com/features/mssql/article.php/3087431 ...Show All
tunesmith SQL Server 2005 Std Ed SP2. - Lock Pages In Memory
How do I determine if Lock Pages In Memory is applied I have the Policy to the Service Account. Thanks - Covi Locked Pages In Memory is supported only in Developer and Enterprise 64 editions, not in Standard 64. Look at Sql Server 2005 Books (january 2007) ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/62021d0b-1b8d-4276-b373-a01184006d42.htm index Memory Architecture Locked pages in memory operating system (OS) privilege SQL Server Enterprise and Developer editions: Recommended, to avoid operating system paging. Might provide a performance benefit depending on the workload. The amount of memory accessible is similar to conventional memory case. In Enterpise editions you can confirm Locked pages in me ...Show All
anju V R Programming SQL Express
Hey, i have an installer that places ms sql express onto a machine. thats is fine. i want to create a post setup application that runs after ms sql server is installed. what for example i want to do is be able to create a user and have the DB allow remote connections. i can provide instructions for a 'peon' to make the required post setup changes but i want to see if i can cover that with an application. thanks Charles Rezsonya is it possible to do this with visual studio 2003 hey, anyway you can show me a script that would change the server to allow tcp remote connections what application do i run to process the script actually i ...Show All
Tony Fabian Hours/minutes in the Calendar date time prompt
Is there any way to get teh date time prompt to display hours & minutes For example, if I default the field to '=Today', I would like to see '8/10/2006 9:04 AM' instead of '8/10/2006' Similarly, when I pick a date using the date picker control that is displayed by default, I would like it to also display the time, which I guess would default to 12:00 AM. Thanks in advance! I have a report parameter set using : =DateSerial(Year(now()), Month(now()), 0) that displays the last day of the month as default and when you view the report the end date is populated as: 7/31/2006 12:00:00 AM does that help Hi, I encountered the same situation once an ...Show All
Marc Lacoursiere How to transfer a table between databases in SQL Server 2005 express
Hi, In SQL Server 2005 Express I currently have 2 databases which I’m working on, my problem is I want to transfer a table from one of the databases to the other but don't know how to go about achieving this I want the table structure and all the info held within the table transferred across. Any ideas are welcome. hi, using SSMSE, generate the DDL script of the table you like to "copy"... execute the resulting script in the target database.. then insert all the rows in the original table like INSERT INTO dbo.Table SELECT col1, col2, coln FROM originalDatabase.dbo.Table; regards ...Show All
Zero_ Slow access unless administrator account
We have an issue with accessing SQL Server 2000 where the access of data from the database is slow unless the user is logged in as an administrator to their computer. The system is as follows: SQL Server 2000 on a W2K server. Users logging into a Win 2003 domain server. Users using W2K on their workstations. Application is VB.NET using the Enterprise Library Data Block, connection pooling ON, and windows authentication. We are assuming that the issue is down to one of authentication and that when a user is set as an administrator then they have instant access. We have been able to replicate the issue using just SQL server on a W2K workstation and accessing from another W2K workstation. Again data access is way slow unless the account ...Show All
JohnGBunch Need help using GROUP BY clause
I have two tables A. TEST_SUBJECTS_TBL with the following columns . This table contains the subjects in a test 1. TEST_SUBJECT_ID PK 2. SUBJECT_ID FK 3. TEST_ID FK 4. PM This is the passing marks for the subject B. TEST_MARKS_TBL with the following columns This table stores the marks scored by students for each subject 1. TEST_SUBJECT_ID FK 2. STUDENT_ID FK 3. MARKS_OBTAINED I need a query which gives me the max, min,avg marks obtained in each subject for a test and the total number of students who have passed in the subject The query output should be something like this ___________________________________________________________________ SubjectID MaxMarks MinMarks AvgMarks TotalStudentsPassed _________ ...Show All
jlchx Back-up DB but keep the files for 3 days?
Hi I have created a job to backup all our database. It works fine and creates .bak files in default folder. I have scheduled the task to run every 4 hours. My question is how can i modify or program this backup plan to keep the backup files for only last 3 days and delete older backup files Mits I also use script to achieve this at my customers (WMI/VB Script). It's much more flexible and you can code it to do what you want. I've done a few custom versions, if, for example, they want to keep N number of fulls, and only a certain number of days worth of transaction logs, etc. It works very well, but as you hint at Mits, it is outside the control of SQL Server. Well done, Andy. It seems t ...Show All
Klaus Prückl Cube action calling a stored procedure in AS2000
Hi, I know a cube action can call a reporting services report thru an action, I would like to know if it is posible to launch a stored procedure thru an action , if so what would be the best approach Thank you U Yes, it should be possible. What do you want the sproc to do Chris I alredy have the stored procedure, The sproc will make an entry into a scheduler table for with its parameters to run at a later time, Please let me know what needs to be done to implement this call Thanks U Not being an ASP.Net expert , is there anyplace where I can find code something similar to this being done Thanks U Just to be clear (I've only realised that you're talking about AS2 ...Show All
Sathish Alagirisamy FTP Connection Manager
My FTP connection manager is not saving my password. Does anybody know how to resolve this problem Thanks Stephen What is the ProtectionLevel property of your package set to You should read the documentation of this property. It will explain why this is happening better than I can! -Jamie ...Show All
iuem The SQL Server service failed to start
I have mentioned this problem before but it has not been resolved. I am installing MS SQL Server Express Advanced i.e. using SQLEXPR_ADV.EXE. During the initial checks, i get a warning about hardware requirements and I have read the posts about the install failing if the CPU does not support prefetching but I am running a P4 3.0GHz (twin core) CPU with 512MB RAM on Windows XP Pro SP2. The installation fails at SQL Server Database Services during "Configuring Microsoft SQL Server": "Starting SQL Service: MSSQL$SQLEXPRESS" If I click the Retry button, the system goes away and then comes back with the same message. If I click cancel, various roll-back actions are performed and the install fails Is this the d ...Show All
Greenmtnsun Newbie Parameter Problem
Hi, I have 3 parameters on my form. StartDate (datetime), EndDate (datetime) and CompanyName(string). The default values are: StartDate (Non-queried) 1-1-2005, EndDate (Non-queried) 1-1-2008, CompanyName (From query) DataSetBelow, Value field (AccountFamily): SELECT DISTINCT AccountFamily FROM CallDataRecords The table on the form contains the following DataSet: SELECT Salutation, InboundTimeMS, OutboundTimeMS, ModifiedOn, IsRightParty, AccountFamily FROM CallDataRecords WHERE AccountFamily = @CompanyName AND ModifiedOn BETWEEN @StartDate AND @EndDate The error I get is: "Query execution failed for data set (one directly above)". "Must declare the scalar variable "@CompanyName". Can ...Show All
COBOLBeginner Save Word Doc in Db
hi can u tell me plz how do i save a word doc or and excel sheet in sql server thanx This article might give you some info http://support.microsoft.com/default.aspx scid=KB;EN-US;Q308042 here's an example, it's super easy... using ( SqlConnection conn = new SqlConnection ( Globals .ChatterDbConnectionString)) { conn.Open(); using ( SqlCommand cmd = conn.CreateCommand()) { cmd.CommandText = "update account_image_available " + "set " + "image = @image, type = @type " + "where " + "opgroup = @gid" ; cmd.Parameters.AddWithValue( "image" , data); cmd ...Show All
Ted Carron SSIS Data Flow task fails to load all text from flat file
Hi Guys, I have a flat file which is loaded into the database on a daily basis. The file contains rows of strings which I load into a table, specifically to a column of length 8000. The string has a length of 690, but the format is like 'xxxxxx xx xx..' and so on, where 'xxxx' represents data. So there are spaces, etc present in the middle. Previously I used SQL 2000 DTS to load the files in, and it was just a Column Transformation with the Col001 from the text file loading straight to my table column. After the load, if I select len(col) it gives me 750 for all rows. Once I started to migrate this to SSIS, I allocated the Control Flow Task and specified the flat file source and the oledb destination, and gave the output column ...Show All
compjb Stored procedure issue. a bridge too far for me
i have a query that i need to extend but just dont have the knowledge to do so, so hoping someone here could help me this is my current query:- SELECT ES.PatientID, DATEDIFF(day, EP.DateofBirth, GetDate())/365 AS Age, CASE EP.SexCode WHEN 'M' THEN 'MALE' ELSE 'FEMALE'END AS Gender, COUNT(H.HRDID)AS HRD, ES.FourRegularDrugs, isnull(ES.FourRegularDrugsNo,0) as NoOfDrugs, ES.ReadmissSixMonths, PCE.[Primary diagnosis] FROM tblStudyServices ES INNER JOIN tblPatient EP ON EP.PatientID = ES.PatientID INNER JOIN PAS.dbo.[PAS Patient Details] PP ON PP.[PAS key] = EP.PatientInternalNumber INNER JOIN PAS.dbo.[PAS Admission Details] [PAD] ON [PAD].[PAS key 1] = PP.[PAS key] INNER JOIN PAS.dbo.[PAS Consultant Episode] PCE ON PCE.[PAS key 1] = PA ...Show All
