Archived Months
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
November 2007


all groups > sql server new users > march 2007

Filter by week: 1 2 3 4 5

different order in a union all clause
Posted by Willo at 3/30/2007 9:54:35 AM
Hi: i have this query, and i need to specify an order for each SELECT... is there a way to do it? Note: On MySQL, all i need to do is to use parentheses to enclose each select... (SELECT a FROM t1 WHERE a=10 AND B=1 ORDER BY a LIMIT 10) UNION (SELECT a FROM t2 WHERE a=11 AND B=2 ORDER BY...more >>

import question
Posted by HX at 3/30/2007 9:42:41 AM
I have to import a particular spreadsheet monthly (sql 2000, using enterprise manager). The key field can have a value like 89976, which appears to be just a number, though it is not calculated, OR it can have a value like 5X6D4. I have tried importing to a new table, importing to an exist...more >>

Return 10 records with Select
Posted by Gabriel at 3/30/2007 7:07:57 AM
Hello, Is there a way with SQLServer Express to return only 10 rows, the 10 first when I make a select, this select is orderd on the id. Thanks, Regards, ...more >>

Stored Procedure Problem (Maybe)
Posted by Light at 3/30/2007 6:34:00 AM
Hi all, Because I am not sure what forums to post my question, so I put it here as I am a new sql user as well. I inherited some legacy ASP codes in my office. The original code's backend is using the SQL Server 2000 and I am testing to use it on the Express edition. And I run into th...more >>

SQL2005 and user/device licsensing
Posted by Jason Blake at 3/30/2007 4:06:01 AM
If I purchase sql 2005 server standard edition with 10 user/device cals does this allow up to 10 users or devices to be able to access the SQL server at once ? IF an 11th user/device tries to connect do they get refused. ? If i have 20 devices/users that may want to use the SQL Server but on...more >>

Operand type clash: text is incompatible with float
Posted by Nancy at 3/29/2007 10:35:09 PM
I have an error here I have never seen before. I am inserting probably about 350 fields in a form and a similar form with about the same number fields works just fine . .but this one throws the error in the subject line. Of course the error line is on the command itself .. where should I sta...more >>

Attach database problem
Posted by Gabriel at 3/29/2007 9:03:37 PM
Hello, I create a database on my development PC. I copy the 2 files on the computer production, I'm trying to attach the database but I receive an error ......"can't be attach because the database is read-only" DB created with SQLServer Express and the production is SQLServer Express too...more >>

Help with Trigger
Posted by Nirmal Singh at 3/29/2007 12:00:00 AM
I have two tables called Managers and Employees. The Managers table is (partially) structured as follows: LineManager VarChar(10) Not Null SummaryDate DateTime Null This has a one-to-many relationship with the Employees table which is (partially) structured as follows: LineMan...more >>



MSDB Transaction log growth
Posted by Curt Spanburgh at 3/28/2007 12:42:04 PM
I've encountered a clients SQL Instance that experiences a large growth of the MSDB Transaction log. At one time the MDF was 14 MB and the log was 25 GB. I used T-SQL commands to shink the file. Auto growth is set to 1 mb. This morning is was 4 GB. I check for uncommitted transactio...more >>

SQL 2005 Install
Posted by Phil Andersen at 3/28/2007 4:34:00 AM
I am trying to install SQL 2005 but it errors on install everytime. I am running 2003 Ent Server. here is the log from the install. I thank you for any help in advance. Phil Andersen === Verbose logging started: 3/28/2007 3:25:24 Build type: SHIP UNICODE 3.01.4000.1830 Calling process...more >>

SQL Mail - No Profile
Posted by SAC at 3/28/2007 12:00:00 AM
I want to use sql mail, but I don't have a profile. I have Outlook 2003 installed on the computer with an email account using exchange server. In the Control Panel I see a profile named Outlook, but when I attempt to configure sql mail no profile is listed. What do I need to do? Than...more >>

user name change
Posted by Anita at 3/27/2007 11:44:29 AM
Hi, we are using a Microsoft SQL Database (Version Microsoft SQL 2000) in a windows domain. We use windows authentification for the SQL permissions. One user married in the past and we changed her windows login name. When I try to create a the new user in SQL, I get an error message (can't ...more >>

SQL Server 2000 Log Shipping (Standard Edition)
Posted by Jerry at 3/27/2007 10:10:25 AM
I need to setup Log shipping between 2 SQL 2000 Servers(Standard Edition). I know Microsoft don't support Log Shipping for the Standard Edition but I hear you can setup a manually process. Can someone help me with this one? Thanks Jerry Stanfield ...more >>

Multiple table query
Posted by Sid Price at 3/26/2007 10:12:18 AM
I have an application that has a number of tables that I need to query and I am having no success in selecting the data I need. T1 has a set of columns that describe a business entity (name, address, etc), T2 has a set of columns that describe various business categories, and T3 is a table...more >>

What books should I get to start with SQL Server ?
Posted by Wayne at 3/26/2007 12:00:00 AM
Howdy all, I need to add SQL Server to my skillset as I am going to be involved in an ERP implementation in the next 12 months that will rely heavily on it. I have a background with Oracle and have done some pretty in depth development with access, (an add on SAP tool I wrote in MS Access p...more >>

Modify default Enterprise Manager font.
Posted by Panos Tsapralis at 3/25/2007 6:48:47 PM
I have installed Microsoft SQL Server 2000 along with Service Pack 3 on a system with Microsoft Windows NT, Ver.4.0 (with Service Pack 6a). Everything seems to work fine except that everything in the Enterprise Manager application is displayed in an annoyingly tiny font and I do not seem to be...more >>

How to get and use SQLServerExpress
Posted by Tina at 3/24/2007 4:50:31 PM
I already am using SQLServer 2005 Developer edition along with Management Studio and Visual Studio 2005 Professional edition. Now I have a project to develop and deploy a forms application that will have to be distributed with SQLServer Express and have some questions... Where do I get SQL...more >>

difference between owned schemas and roles members
Posted by Bart at 3/24/2007 4:14:49 PM
Hi, I want to create a login (for account ASPNET from the Active Directory) in sql server express 2005 for a specific database. When addidng a new user to a specific database, i see: Owned schemas, where i take db_datareader and db_datawriter Roles memmbers: also db_datareader and db_datawri...more >>

Non-Equi Joins
Posted by Justin Ryan Grenier at 3/22/2007 3:45:20 PM
I am taking Microsoft Course 4329 on Joining Data from Multiple Tables in SQL Server 2005, and I am stumped in the Lab, Task 2, Step 3. How can I rewrite the following SQL Statement to produce the same results by using a non-equality operator in the join? use adventureworks select firstna...more >>

SQL2005 Max Row Size 8060 bytes
Posted by stevesj at 3/21/2007 10:44:12 AM
I have need to create a table with 12 varchar(2000) fields. SQL does not prevent me from doing this but I'm wondering about the row size. The help documentation indicates that the max size is 8060 bytes. What will happen if I try updating this table and all 12 fields have data that exceed...more >>

column prefix 'x' does not match ....
Posted by ylvie at 3/21/2007 7:31:39 AM
hallo i got this message: The column prefix 'r' does not match with a table name or alias name used in the query this is the sql query: UPDATE VNAggr.DBA.resTable SET resdeactivated = r.resid, endtime = getdate() WHERE r.resid in (SELECT distinct d.devName, i1.ifindex, r.resid FROM V...more >>

Creating many new records
Posted by Anders Eriksson at 3/19/2007 6:36:54 PM
Hello, I have a database with two tables TableA * MainNo NVARCHAR DataF1 NVARCHAR DataF2 ... TableB * MainNo NVARCHAR * SubNo NVARCHAR ... * indicates Primary Key Now I need to create one record for each MainNo+SubNo in a third table, which we can call TableC. For each record ...more >>

Server to Server communication
Posted by Mike Saunders at 3/19/2007 2:46:54 PM
I am not familiar with SQL Server but need to know how the following scenario would be satsified A user registers his details online to a server somewhere. Another server elswhere however also needs to be notified of this transaction as well as store some of the original data The 2nd server...more >>

SQL Express on ISP site
Posted by HarryX at 3/19/2007 11:29:09 AM
Hi, my ISP has said that they will not allow SQL express on theire servers, I must therefore buy an SQL (full) instance from them. Is there a problem with using SQL Express on a website? Thanks...more >>

question about UniqueIdentifier options
Posted by André at 3/19/2007 12:00:00 AM
Hi, I use Visual Web Developper for my asp.net application. I defined a field in a table as UniqueIdentifier. In the database environment of VWD, i can see for that field: datatype: uniqueidentifier default value or bindings: (newid()) (or xxxxx-xxxx-xxx etc.. in hexadecimal form). rowg...more >>

Maitenance plan
Posted by DD at 3/19/2007 12:00:00 AM
Hello, I use Microsoft SQL 2005 enterprise edition. I perform backup of my databases with maintenance plans. I would like this maintenance plan to delete backup older than 2 days. Is it possible? With SQL 2000, it was quite easy. Thanks in advance, David ...more >>

reseed primary key doesn't work
Posted by André at 3/18/2007 12:00:00 AM
Hi, i use sql server express 2005. I defined a table "mytable" with a primary key (OrderId , type INT). I want to reseed the value of the primary key (starting with 1). The table is in a .mdf file, so i first attached it (with sql server management studio express) and then running this que...more >>

Using "Windows Authentication" on a Home Network
Posted by Robin Bowning at 3/17/2007 4:01:31 PM
Hi everyone, I'm quite new to SQL Server so maybe this is an easy question but I haven't found the answer after 3+ hours of Googling and experimenting. I have a simple set up - two computers named HELEN and DELORES, both running Win XP Pro, SP2. These machines are connected via a home netw...more >>

Simple select convert to comma delimited string
Posted by Aleks at 3/16/2007 1:00:38 PM
Hi, I have a simple select like Select ID from table it returns something like: 1 2 3 4 I need it to return something like Select ID as groupid from table where the result is groupid 1,2,3,4 Does this makes sense ? Aleks ...more >>

SQL Statement Help
Posted by Vayse at 3/13/2007 5:06:01 PM
Hi I have this SQL statement, which is the year and month number of a period. SELECT PeriodYear, PeriodNumber FROM dbo.Periods I'd like to add a third column, which would be the month name plus the year. That is, I'd like to see data in this format: 2007,1, January 2007 2007,2, February 20...more >>

SQL server 2005 express
Posted by Teriel9 at 3/12/2007 12:00:00 AM
I have downloaded MS Visuual Web Developer Express 2005 which includes SQL Server 2005 Express. VWD has installed correctly, however SQL will not install and when I look at the log it indicates that it cannot find IIS. I am using XP Home, do I need XP Pro to be able to install SQL Thanks in a...more >>

Report Newbie Question
Posted by Thomas Grassi at 3/11/2007 9:15:16 PM
How do I create a report in SQL? I have a database created with a table that has names I would like to print the table out by last name in ascending order. Any ideas or help? Thanks Tom -------------------------------------------------------------------------------- I am using t...more >>

Microsoft SQL licensing
Posted by Bandit at 3/11/2007 7:06:40 PM
Dear group, We have an application using Microsoft SQL. Usually we leave the "server side" to our customers - but in this case we have had a question from a cutomer about licences. Our application is tested for Microsoft SQL 2000, but the queries are quite simple so hopefully it will als...more >>

Similar query to separate fields
Posted by Aleks at 3/11/2007 11:30:58 AM
I have a table named "users" table has two fields: FirstNm and LastNm At this time I have the FULL name in the "LastNm" field. It is separated by a comma, example: Doe, John The last name is first, then the first name. I need to run a query that will separate the name and copy wh...more >>

HELP: update a table from a text file
Posted by Warren, John at 3/9/2007 12:56:23 PM
I have a field in a DB that I want to update with the contents of a text file. I retrieved the contents of the text file FROM the entry but now that I edited them, I want to put them back. This text file has only a single entry in it. No row/column delimeters needed.I tried using the Enterpr...more >>

How to format a Count result with commas?
Posted by Terry Carnes at 3/9/2007 12:45:09 PM
I have a batch file that returns the result from a series of count(*) statements. Since the counts returned are in the 6-8 digit range, I would like them formatted to contain commas. How do I do this? I've tried: SELECT Convert(varchar, count(*),1) STR(count(*), 10,0) But t...more >>

query to separate fields
Posted by Aleks at 3/8/2007 3:14:34 PM
I have a table with one name, its the full name and it is separated by a comma. i want to do a select and separate the values and eliminate the comma, example. table name = name field is 'fullname' = John, Doe I want to select it to another table and name it table name = name field is '...more >>

Programming help ...
Posted by Jamie Risk at 3/8/2007 12:00:00 AM
I've installed SQLServer Express either through A Visual 2005 installation or as a direct download from MS. How do I test some query scripts? Is there a command shell where I can execute (and debug) statements similar to following? - Jamie CREATE TABLE Profile ( profile_id INTEG...more >>

Q on stored procedure
Posted by Ana at 3/7/2007 4:44:40 PM
Hi, I'd like to automatically put a '1' into a field on the first of every month. I'd imagine that I need to do it via a stored procedure. How should I do it? TIA -------------------------------------------------------------------------------- Estoy utilizando la versión gratuit...more >>

Find & use "latest month"
Posted by HX at 3/7/2007 4:33:45 PM
If I have a query that gives these results: Jan Feb Mar Apr May Jun ... Dec 500 500 500 0 0 0 0 (one column for every month, only one record) Is there some way for me to pull "Mar" (or "3") from another query and use it as cri...more >>

"stacking" query?
Posted by HX at 3/7/2007 3:42:45 PM
Is there a query that can "combine" two tables in a stacking fashion? ...more >>

Returning decimal result from integer division
Posted by Nirmal Singh at 3/7/2007 12:00:00 AM
I have a table with the following structure Section VarChar(10) StaffCount SmallInt DaysLost SamallInt Average Dec The average column should DaysLost divided by StaffCount. But, for 33 and 7 I am getting 4.0000, because of the integer division. How can I force it to calcul...more >>

SQL sever differential backup problem
Posted by JJ at 3/7/2007 12:00:00 AM
SQL Server 2005 express. To automate the backup process, I am using SQLCMD along with windows schedulers to do log/differential/full backup. At 12:00 AM, I do full backup, differential backup at every 4 hours (excluding 12:00 am when I do full backup), and log backup every 30 minutes. E...more >>

assign row number in query?
Posted by HX at 3/6/2007 4:19:47 PM
Is it possible to assign a row number in a query that could then be used in another query? For example, I want to order the data in my query, and then based on that order, assign a sequential number to each row in a newly created column. This isn't my exact data, but a simple example of wha...more >>

Adding continuation records
Posted by Nirmal Singh at 3/5/2007 3:27:06 PM
I have a table with the following structure (in part) Empno StartDate EndDate Reason 12345 1 Mar 07 5 Mar 07 0001 If a new rocord is inserted for an existing empno with a continuation date, I would like the two records to be combined into one. For example if the fo...more >>

SQL Server 2005 Resource Kit
Posted by Kamlesh at 3/5/2007 12:00:00 AM
Hi, I want to know if Microsoft Press has released the New Book "SQL Server 2005 Resource Kit". I have the SQL Server 2000 Resource Kit, which I found it very usefull and I am looking the 2005 version. Is the SQL 2005 Resource Kit (in printed Book format) available? If not, when likely ...more >>

Upsized primary key fields and "aaaaa"
Posted by Tech_vs_Life at 3/4/2007 2:12:23 PM
In tables upsized to sql server 2005 from access 2007, the upsized primary key fields all have "aaaaa" prefixed to their names, and "_PK" suffixed. It used to be that Access needed the "aaaaa" to determine the primary key when linking--does anyone happen to know if that is still needed in Acc...more >>

How to change upsized primary key index from non-clustered to clustered
Posted by Tech_vs_Life at 3/4/2007 5:38:59 AM
The primary key fields from an upsized access mdb get turned into unique, non-clustered indexes beginning with "aaaaa." I can't seem to change them to clustered indexes (unlike the case with the other indexes, that option is greyed out in Management studio). (There is currently no clustered ...more >>

"Open table" doesn't show all records (sql server 2005).
Posted by Tech_vs_Life at 3/4/2007 4:13:48 AM
Using sql managment studio in Sql Server 2005, I right-click on a (large) table and select "open table," and then press the "move last" (go to last record) button. After a minute or two, it claims all records (455,903 of 455,903) have been accessed (what it shows on the status bar, also the ...more >>

Where do I start?
Posted by RipperT at 3/3/2007 3:23:34 PM
I am very well versed in Access and I would like to start working with SQL server, but I don't know where to start. I have two networked machines with SQLServer 2005; I think I got it from MS Academic Alliance. The start menus show Microsoft SQLServer 2005 with a sub- folder called Configuatio...more >>


DevelopmentNow Blog