Archived Months
January 2003
March 2003
April 2003
May 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
November 2007
April 2008


all groups > sql server programming > june 2006 > threads for friday june 16

Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30

[ConnectionWrite (send()).]General network error
Posted by tech.support.b NO[at]SPAM gmail.com at 6/16/2006 11:17:58 PM
Hi All I have a visual basic application, which uses SQL Server 2000(sp3a) as the database, MDAC 2.8 library. I open one connection to the db on the application start, and the applicaiton works fine for few days, then suddenly it gives this error [DBNETLIB][ConnectionWrite (send()).]General n...more >>

How to use Case Statement
Posted by Tanweer at 6/16/2006 4:22:01 PM
I tried and came up with no solution. I need to use Stored procedure and no dynamic sql. I ma using ms sql 2000 service pack 3 I am using three different tables. How I can make it to run union statements only for those table where passing values for the variable is 1 Thanks Tanweer D...more >>

Invalid entries in sysindexes
Posted by Jon Brabham at 6/16/2006 4:07:40 PM
Hi all, I am running an INDEXDEFRAG on all tables in the database and am receiving the following error: DBCC INDEXDEFRAG (msdgen, 279500991, pmshr_iv_inventory_trans_init) Server: Msg 7999, Level 16, State 8, Line 1 Could not find any index named 'pmshr_iv_inventory_trans_init' for table ...more >>

Dyncamic SQL
Posted by Ricky at 6/16/2006 4:07:19 PM
Hi I am trying to populate a Temp table with dynamic SQL but it does not seem to work and the error message returned is that is it an invalid object, leading me to believe that it does not get created: --************************************************ USE Pubs GO SET @SQLString = ' SEL...more >>

Getdate() default value does not get created
Posted by Bob at 6/16/2006 3:57:44 PM
I have a table in which a field named DateCreated has the default value (getdate()). THis has always worked before in other apps, it would naturally write the computer's date time whenever a new record was created. I can't figure out why all of a sudden the field in this table no longer get ...more >>

Progress and 4GL verses SQL Server and VB/VBA
Posted by pkohn NO[at]SPAM charter.net at 6/16/2006 3:39:48 PM
I just joined a new company which uses Progress and 4GL. I come from a SQL Server VB/VBA environment. An in-depth "discussion" has come up several times regarding Progress verses SQL Server and I'm always told that Progress/4GL can do anything SQL Server/VB/VBA can do so why should we switch. ...more >>

SQL Query question
Posted by bighitta at 6/16/2006 2:33:55 PM
I have two tables, Table A which contains house property information and table b which contains viewing info about the properties. I need to write a query which will show all properties that have had no viewings for 3 weeks and then show the whole months viewings. for example, assume "1 high s...more >>

displaying milliseconds in VB 6 program
Posted by Ellie at 6/16/2006 2:11:18 PM
Hi, I am trying to get my VB program to recognize milliseconds when it is returned as a datetime field from sql. I can format it to the seconds but can't find out to include the milliseconds. Any help would be appreciated. Ellie ...more >>



spt_datatype_info in sql 2005 ? need length of text field
Posted by Mike at 6/16/2006 1:53:02 PM
here is my query in sql server 2000 that returns length of text field as 2147483646: select c.name,d.length,d.ss_dtype from syscolumns c join sysobjects o on c.id=o.id, master.dbo.spt_datatype_info d, systypes t where o.name='customer' AND t.xtype = d.ss_dtype AND c.xusertype = t.xusert...more >>

Cursor not completing when stored procedure runs within it
Posted by dwcscreenwriterextremesupreme NO[at]SPAM gmail.com at 6/16/2006 1:47:02 PM
I am having an interesting problem I haven't seen. First, here's the code that sets up the cursor, with a select statement where the exec should be, and the results: DECLARE @order_id int, @row_id int, @qty_rtn int, @invoice_id int, @date_shipped datetime DECLARE or...more >>

Data Modeling Question; Patients and Referrals
Posted by Jordan S. at 6/16/2006 1:13:50 PM
A medical office for which I'm designing a database receives many many referrals from other doctors offices. A small subset of these referrals become patients. These referals and patients must be represented in the new database. The data collected for referrals is minimal, while the data fo...more >>

