Archived Months
January 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
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
all groups > sql server (alternate) > june 2006 > threads for june 8 - 14, 2006

Filter by week: 1 2 3 4 5

out of order identity field - sql2000
Posted by bevanward NO[at]SPAM gmail.com at 6/14/2006 7:30:10 PM
Hi All I am finding unexpected results when inserted into a newly created table that has a field of datatype int identity (1,1). Basically the order I sort on when inserting into the table is not reflected in the order of the values from the identity field. Have I been wrong in assuming t...more >>


Results in Parallel columns
Posted by vivekian at 6/14/2006 2:26:00 PM
Hi , I need to place the results of two different queries in the same result table parallel to each other. So if the result of the first query is 1 12 2 34 3 45 and the second query is 1 34 2 44 3 98 the results should be displayed as 1 12 34 2 34 44 3 ...more >>

output the latest date for each foreign key
Posted by TGEAR at 6/14/2006 1:44:18 PM
I have an ItemSTDPriceHistory table as below and this is a child table of itemlookup table with one to many relationship. if exists (select * from dbo.sysobjects where id =3D object_id(N'[dbo].[ItemSTDPriceHistory]') and OBJECTPROPERTY(id, N'IsUserTable') =3D 1) drop table [dbo].[ItemSTDPrice...more >>

getting the most latest date
Posted by TGEAR at 6/14/2006 11:34:22 AM
I have a column which stores dates (datetime data type). I would like to fetch one data which is the most latest date among them. So if there are 04/01/06, 05/08/06, 05/12/06, 06/15/06, then 06/15/06 is the one I need to output. how can I write this in sql stmt? select datebegin from testt...more >>

Authentication
Posted by Eng.Rana NO[at]SPAM gmail.com at 6/14/2006 7:37:36 AM
Hello All, i was wondering what is the main difference between the windows authentication and mixed mode authentication?? according to security recommendations, we should enable windows authentication, rather than mixed one, i don get the point why do we refuse the mixed mode authentication...more >>

Performance issue
Posted by Cray at 6/13/2006 11:37:37 PM
Hello, On the database we have stored procedure that loads couple thousands rows with information, it has to be done sequentially because during this load various variables and values has to be changed and modified. We have about 10000 rows to process every day - usually it takes about ...more >>

Create Procedure in an IF block?
Posted by cmay at 6/13/2006 7:19:04 PM
I am writing some code generation stuff and I am trying to get a script like this to work: IF (something) BEGIN CREATE PROCEDURE Whatever AS SELECT 1 as one END But it complains about this, so I am guessing that I can't put the create prodcedure in an IF block. Does anyone kn...more >>

Stored Procedure Issue - Problem with temporary tables
Posted by pinney.colton NO[at]SPAM gmail.com at 6/13/2006 4:49:54 PM
I would like to create a stored procedure which creates a temp table to store some XML. The # of fields of XML is dependent upon the contents of another table in the application, so the first part of my procedure identifies the # of fields necessary. That is working correctly. The second part...more >>



Perfomance Question
Posted by Laurence Breeze at 6/13/2006 4:23:59 PM
I look after a database which is part of a third party CRM product. The users of the product complain of intermittant poor performance, the suspicion is that some more senior users are running their own queries (the product allows users to do this). I've been asked by the development team ...more >>

enterprise manager (or other software) to document tables and columns for Server2k?
Posted by metaperl at 6/13/2006 2:28:08 PM
Hi, We have enterprise manager for sql server 2000. I would like to store comments about my database schema somewhere in the database. I want to store information about the intent of tables and columns. We have EM but I am open to any suggestions regarding products. ...more >>

2 different foreign keys in one table
Posted by HandersonVA at 6/13/2006 12:22:01 PM
There is itemlookup table, which stores item number and item description. Also there is a child table, pricehistory, of the itemlookup table, which stores different prices and different date ranges. So it is one-to-many relationship. (Price can be stored more than one with a different date range...more >>

How to create SQL Server Express server (INSTANCENAME) programmatically?
Posted by ianicbass NO[at]SPAM yahoo.com at 6/13/2006 10:46:51 AM
In deploying SQL Express, how do I create a new server (INSTANCENAME) programmatically? What would be the best approach to accomplish this. Thank you so much, ...more >>

backup of transaction log
Posted by alwinkotiya NO[at]SPAM gmail.com at 6/13/2006 8:24:10 AM
How to schedule backup of transaction log??? ...more >>

SQL server backup and truncate log file
Posted by alwinkotiya NO[at]SPAM gmail.com at 6/13/2006 5:37:56 AM
Hi all, If I set recovery model SIMPLE then truncation of log files will be automated , but I will lose database changes made since the last backup was taken. Is there any way to automate truncation of log file and backup of database upto last change has been done???? Plz Hel...more >>

how to specify the column name
Posted by gobiparthi at 6/13/2006 1:09:22 AM
Dear friends, If i want to specify the column name as "acc_no" then it total size is 6 it must get the first two letters as alphapets and the remaining 4 as numbers for this how to write the query?. Please reply. By, Gobi S. ...more >>

2005: Database cannot be opened
Posted by R.A.M. at 6/12/2006 9:29:36 PM
Hello, Could you explain me please the following error: "Database 'DemoDotNET' cannot be opened due to inaccessible files or insufficient memory or disk space. (Microsoft SQL Server, Error: 945)" I have checked: free disk space is large enough, I have much enough memory, other files in the ...more >>

Indexing strategy
Posted by Ryan at 6/12/2006 6:39:40 AM
I have a bit of a problem with regards an indexing strategy. Well, basically there is no indexing strategy on a set of data I have at work. Now, I didn't create the design as I would have allowed for this. OK, so there is primary key (clustered) indexes (mainly composite keys), but no other in...more >>

use result set returned by sp as derived table
Posted by Baihao Yuan at 6/11/2006 1:40:13 PM
Hi, I got another question here: I want to use query like this: SELECT * FROM (sp_lock AS T) WHERE objectID = ... The purpose is that I want to query the result set returned by sp_lock using derived table, but it doesn't work. Why? Thanks, Baihao -- Posted via Mailgate.ORG ...more >>

Create XML in ASP.NET 2.0 then use for joined table in SQL Server 2005 Stored Procedure
Posted by news.sbcglobal.net at 6/11/2006 12:31:36 AM
Here's my problem: I'm developing an ASP.NET 2.0 application that has a user select one or more auto manufacturers from a listbox ("lstMakes"). Once they do this, another listbox ("lstModels") should be filled with all matching models made by the selected manufacturers. If lstMakes was not m...more >>

A basic question: Removing duplicate results from Max function
Posted by aamircheema NO[at]SPAM gmail.com at 6/10/2006 7:48:38 AM
Hi, Say I have a table Job with columns name, date, salary . I want to get the name ,date and salary for the date when that person earned maximum salary. I am using something like SELECT X.name,X.date,X.salary FROM job X WHERE X.salary IN (SELECT MAX(Y.salary) FROM job Y where Y....more >>

Most efficient way to run update query
Posted by rdraider at 6/9/2006 4:54:48 PM
Hi all, Any thoughts on the best way to run an update query to update a specific list of records where all records get updated to same thing. I would think a temp table to hold the list would be best but am also looking at the easiest for an end user to run. The list of items is over 7000 ...more >>

Importing data into MS SQL 2000 from XML file
Posted by Sam Alexander at 6/9/2006 2:39:57 PM
Hi Everone, I'm writing a script to import data from an XML file, and this tutorial is really an awesome guide : http://www.kbalertz.com/Q316005/Import.Server.Component.aspx ... problem though is here's a snippet of my XML file: <planets> <sun rise="6:23" set="20:33"/> <moon rise="18:5...more >>

if-then in select stmnt
Posted by anderma8 at 6/9/2006 9:16:55 AM
Can I determine if a value is numberic then output 'text' else output 'some other text'? I'm trying to do this in a select statement. Thanks! ...more >>

SQL2005 Rebuild Index Not Working
Posted by wackyphill NO[at]SPAM yahoo.com at 6/9/2006 5:02:30 AM
After rebuilding an index, it still shows as the same amount of fragmentation. ANy ideas what's wrong? I'm determining which indexes to rebuild using the following query: SELECT OBJECT_NAME(i.object_id) AS TableName, i.name AS IndexName, ips.avg_fragmentation_in_percent FROM sys.dm_db_ind...more >>

i want ot convert xml data format into the general data format
Posted by surya at 6/9/2006 3:57:24 AM
hi sir i have table hh .it has two columns one is hhno is integer datatype another hhdoc is xml data type like hh table hhno hhdoc ------------ --------------------------------------------------------------------------------- 100 <suresh>sfjfjfjfjf</su...more >>

Backup log - will it truncate?
Posted by Trevor Best at 6/9/2006 2:35:01 AM
According to BOL <--- BACKUP LOG Specifies a backup of the transaction log only. The log is backed up from the last successfully executed LOG backup to the current end of the log. Once the log is backed up, the space may be truncated when no longer required by replication or active transaction...more >>

SQLXML
Posted by Nikolami at 6/8/2006 11:18:24 PM
Is it possible installation SQLXML 3.0 on Windows 2003 Server??? ...more >>

composite index and column order
Posted by Baihao Yuan at 6/8/2006 10:50:50 PM
Hi, I created a composite index (lastname, firstname). I know the following queries will use this index: WHERE lastname = ... WHERE lastname = ... AND firstname = ... Also this won't use the index: WHERE firstname = ... But how about: WHERE firstname = .. AND lastname = ... And why...more >>

Help with 2 datetime fields-1 stores date, the other time
Posted by rdraider at 6/8/2006 9:51:38 PM
Hi, We have a lame app that uses 2 datetime(8) fields, 1 stores the date, the other the time. example query: select aud_dt, aud_tm from orders results: aud_dt aud_tm 2006-06-08 00:00:00.000 1900-01-01 12:32:26.287 I'm trying to create a q...more >>

Times in SQL Server
Posted by trevorjhughes NO[at]SPAM gmail.com at 6/8/2006 5:23:35 PM
I am using an MS Access front end to input data into a SQL server database. From Access I am generating an update query utilising an inline function. My problem is that when I update a time value, instead of updating the field with something like 08:00:00 it updates it to 1/1/1900 08:00:00. I...more >>

Dump of databasse
Posted by Jerry at 6/8/2006 1:47:23 PM
I have a sql 2000 database on my local machine that I need to get to a far away server so he can make one like it on his server. The admin tells me I need to make a dump of it and send it to him. I just don't know how to do that. Can someone help me out? Thanks, Jerry ...more >>

Store program EXE in table?
Posted by HC at 6/8/2006 11:34:22 AM
Hello, Folks. I am not sure if this can be done (and a brief search of this group didn't yield any results that I thought would do the trick) but if it can be done it would make my life easier so here goes. First, what I am trying to accomplish is to make a program I've written automatically ...more >>

Disabling the AUTOCOMMIT option in MSSQLServer
Posted by Uncle Sam at 6/8/2006 8:01:15 AM
Hello, Is there anyway.. we can disable AUTOCOMMIT option in MSSQL server while executing the SQL queries via SQL ANALYZER ...more >>

Log Explorer vs. ApexSQL Log vs. SQL Log-Rescue
Posted by Martin at 6/8/2006 6:52:04 AM
Opinions? I've installed all three to try'em out and they all seem to be working so far, more or less. Log Explorer has given me a couple of errors but I started over and continued OK. ApexSQL Log squawked about "redo for delete cannot be generated for tables lacking clustered index". Hu...more >>

Scripting Databases
Posted by Ryan at 6/8/2006 6:35:15 AM
Is there an easy way to script the tables from within a database to include the indexes etc... Basically, if I want to script a number of tables, I can right hand click on them and generate the script that way. What I'd like to do is this same process in T-SQL if possible so I can build an SP ...more >>

need information for "Before Select" Trigger
Posted by Lucky at 6/8/2006 5:32:27 AM
hi guys! Currently i'm facing a bit odd situation. i cant modify my code so i have to make changes in SQL Server. the problem is, i've modified one table by adding new column and now i want only those row which has not null value in that column whenever the select statement gets fire. i mean ...more >>

SQL Server + Oracle Data linked in one query
Posted by Chris at 6/8/2006 1:13:26 AM
I need to link some data from SQL Server 2005 with Oracle 10 data. One way is to link Oracle server to SQL Server and use ROWSOURCE for retrieving data. What other ways for joing data from both databases exist ? Can I do it from SQLCRL VB - Stored Procedure ? If yes, what objects shall I ...more >>

Cannot Alter Table being Published for Replication
Posted by Brian Wotherspoon at 6/8/2006 12:00:00 AM
Hi all, I'm using SQL Server 2000 SP3 to store data for real time transaction processing. I have set up replication to another server using a push subscription to give me immediate backup. I need to alter the data type of one of the columns and am using the following basic sql: al...more >>


DevelopmentNow Blog