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 > august 2003 > threads for monday august 11

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 31

Query doubt
Posted by Satish at 8/11/2003 11:43:42 PM
Hi All, I have a query which returns rows like this: Week Year Name Amt 15 2003 Name01 35.0 20 2003 Name02 8.0 15 2003 Name03 36.0 16 2003 Name04 2.0 15 2003 Name04 20.0 13 2003 Name05 3.0 14 2003 Name05 3.5 15 2003 Name05 6.25 16 2003 Name05 4.0 17 2003 Name05 5.0 18 2003 Name05 9....more >>


debugging store procedure in C# application
Posted by homcheon NO[at]SPAM yahoo.com at 8/11/2003 11:05:11 PM
Hi, I have been trying to debug store procedures in my C# applications. I have found some vb examples on the internet and followed it. So far it doesn't work. Is it possible to do this in C#? or is this something that I can only do in VB. Maybe I'm doing something wrong. Here is some inform...more >>

SQL Connection Problem.
Posted by Ravi Anguluri at 8/11/2003 7:34:21 PM
Hi, we use VB & command object to update SQL 7.0 database. We had this strange problem. VB DLL returned "Communication Link Failure". Can I get some information on show to solve this problem, or how the problem can be repeated. Thanks alot & regards Ravi ...more >>

select query
Posted by priya at 8/11/2003 7:27:38 PM
Hi Guys, I have a question, an immediate help is requested. create table try (id int, status int, dob datetime) combination of all 3 fields forms a primary key. data is as follows: ID criteria dob 1 30 2003-01-01 00:00:00.000 1 60 2003-01-10 00:00:00.000 2 60 2003-01-10 00:00:00.000 2...more >>

Trigger inadvertantly rolling back
Posted by Matt at 8/11/2003 7:07:20 PM
Scenario: My trigger code uses sp_OAMethod which will call a COM object method to insert data into another system. I check the return value from sp_OAMethod and from the methods return parameter. On success or failure of the method I log an entry into a table from within the trigger. If ...more >>

Storing unicode into ntext field using Delphi
Posted by Lou at 8/11/2003 6:25:59 PM
Thanks. But I am using the ADO query to update the text as=20 in the following: Ado.Edit; Ado.FieldByName('DataText').AsVariant :=3D WideStrVar; Ado.Post; The '=E7' will be converted to 'c'. How can this be solved? Lou >-----Original Message----- >If your database's non-Unicode code ...more >>

joins
Posted by Belinda Rodriguez at 8/11/2003 4:26:32 PM
Hello, I am trying to create a join that will combine all information that is the same and also give me all the information that is different from both tables. I tried doing a union but I do not have a equal number of columns between tables. Right now I am doing a left outer join but it only ...more >>