Aaron Bertrand PLEASE HELP
Posted by Kent Prokopy at 6/16/2006 12:42:42 PM
Is there a way to Reference an alias field name in an SQL Statement? Example: Select 1 + 1 AS F1, F1 + 1 AS F2 ...more >>

Help Me Write This Query
Posted by Tod at 6/16/2006 12:41:32 PM
Sorry for my newbieness: I have a table (Cases) where Case_Number is the unique id field. Another table (CommentsTable) contains these fields Case_Number Comment_Date Comment As users enter comments to the database, the comment gets a date/time stamp (Comment_Date) and is recorded in th...more >>

one to (one or zero) relationship
Posted by shumaker NO[at]SPAM cs.fsu.edu at 6/16/2006 12:30:19 PM
How do I represent a one to (one or zero) relationship? This is a puzzle to me. The purpose of having the relationship this way is I want Table1 to be able to accept an insert of a PK even when there is not a related FK in Table2. I can set the FK as a unique, but when I create the relations...more >>

Calling nested stored proedure many times
Posted by Peter at 6/16/2006 12:17:02 PM
There are two stored procedures. One calls the other one time. It works. create procedure nestedSP @p float as declare @q float set @q = @p select @q go create procedure CallingNestedSP @p float as exec nestedSP @p go exec CallingNestedSP 111.11 How do I get the ...more >>

HELP with case statement [Divide by zero error encountered.] !!!
Posted by ITDUDE27 at 6/16/2006 12:10:02 PM
Hi, I have a case statement that has been giving me hell for the past day, can anyone suggest another way of validating is those field have zeros or not. The field types are numberic, looking at the table their is no Null values in there a few hundred zeros (0, .000). I have tried this sta...more >>

ORDER BY clause with unknown column name
Posted by mcnewsxp at 6/16/2006 11:30:56 AM
can i use an unknown column in an ORDER BY clause with t-sql? i know it will always be an identity field and it is in the first column. it is also the primary key. can i depend on a recordset always being in this order without the the clause? ...more >>

Count Of items, Count of Items Passed and percentage passed
Posted by Jay Balapa at 6/16/2006 10:55:57 AM
Hello, Underlying table has the following fields and values Barcode Item Pass 1000 x YES 1001 x YES 1002 x NO 1003 x NO 1004 y YES 1005 y YES 1006 y NO Iam trying to create a...more >>

Help with SP or Function
Posted by SAM at 6/16/2006 10:14:02 AM
I was trying to write this MDX but I am getting errors so maybe I should create a stored procedure against my CUBE. I want to return two values : Revenue Avg and Product Price Avg by a specific time and Sales Region. can someone provide an example? My cube provides the total revenue for...more >>

One stored procedure calls another stored procedure
Posted by Peter at 6/16/2006 9:54:02 AM
I guess that it is OK to call a stored procedure from another stored procedure for reuse purpose. Please advise with your opions, sample code, help information. Thanks Peter...more >>

Resizing TempDB From a Trigger
Posted by Jeff at 6/16/2006 9:17:05 AM
I understand that a SQL Server can slow down if TempDB runs out of space and must be resized. So, towards keeping TempDB "big enough" I'm wondering if it would be a great idea to do the following: 1. Create a stored procedure that checks the size of TempDB and causes it to increase in size ...more >>

Create SCHEMA - Basic Question - 2005
Posted by S Chapman at 6/16/2006 9:16:27 AM
I am trying to execute the following T-Sql snippet and it gives an error: IF NOT EXISTS (SELECT * FROM sys.schemas WHERE name = N'ExpData') CREATE SCHEMA [ExpData] AUTHORIZATION [dbo] Error = Msg 156, Level 15, State 1, Line 26 Incorrect syntax near the keyword 'SCHEMA'. I can't fo...more >>

Simple Synonym Question
Posted by MJKulangara at 6/16/2006 9:04:26 AM
Can I make a Synonym for an entire Database ? For example something like.... create SYNONYM syndDB FOR [YourServerName].YourDatabaseName] and then select * from [syndDB].sys.sysobjects TIA ...more >>

