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) > march 2006 > threads for march 8 - 14, 2006

Filter by week: 1 2 3 4 5

Communication betwee two tables
Posted by lucky at 3/14/2006 10:46:19 PM
Hai, I am having a query that i want to communicate two tables that one is school table & other is class table as shown below school table: Class strength LKG 30 UKG 40 class table:(LKG) ...more >>

DB_E_ERRORSINCOMMAND ( HRESULT = -2147217900 )
Posted by Prince at 3/14/2006 10:43:41 PM
Hai all, I am getting an DB_E_ERRORSINCOMMAND exception when I try to open a recordset or execute query in VC++. But when I run the same query in Query Analyzer, it is working fine. I am sure the connection string is correct. I am running a collection of queries and finally commit the tran...more >>

Greatest value
Posted by Marv Arnold at 3/14/2006 4:54:06 PM
Hi all. I'm looking for assistance to get the greatest value from 3 or more different columns. I'm assuming that the best way is to put the columns into a temp table and use 'max' function to return the greatest value but don't know how to code it. Thanks in advance. *** Sent via Develop...more >>

views dependent on other views
Posted by lukster NO[at]SPAM gmail.com at 3/14/2006 12:29:25 PM
Hello There, I'm trying to create a view that has calculations dependent on calculations, where the problem resides is that each time I make a calculation I must create an intermediate view so I can reference a previous calculation. for example lets say I have my_table that has columns a & ...more >>

Plz Help!!
Posted by MrNovice at 3/14/2006 9:30:23 AM
Hi guys I have installed SQL 7.0 for the first time and now when I try to connect in query analyzer I get the following error message: Unable to connect to server \\localhost: server:Msg17,level16,state1 [microsoft][odbc sql server driver][dbnet lib]sql server does not exist or access...more >>

SQL Server 2005 vs Ascential
Posted by jim_geissman NO[at]SPAM countrywide.com at 3/14/2006 7:31:34 AM
Can anyone please point me to a study comparing SQL 2005's integration services with Ascential, specifically for the tasks of (a) matching records about residential properties and transactions (typically described in terms of address, owner name, parcel number and legal description -- which may ...more >>

General Question about doing calculations in SQL
Posted by chudson007 NO[at]SPAM hotmail.com at 3/14/2006 7:30:53 AM
This is a very general quastion..... I regularily take data extracts from a SQL server database drop them in excel and run a macro on the data. The macro does nothing more complicated than loops, addition, subtraction and remeber the changing value of a declared variable. It works perfectly...more >>

Identifying "filler"
Posted by jim_geissman NO[at]SPAM countrywide.com at 3/14/2006 7:21:43 AM
Some columns in transaction tables are "mandatory fields" on the data entry screens, and as a result tend to accumulate junk entries, where the user puts something, anything, in the window in order to get the GUI to accept the screen. This filler isn't as elaborate as Lorem Ipsum, but more like...more >>



Timeout expired
Posted by pb648174 at 3/14/2006 7:09:39 AM
After executing osql from the command line via the Windows scheduled task interface, the following error is returned: "Timeout expired" The code in the sql is as follows: BACKUP Database DBName to DISK='D:\Files\Backups\DBName.bak' WITH INIT go Is the timeout happening during the backup o...more >>

2005 Database Mirroring & Witness
Posted by Ryan at 3/14/2006 6:20:07 AM
I'm devlving into 2005 and specifically mirroring. Having read the following article ( http://www.microsoft.com/technet/prodtechnol/sql/2005/dbmirror.mspx ), is mirroring a sensible option as it indicates that it should not be used in a production environment, yet the SQL2005 seminars I've bee...more >>

convert a datatype
Posted by surya at 3/14/2006 5:52:59 AM
i have table tt. it contains two fields one is ttno int,doj datetime . i want to convert to datetime to varchar . how it is .... give me some examples ...more >>

Error (8626) while inserting record into table with text field and which is the base for indexed view
Posted by ing42 at 3/14/2006 3:12:29 AM
I have a problem with inserting records into table when an indexed view is based on it. Table has text field (without it there is no problem, but I need it). Here is a sample code: USE test GO CREATE TABLE dbo.aTable ( [id] INT NOT NULL , [text] TEXT NOT NULL ) GO CREATE VIEW db...more >>

Values of two columns in two different tables--presentation using select
Posted by satish at 3/13/2006 11:16:50 PM
Values of two columns in two different tables--presentation using select Hi Everyone, i have two tables in the database . One is called address table and one is adressPhone Table. Below is the sample of those two tables Address col1 col2 col3 X 12 13 y 15 ...more >>