Central Database Design
Posted by Shamim at 8/11/2003 3:47:13 PM
SQL SERVER 2K We have 30 databases each for one business units. Now I am consolidating few tables from 30 databases to one database for Analysis purpose. Now my tables in Central db have millions of records. I need some tips to handle this huge tables for query purpose (already applied wit...more >>



Pivot Table howto
Posted by Marc Eggenberger at 8/11/2003 3:38:14 PM
Hi there. I have filled a temp table which has the follwing data: Date %-Gesamt %-Projekt %-Other 2002-01-01 90.27 67.25 23.03 2002-01-02 80.69 71.25 9.44 2002-01-03 80.72 67.66 13.06 2002-01-04 74.9 62.37 12.53 2002-01-05 90.44 71.68 18.76 2002-01-06 11.25 10.69 0.56 2002...more >>

Query to find table name?
Posted by JDP NO[at]SPAM Work at 8/11/2003 3:18:40 PM
Query to find the table name from any given field/column name? ------------------------------------- Say I have two tables, I want to return the table name given a certain field. My proc will create a working temp table with have a fieldname and a value (N,V) pairs I will then create a ...more >>

Help with case statement
Posted by Ricky at 8/11/2003 3:13:33 PM
Following is my query: declare @dtStart datetime, @dtEnd datetime, @sdt smalldatetime, @sdt1 smalldatetime set @dtStart = '2003-07-01 00:00:00' set @dtEnd = '2003-07-30 23:59:00' set @sdt = convert(smalldatetime, CONVERT(varchar(8), CONVERT(varCHAR(8), @dtStart, 112)) + ' ' + convert(varch...more >>

To create field with options through Script
Posted by Frank Dulk at 8/11/2003 3:07:47 PM
How to do to create for instance, a called field to WALK that can be underground, earthy, 1o floor, 2o floor, etc. I used: create table ionarios( n_func int not null primary key, nome varchar(80) not null, WALK set('subsolo','térreo','1o walk','2o walk') not null, ... ...more >>

Convert.... can't get the comma.
Posted by BobMcClellan at 8/11/2003 3:07:25 PM
trying to get 3,510.92 as result from.... Select convert(SMALLMONEY,3510.92,1) midl CONVERT (data_type[(length)], expression [, style]) bol says that style 1 will format with commas but I've tried every variation I can think of. Value Output 0 (the default) No commas ...more >>

how to enforce unique key
Posted by mariah at 8/11/2003 2:45:51 PM
this should be a comman task. how can I enforce that the rows to insert to the table have unique key values? I am writing the C# code in which I try to update the SQL database. When multiple users try to insert into tables the key that is unique in the local key space could be non- unique ...more >>

Create Table Using Passed Variables to SP
Posted by T at 8/11/2003 2:27:48 PM
I am trying to create a table by passing the name of the table to create. Here is a section of the sp. Any help is appreciated. CREATE PROCEDURE [dbo].[sp_CreateMyTable] @TableName varchar(255) AS Set QUOTED_Identifier on Declare @strName varchar(255) IF (@TableName <> '') P...more >>

interesting table matrix problem
Posted by Jay at 8/11/2003 2:26:48 PM
i have an interesting problem (may be simple to experienced programmers): i want to create an n x n table that represents an n x n matrix, where there are n rows and n columns. the 1st row has values that equal the column names (this is like a crosstab query in access). the trick is that r...more >>

FoxPro to SQL
Posted by Jane at 8/11/2003 2:19:21 PM
I have about 12 pages of FOXPRO codes to be written up in SQL. However, there is a SCAN command beginning in page 2 and ENDSCAN ends at page 12. The SCAN command in FOXPRO is for processing one record at a time. It will move to the next record when it reaches ENDSCAN. Within the SCAN- ENDSC...more >>

nsqlprep and C++.NET compiler
Posted by Doug Twyman at 8/11/2003 2:15:50 PM
I have embedded SQL statements within a C source module. When I compile the output of the nsqlprep utility, with Visual Studio 6.0 (and Visual Studio 6.0 libraries), the compilation completes successfully. However, when I precompile this same module, using nsqlprep, with the Visual Studio....more >>

Inserting Stored Procedure Results into a Temporary Table
Posted by Carl Jasper at 8/11/2003 2:15:25 PM
Hi, Is it possible to execute a Stored Procedure (sp_B) from within another Stored Procedure (sp_A) and insert the results from sp_B into a temporary table in sp_A? Thanks, Carl ...more >>

Is this possible?
Posted by Gary at 8/11/2003 2:13:20 PM
I'm trying to find a way to do a replace a in text data type. I have a fairly good idea of how to write it, but I was curious if someone knew of one that existed already. ...more >>

TempDB annoyance
Posted by Dustin at 8/11/2003 2:06:33 PM
Whenever I try to do a large update to my SQL database 10 minutes through the update Query I receive this error message Could not allocate space for object '(SYSTEM table id: - 333902149)' in database 'TEMPDB' because the 'DEFAULT' filegroup is full.. What causes this? How can I set th...more >>

Defining no change to Update Proc fields
Posted by Earl Teigrob at 8/11/2003 1:54:34 PM
There are times when, based on security or other constrants, not all fields of an update are not defined and I need a way to tell the proc not to update those fields. Is there a way to do this? In the code below, I would like to have a way to have a way to leave pkDinersStatus as it current...more >>

Transposing
Posted by Ricky at 8/11/2003 12:51:57 PM
I have a tag table: tagkey,tagname,description... etc. 12,'MetGB021WT','XYZ' 13,'MetGC021WT','X1Y1Z1' 14,'MetGD021WT','X2Y2Z2' ....... I have data table tagkey,datetime,value,quality 12,'2003-01-01 00:00:00',23,192 12,'2003-01-01 01:00:00',23.12,192 12,'2003-01-01 02:00:00',23,43,192 ....more >>

error no 7405
Posted by Rajah Venkata Krishnan at 8/11/2003 12:44:32 PM
I am getting this error 7405 which is 'Heterogeneous queries require the ANSI_NULLS and ANSI_WARNINGS options to be set for the connection. This ensures consistent query semantics. Enable these options and then reissue your query' in so many inconsistent ways. For eg. when stored pr...more >>

How to update a view after table modification (re-compile?)
Posted by Rene at 8/11/2003 11:48:57 AM
How can we update (re-compile) a view when the underlaying table has been modified. In some views we are using SELECT table.* statements? TIA, Rene p.s. For people that don't know this problem: when a view is using a SELECT * statement and fields are added/removed from the table the vie...more >>

DTS: importing DATES
Posted by Frank Dulk at 8/11/2003 11:23:30 AM
Mr. I have a file TXT (separate with '; ') that need to matter for SQL SERVER using DTS. One of the fields of the table destiny is of the type SMALLDATETIME and it accepts null values. Only that DTS always imports him/it ' 1/1/1900 00:00:00 ' instead of NULL. What do need to do to correct ...more >>

transaction
Posted by Frank Dulk at 8/11/2003 11:21:46 AM
would like to know if I am using my transactions correctly, former: begin tran insert into... update... commit tran the problem is that the bank is joined while it doesn't liberate the transaction, any user it gets to use. This certain that? ...more >>

SQL Server 2000 question.
Posted by Alan Faulkner at 8/11/2003 10:51:06 AM
Is there functionality available that would judge the cost of a query before running and let the user know that what they are attempting to do will take a while? I have used execution plans before, but is there a way to return information that could be displayed to a user before the query...more >>

Setting Database Compatibility Level in SqlServer7
Posted by RKD at 8/11/2003 10:42:50 AM
Setting Database Compatibility Level in SqlServer7 ------------------------------------------------------------------------ When you right click a database in Enterprise Manager there is a TAB "Options" that gives u the option to set the Compatibility Level. How Would you set this in SQL7....more >>

Session Load Balancing
Posted by Mike Davies at 8/11/2003 10:42:42 AM
Is there any way to load balance a session in SQL Server so if that session is performing a CPU intensive task it would not take down the whole server. Thanks ...more >>

Any way to optimize sp_sproc_columns
Posted by Brett at 8/11/2003 10:38:04 AM
We just upgraded from SQL 6.5 to SQL 2000. We also have moved SQL Server to a much beefier machine. Actual data access in our database is much faster, but we've noticed that the speed of the application itself has slowed down some because sp_sproc_columns now seems to take quite a bit longer to...more >>

REPLACE w/ text field?
Posted by Chris at 8/11/2003 10:26:35 AM
I have a text column w/ a character (=E1) that I want to=20 delete. REPLACE(mytextfield, '=E1', '') does not work w/=20 text field? =20 Any ideas on how to deal w/ this?=20 Thanks in advance, Chris...more >>

clustered index
Posted by priya at 8/11/2003 10:07:19 AM
i've a table with clustered index. one of my queries took 2min 40 sec when i have only clustered index, but when i add one more non clustered index it's taking 9min. noticing this, i deleted non clustered index and teste again, it took only 2 min, why adding non clustered index taking 9 ...more >>

How can I get traspose using Select or DDLs...
Posted by Ricky at 8/11/2003 9:42:41 AM
I have a tag table: tagkey,tagname,description... etc. 12,'MetGB021WT','XYZ' 13,'MetGC021WT','X1Y1Z1' 14,'MetGD021WT','X2Y2Z2' ...... I have data table tagkey,datetime,value,quality 12,'2003-01-01 00:00:00',23,192 12,'2003-01-01 01:00:00',23.12,192 12,'2003-01-01 02:00:00',23,43,192 .....more >>

Converting Char to number.
Posted by Golfer at 8/11/2003 9:25:42 AM
How do I convert a Char(4) column to numbers. For instance, 1990 is stored as char. I want to convert to number and be able to increment it by 1. Thanks in advance....more >>

system-wide trigger for every table
Posted by Josh at 8/11/2003 9:11:50 AM
Is there any way (accessing a system table?) to create what would be an "on Delete" trigger for every table in the database? I would like the same SQL code to be performed whenever a user deletes a row from any of the tables in our databse. In addition, an indication of the table that wa...more >>

Setting multiple columns into one using a trigger
Posted by Cathy Beverly at 8/11/2003 9:01:58 AM
Hello, I am new to using SQL and have a question regarding triggers. What I am trying to do is when one field in database1 is update I want a trigger to go out to multiple databases and set a field in database1 equal to a combination of those fields. So far I have gotten it to work wit...more >>

Trigger for linked server
Posted by Cindy at 8/11/2003 8:37:46 AM
I created a linked server, I set linked server login as EXEC sp_addlinkedsrvlogin 'servername', false, NULL, NUll,Null ( I understand all users in host server should be able to access the linked server) I can run the select statement from the host server, but when the insert trigger is ...more >>

Record locking
Posted by hngo01 at 8/11/2003 7:37:59 AM
Hi, I am developing Client/Server application using VB 6.0 and SQL 2000. This application involves record locking. This means each user once open a record for add/update/delete, then other users can't access the same record. I was thinking doing this at application level with VB 6.0 and ...more >>

linked server and return more as first one result set
Posted by Rumata at 8/11/2003 7:16:25 AM
I use the linked server MS SQL with another MS SQL (2000). I need to use stored procedure on linked server, but in documentation says "Although the query may return multiple result sets, OPENQUERY returns only the first one" Can i another way to getting more as first one result without rewri...more >>

Using options in a view
Posted by Rob at 8/11/2003 5:27:57 AM
I'm trying to use the OPTION clause in a view which keeps returning a syntax error. If I run the sql code for the view by itself, it works fine but it almost seems that I am not being allowed to use OPTION in a view. Here's a scaled down version of what I am doing: SELECT f._obsD...more >>

help with view
Posted by Steve at 8/11/2003 4:58:01 AM
I have a table that contains meter reads (lets say for a water meter). Here's the (simplified) table and some data.... CREATE TABLE [dbo].[MeterReads] ( [MeterID] [int] NOT NULL , [MeterReadDate] [datetime] NOT NULL , [MeterReadingDialOne] [int] NOT NULL , [MeterReadingDialTwo] [in...more >>

triggering Backup
Posted by Anand at 8/11/2003 4:55:31 AM
Hello All, Is it possible to trigger a full database backup on certain activities. For example if I want to perform a full database backup(automatically) after anyone performs a SELECT INTO or BCP statements. Is it possible? My database is in Bulk_logged recovery model and I am ...more >>

MSDE & SQL Server
Posted by Kagsy at 8/11/2003 4:26:30 AM
Dear All I am currently creating an SQL database and eventually place it on the internet. I would like to test it, but I thought, since I am new to SQL Server, I would like to test my viwes and stored procedures in an Access 2000 project file. The question is: do I need to have an SQL d...more >>

SQL Joins
Posted by rytalon NO[at]SPAM hotmail.com at 8/11/2003 4:11:03 AM
-- ****************************************************************************** -- JOIN "treatise" -- by Roger Williams [07/29/2003] -- ****************************************************************************** -- -- Create test tables -- IF EXISTS (SELECT * FROM sysobjects WHERE name =...more >>

How do I create this view?
Posted by work NO[at]SPAM futrill.com at 8/11/2003 1:37:04 AM
I am not quite sure how explain what I am trying to do! So here goes … I have 2 tables T1 and T2. T1 has lots of fields that reference data from T2 via a reference code EG T1 F1 T2.F1 F2 T2.F1 F3 T2.F1 T2 F1 Reference co...more >>

Full Text Indexing Problem
Posted by Eric Levin at 8/11/2003 12:34:45 AM
I have a table using Full Text indexing on a column called Keywords: When I do a search on the database I am not getting results for certain searches: e.g.: Keywords field: 296924 : Electronica, Techno : Playful : Howly - 2.36 version. Upbeat trance techno beat with slight aerobics style...more >>


DevelopmentNow Blog