Using Variable in OPENROWSET statement...
Posted by Hiten at 6/16/2006 8:38:00 AM
Hi Following is the code to get data From xml file located at E: Now the file path will get changed in future there for path will come by one parameter @strPath in this case declare @hDocA int,@xmlDocAsgt XML,@strPath set @strPath='E:\Temp.xml' --- Parameter value any path set @xmlDocAs...more >>

strategy for updates in stored procedures
Posted by andymilk NO[at]SPAM gmail.com at 6/16/2006 8:35:03 AM
Hello all, I'm designing an application and writing stored procedures for it. I'd like to have one stored procedure for each table that handles the UPDATES. Depending on what parameters are passed in, those fields will be updated. Sometimes it might be all the fields, sometimes maybe just ...more >>

Not Recocnised function problem
Posted by Jami at 6/16/2006 8:07:38 AM
Hi to ALL I have created a function using followinf statement CREATE FUNCTION [dbo].[fncLocCount] (@ID as smallint) RETURNS smallint AS BEGIN declare @iReturn integer set @iReturn = (select count (distinct locationid) from tbl_employees where locationid= @ID ) Return @iReturn END ...more >>

Reference alias field name
Posted by Kent Prokopy at 6/16/2006 8:05:01 AM
Is there a way to Reference an alias field name in an SQL Statement? Example: Select 1 + 1 AS F1, F1 + 1 AS F2...more >>

limit to where claus
Posted by Marty at 6/16/2006 8:01:02 AM
Is there a maximum limit the WHere clause in sql server? How about when you use the like operator? where can i find this information? ...more >>

Books for sql2005
Posted by Markgoldin at 6/16/2006 6:03:02 AM
Can some recommend a few good books for sql 2005? Thanks...more >>

SP IO Statistics and Execution Plan different - why?
Posted by smithabreddy NO[at]SPAM gmail.com at 6/16/2006 5:29:12 AM
I have an SP which performs about 75,000 logical reads on a table with 78000 records in a Test database. The same SP performs about 39 million logical reads (for the same parameters supplied), adds index/lazy spools, etc to the execution plan in PROD and the PROD replica (replicated version of P...more >>

Is Sql-Server 2005 Object Oriented DBMS
Posted by grawsha2000 NO[at]SPAM yahoo.com at 6/16/2006 5:07:55 AM
Greetings, I would like to konw if Sqlserver 2005 supports Geographic Information System (GIS) data, i.e., supports spatial data, like Oracle? MTIA, Grawsha ...more >>

Select top rows from each group
Posted by Ross at 6/16/2006 4:10:26 AM
I would like to use a select that gets the top two per group I would like to do the following. I know it is not as simple as the select I have as an example below but you get the idea of what I am trying to do. SELECT TOP 2 <pr group> * FROM SCORETABLE GROUP BY CODE ORDER BY SCORE Rec...more >>

monitoring servers
Posted by bringmewater NO[at]SPAM gmail.com at 6/16/2006 4:02:25 AM
Is there a way (script, tool, whatever) that I can monitor sql servers and services on multiple different servers. Basically I want on screen that can display that status of many sql servers and services on multiple servers. Thanks ! ...more >>

How to insert picture into Image column?
Posted by pedestrian via SQLMonster.com at 6/16/2006 2:13:16 AM
I'm using SQL Server 2000. What's the command to insert a picture (.bmp, .jpg. ...) into an Image type column? Regards, -- Pedestrian, Penang. Message posted via http://www.sqlmonster.com...more >>

[ConnectionWrite (send()).]General network error
Posted by tech.support.b NO[at]SPAM gmail.com at 6/16/2006 1:02:23 AM
Hi All I have a visual basic application, which uses SQL Server 2000(sp3a) as the database, MDAC 2.8 library. I open one connection to the db on the application start, and the applicaiton works fine for few days, then suddenly it gives this error [DBNETLIB][ConnectionWrite (send()).]General n...more >>

SQLDMO how to execute a sql script file(.sql) / sql code?
Posted by BEelzebub at 6/16/2006 12:00:00 AM
who can tell me! thanks...more >>


DevelopmentNow Blog