[ANNOUCE] New XML Schema Video Tutorial
Posted by Stylus Studio at 3/13/2006 8:44:20 AM
Hey Everyone, A brand new video tutorial on XML Schema has just been released. The video covers the following topics: =B7 Using the XML Schema Generator to quick-start creating XML Schema =B7 Generating an XML schema from EDIFACT or X12 =B7 Creating an XML Schema from a DTD =B7 How to...more >>

Problems with SQL 2000 and 2005 on same machine - Can't connect on 2000
Posted by lourivalsjr NO[at]SPAM gmail.com at 3/13/2006 5:04:50 AM
Hi, i have SQL 2000 and 2005 on same machine(with different intance names, of course), my laptop - XP with SP2. The 2005 works fine but i can't connect on SQL 2000. All the the SQL services are started. Any idea? Have i to reinstall 2000? Tks, Lourival ...more >>

Naming syntax in 2005
Posted by newtophp2000 NO[at]SPAM yahoo.com at 3/12/2006 2:26:55 PM
Here is a simple question. I am having difficulty accessing books online at Microsoft so I thought I would ask here. What is the standard naming syntax for Sqlserver 2005? Assuming I had the following table, [proddb01].[details].[dbo].[daily_tranx], how would I refer to it in the new version?...more >>

looking to collect distinct date part out of datetime field
Posted by sdowney717 NO[at]SPAM msn.com at 3/11/2006 5:02:03 AM
from this, circdate being a datetime field: SQLQuery = "select distinct circdate from circdata order by circdate" I need the distinct date portion excluding the time part. this has come about when I discovered I am inserting and updating some datetime values with the same value, but for som...more >>

Identifying Duplicates in a table
Posted by chudson007 NO[at]SPAM hotmail.com at 3/11/2006 3:31:33 AM
I need help flagging duplicate records in ome tables I have. For example if I have Table1 which conatins Field1, Field2 and Field3 like below Field1 Field2 Field3 Field4 Paul 18 Null Null Paul 18 Null Null John 19 Null Null How would I; 1=2E put a 'Y' i...more >>

Pipe delimiter problem
Posted by chudson007 NO[at]SPAM hotmail.com at 3/11/2006 3:21:37 AM
Can somebody help me with a delimiter problem I have. I have several PIPE (|) delimted text files which I need to import to SQL. With one of the files I keep encountering the following error; "Error at Source for Row 27753. Errors encountered so far in this task: 1=2E Column Delimter not fo...more >>

Syntax of updating table variables?
Posted by sean.gilbertson NO[at]SPAM gmail.com at 3/10/2006 9:48:14 AM
Hi, I have a user-defined function which returns a table (call it '@a'), and has another table defined as a variable (call it '@b'). When I try to do the following query, I get "Must declare the variable '@b'" and "Must declare the variable '@a'." How do I remedy this? The query: UPDAT...more >>

User-defined function and temporary tables
Posted by sean.gilbertson NO[at]SPAM gmail.com at 3/10/2006 8:56:37 AM
Hiya, Is there really no way to use temporary tables from within a UDF? I like UDFs because I can use them like a table -- e.g., SELECT row1, row2 from MyFunc('abc') ...more >>

Linked Server via ODBC and stored procedure
Posted by chloe.crowder NO[at]SPAM bl.uk at 3/10/2006 8:30:41 AM
Hi We're trying to use call a stored procedure to update information in a remote Ingres database. We've linked the server, and can read information using SELECT * FROM OPENQUERY (..........), but we can't find a suitable syntax for executing a procedure. Using SELECT * FROM OPENQUERY and pa...more >>

SQL Server Scanning Tables
Posted by Miks at 3/10/2006 6:26:42 AM
Hi, When we make a search for a table in SQL Server 2000 sysindexes table is searched and indid field is checked, If it's 0 we go for full table scan (No Indexes Present) If it's 1 it means clustured index column is used for search. 2-254 means non-clustred indexes used. Thank you ...more >>

Too Many SET Options
Posted by Dil at 3/10/2006 5:52:12 AM
Hi I have created a Sql Script through Enterprise Manager for Drop a column. By default its creating lot of 'SET' commands. I doubt all these SET options are required or not. Pls comment on this issue BEGIN TRANSACTION SET QUOTED_IDENTIFIER ON SET TRANSACTION ISOLATION LEVEL SERIALIZABLE ...more >>

freeTDS ODBC
Posted by Ajay at 3/10/2006 5:11:03 AM
Hi, Is freeTDS ODBC already ready? If yes, how to find it? Also, is it compatible to Windows: i.e. can itbe compiled on windows. Please tell me if youhave sonmeother ODBC solution also. Thanks and regards, Ajay ...more >>

dbcc shrinkfile - SQL Server 2000 - invalidate log?
Posted by deebeeay NO[at]SPAM gmail.com at 3/10/2006 1:44:03 AM
Hi, I need to shrink a database file and was wondering whether it is required to run a full backup after the shrink operation. In SQL Server 7.0 shrinkfile was a non-logged operation so would invalidate your transaction logs. Is the same true for 2000? Obviously as a matter of course I wo...more >>

powerfull Oracle specifications PC
Posted by ehabaziz2001 NO[at]SPAM gmail.com at 3/9/2006 11:38:43 PM
I need a powerfull specifications of PC also bears to work as server for multiuser(4 users) oracle application . I need vendors of PC and specifications . Would you please help ? ...more >>

Oracle Application and laptops
Posted by ehabaziz2001 NO[at]SPAM gmail.com at 3/9/2006 11:25:26 PM
I need advice of a powerfull laptop can bear the future extensions of Oracle editions and implementing installations of all Oracle products on it ? ...more >>

can i increment the column (c1+2) ---by creating the trigger
Posted by satish at 3/9/2006 9:53:19 PM
hi, i am a beginner to ms sql server2000 i have a table create table ddd (a int, b int) by table structure is a b now when i enter a value in b column suppose '2' in column b bext time when i insert a value in the column a i have to get the value in b as 3 is thi spossible with trigger...more >>

Help optmizing a stored proc
Posted by CK at 3/9/2006 5:45:48 PM
I have this CREATE PROCEDURE dbo.cmsGetTaskOrdersAndFunding2 ( @FundingDate SMALLDATETIME, @BillingContractID INT, -- null for all contracts @Filter BIT = NULL ) AS -- get list of taskorders with their respective fundingtotals as of specified date IF @Filter IS NULL BEGIN...more >>

Update a uniqueidentifier from a string!!!
Posted by Mike R at 3/9/2006 4:14:10 PM
Hi, I have this simple bit of SQL UPDATE A SET a.owninguser = c.companyname --select a.owninguser,c.companyname from campaignresponsebase c inner join activitypointerbase a on a.activityid = c.activityid WHERE Companyname is not null Companyname contains a string which happens to be a ...more >>

Different query plans for view and view definition statement
Posted by ysfinks at 3/9/2006 1:30:59 PM
I compared view query plan with query plan if I run the same statement from view definition and get different results. View plan is more expensive and runs longer. View contains 4 inner joins, statistics updated for all tables. Any ideas? ...more >>

Optimization jobs - transaction deadlock victim
Posted by traceable1 at 3/9/2006 11:42:06 AM
I am running SQL Server 2000 SP4 (w/AWE hotfix) on a 32-bit Windows 2003 Server (SP1). I am trying to run an Index defrag and rebuild job. It has worked fine in the past, but lately I'm getting this: Msg 1205, Sev 13: Transaction (Process ID 73) was deadlocked on lock resources with anot...more >>

how to install 64-bit version?
Posted by sql_server_user at 3/9/2006 10:22:31 AM
I installed SQL Server 2005 on a server running Windows Server 2003 x64, and it installed into the "Program Files (x86)" directory, so I assume it installed the 32-bit version. How do I get it to install the 64-bit version? I don't see an option for this anywhere. I got the DVD at the MS launch ...more >>

Memory limitations, 2005 Standard
Posted by IM at 3/9/2006 7:10:10 AM
Hi all, I have recently implemented a SQL 2005 cluster using SQL 2005 Standard on Windows 2003 Enterprise edition. Both nodes have 4GB of RAM and according to the datasheet, SQL 2005 Standard can support the OS maximum memory amount and Win2K3 Ent Edition can support 64GB! However, in En...more >>

SQLInjection with OpenXML
Posted by figital at 3/9/2006 7:07:10 AM
I am researching the use of OpenXml for doing mass updates/inserts. Does anyone know how this procedure works as far as sql injection is concerned? I've always been taught to use sp's with parameters...does using OpenXML open up any holes in that idea? My thinking is that it would be fine (m...more >>

Execution Plan Hinting
Posted by Ryan at 3/9/2006 3:59:59 AM
We've got as slightly unusual scenario happening whereby a statement is passed to SQL which consists of two parts. BEGIN TRANSACTION DELETE * FROM Whatever BULK INSERT INTO Whatever...(etc) COMMIT TRANSACTION The first is a deletion of the data and the second is the bulk insert of rep...more >>

sql query in vb
Posted by GANESH NAIDU at 3/9/2006 12:00:00 AM
i need help in sql query my coding is as under Dim MRUNYEAR As String MRUNYEAR = "0405" Set fgrs = New Recordset fgrs.Open "select CT3HDR.CT3ID, CT3HDR.CT3NO, format(CT3HDR.ct3date,'dd/mm/yyyy'), suppmast.suppname FROM CT3HDR INNER JOIN suppmast ON CT3HDR.suppID=suppmast.suppid WHERE CT3HDR...more >>

Possibly simple query but I'm not good enough to fathom it!
Posted by Laphan at 3/8/2006 9:44:26 PM
Hi All I know that I should supply the DDL for the tables I'm going to talk about, but I'm not 100% on how to generate them just yet. Hopefully my question is more a query methodology question than how the tables are constructed. My first attempt at the query is as follows: SELECT st.STO...more >>

Divide by Zero
Posted by Joriveek at 3/8/2006 2:53:09 PM
When I specify a formula between Computed Column Specification, I have two zero values, getting Divide by Zero error, any idea how can I avoid this? I still want SQL Server to display Zero if it is 0/0, is this possible in SQL Server database? Thanks J. ...more >>

Getting list of recently added IDENTITY items
Posted by pb648174 at 3/8/2006 2:22:07 PM
In a multi-user environment, I would like to get a list of Ids generated, similar to: declare @LastId int select @LastId = Max(Id) From TableMania INSERT INTO TableMania (ColumnA, ColumnB) SELECT ColumnA, ColumnB From OtherTable Where ColumnC > 15 --get entries just added SELECT * FROM ...more >>

Query assistance
Posted by cory.craig NO[at]SPAM integris-health.com at 3/8/2006 12:54:21 PM
I am trying to pull some "notes" from a sql database.....the notes that are put into the database come via the web and the user is entering it for a certain task. they are stored in their own table and field and get assigned and incremental ID #. I want to be able to pull up the latest entry ...more >>

Speed up Bulk Update
Posted by Ben at 3/8/2006 12:52:25 PM
We are planning to add a new attribute to one of our tables to speed up data access. Once the attribute is added, we will need to populate that attribute for each of the records in the table. Since the table in question is very large, the update statement is taking a considerable amount of ti...more >>

bcp with format file
Posted by KR at 3/8/2006 11:34:25 AM
I am trying to copy the data in excel file into a table using the bcp and this is the code that I have. However the bcp utility does not seem to create a format file, which I thought it should do. I am probably going about this all wrong so any help would be useful. exec master..xp_cmdshe...more >>

need help to take the variables associated with the 1st occurrence of a date variable
Posted by menglin.cao NO[at]SPAM gmail.com at 3/8/2006 11:04:57 AM
Hi, I am trying to join two tables, one has multiple records per ID, the other is unique record per ID. The two tables look like below A ID date var1 var 2 001 1/1 10 20 001 2/1 12 15 001 3/1 17 18 002 2/1 13 10 002 3/1 12 14 ............ B ID 001...more >>

Query Brain Teaser - Revenue Projections
Posted by datagal NO[at]SPAM msn.com at 3/8/2006 10:08:44 AM
I have a requirement (motivated by a SOX thing) that is just giving me fits. I know it should be easy and I'm probably overthinking it, but I just can seem to find the best way to get where I need to go. I have some payment projection data derived from a huge procedure that I'm dumping into a...more >>

PK
Posted by J at 3/8/2006 9:52:22 AM
I have seen some look-up tables have no primary key because there is a null or " " value in them. Since every table should have a Primary Key, can anyone educate me how can I handle null or " " value, in the code level? I am avoiding using Surrogate key. Thanks, J P.S. Null ...more >>

Can't fit results of tsql query in excel
Posted by roman.ali NO[at]SPAM tiscali.co.uk at 3/8/2006 7:29:19 AM
Hi, I am using a .dqy file to import some rows from a sql server 2003 database to microsoft excel. Unfortunately, I have am importing more rows than excel can handle. Is there a way around this? It appears that there is no equivalent of the LIMIT(offset, number of rows to return) function...more >>

Changing Machine Names MSDE
Posted by Frank Bishop at 3/8/2006 4:23:13 AM
I have a local install of MSDE on my workstation. I have also defined a linked server with another SQL Server on our network. I accepted all the defaults when I installed MSDE and the server got named my machine name. Everything is working great. Our IT department now needs to change my machin...more >>

how to write one stored procedure for a (same column )present in 20 tables
Posted by satish at 3/8/2006 3:13:21 AM
hi, i am a learner of ms -sql server 2000, i had a doubt in stored procedures suppose i have a data base having 20 tables, all the tables have a column named--DATE can we write a store procdure to find out the data ---i mean i want the data entered between two days ---- if i call the s...more >>


DevelopmentNow Blog