Groups | Blog | Home


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
August 2008


all groups > sql server programming > october 2004 > threads for friday october 1

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

getting error when compiling a c# .net routine on yukon -- 'Version 1.1 is not a compatible version.'
Posted by petercli at 10/1/2004 10:00:02 PM
i am running windows 2003 server, visual studio 2003, and beta 2 of yukon . I am getting the error when i try to compile the assembly -see below. What am i doing wrong? Thanks,Peter C:\projects\yukon test 1>csc.exe /t:library /r:"C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Bin...more >>

Output File
Posted by Jessy at 10/1/2004 8:44:50 PM
How can I output the contents/result from a stored procedure to a text file ? Thx....more >>

Thousand Separator
Posted by Billy at 10/1/2004 7:54:24 PM
Dear All, How can I format the sum of a numeric figure with thousand separator? i.e. if the sql return 1000 --> display as 1,000 Pls. advise...more >>

Hash Indexes ?
Posted by Drew at 10/1/2004 7:00:36 PM
What are Has Indexes and how is it different from Clustered and Non clustered Indexes? Thanks ...more >>

modify user account for dts connections
Posted by JJ Wang at 10/1/2004 5:36:29 PM
hi, another question about sql server 2000 dts. before we drop an employee's account, we would want to make sure that his accounts won't be used in any dts package connections on all of our sql servers. is there an automated way (by code) that I can change this employee's account into...more >>

Concatenation
Posted by Microsoft at 10/1/2004 5:05:51 PM
Hello, I have the following procedure. When I run this procedure and insert into the database the new record the @alldesigns field is always blank. Is there a limitation on concatenating variables: the line in question is set @alldesigns=@alldesigns + ',' + @designnote I hope this isn'...more >>

sums and multiple tables
Posted by a NO[at]SPAM b.com at 10/1/2004 4:43:39 PM
i need to sum a column in a table, which is joined to another table. It works fine, but I also need to get sums from a 3rd table which is joined, and when I try and do this, the sum from the other table gets screwed. i.e. tables and values a-> theID, locationName b-> theID, chickens c-...more >>

SQL/VS2005 - data-driven application for business trippers
Posted by monty at 10/1/2004 4:20:37 PM
Hello, In our office we have one server and several laptops connected to our network. The application I'm writing will run on the laptops, and connect to the server for database access (currently running SQL Express 2005 for development purposes); the application both reads from and mak...more >>



Linked Server for Progress 9
Posted by bhc at 10/1/2004 4:15:19 PM
I have the proper Data Source Connection and driver on my Windows 2003 server for accessing a Progress 9 database. I am able to use a connection string with Reporting Services to query that Progress Database without any problems. However, when I try to create a linked server for that Progres...more >>

if exists queries
Posted by culam at 10/1/2004 3:15:02 PM
I am trying to do a query that use the value of the first table if it does not fit a criteria on the second table. If it fit the criteria ('coff') then use the value on the second table. Select if tableB.c = 'coff' then tableB.amount Else tableA.amount from tableA join tableB on a=b ...more >>

Indexs
Posted by Paul Swanson at 10/1/2004 1:46:06 PM
I'm tring to do a query of the Sysobjects table to get index information. I've be able to construct a query for the table and column information, but I can't find the appropriate data for the indexes. I'm looking for Index name and index text or index fields. Here's what I did for table and ...more >>

programming question
Posted by raybouk at 10/1/2004 1:39:02 PM
How do I produce the following results from the following table? -- Desired results: clm_id type amt 0001 A 100 0001 B 200 0001 C 300 0001 D 400 -- Existing table & data CREATE TABLE [dbo].[tst_crh] ( [clm_id] [int] NULL , [type1] [nvarchar] (255) NULL , [amt1] [money] NULL , ...more >>

Need suggestions on improving SQL Server disk space usage
Posted by Raghu Raman at 10/1/2004 1:13:05 PM
As part of upgrading our system to newer version, We have to update multiple tables which could potentially have several million records each (schema + data updates) and this is causing serious performance problems, sometimes even running out of disk space. The database size seems to grow beyo...more >>

Summary in loop
Posted by Adam at 10/1/2004 12:35:37 PM
Hi, I have a table with 3 columns: MatNr, Quantity, and Operation Date in quantity could be value (+) or (-). Table is sorted by 1. MatNr 2. Operation Date I am looking for solution to summaries quantity grouping by MatNr till SUM(quantity) is bellow zero. and then break loop and go to...more >>

Global Address, Phone Number, SSN[ID], etc.
Posted by Kamaluokeakua at 10/1/2004 12:29:06 PM
I have to write an application that deals with clients in multiple countries. The addresses, phone numbers, country id[social security number] and currency information has to be stored into a database. Is there any white paper, or book or site that has information on designing a database t...more >>

Variable
Posted by Justin Drennan at 10/1/2004 12:00:59 PM
How would I use a variable to select a time period as shown below. The example below returns error: Incorrect syntax near '@Timeperiod' Am i missing something here? Declare @Timeperiod as int set @Timeperiod = 7 Select * from X where (datediff(d, usdateopened, getdate() @Timeperiod)...more >>

division operator
Posted by Peter at 10/1/2004 11:42:54 AM
I am not able to cature digits past 6 deep after the decimal point when I use division... Any ideas?...more >>

Database Desing
Posted by Trek Fan at 10/1/2004 11:41:09 AM
Hi there, I would like to see if anybody can recommend me a good paper related to designing data security, meaning for example, a generic scheme that can be used to determine what data can users see (for example, witch states they can see, what employee info they can see and so on...more >>

Calling Functions Inside an Stored Proc
Posted by darkstar_E2 at 10/1/2004 11:32:04 AM
Hello every One, Can anybody teach me how to call a function inside a stored procedure.. I want to know it badly... thanks... ...more >>

Date Format
Posted by Jaimee Catcher at 10/1/2004 11:16:28 AM
How can I format the date to view it without the preceeding zeros? For example - I want to see 10/07/2004 as 10/7/2004. The purpose of this is that - I am using ASP script on my web page and the 'date' function returns the date as 1/1/2004 vs SQL where I get 01/01/2004 when I use the c...more >>

Trigger or Stored Procedure
Posted by Ian at 10/1/2004 11:01:00 AM
Hi all I was hoping you would know the answer to this question. I am trying to decide if I should change my triggers to a Stored procedure. The application is used by 5 to 10 people at once. No 2 people can have the same record set open for editing at the same time. I have restricted it b...more >>

transfer rows from table (without unique index) to duplicate table (with unique-index)
Posted by John A Grandy at 10/1/2004 10:59:36 AM
wxp pro sp1 , sql-svr-2k sp3 Table1 has PK column "RecordID" (Identity=Yes, IdentitySeed=1, IdentityIncrement=1) Table1 also has the non-nullable column "LicenseNumber". Table1 doese not have a unique index or constraint on the "LicenseNumber" column. Table1 contains groups of rows t...more >>

Is there a way to use string arrays with SQL Ole Automation?
Posted by Chris Lande at 10/1/2004 10:57:01 AM
I need to call a COM object method using sp_OAMethod that expects a string array as one of it's parameters. Is there a way to represent a string array in SQL? Thanks, Chris...more >>

SQL 2005 Question - Right Group?
Posted by Craig Scheets at 10/1/2004 10:55:42 AM
I couldn't find a group dedicated to SQL 2005, so I'll ask here and please redirect me if it's more appropriate somewhere else. I'm not a pro DBA and don't always remember all the syntax to create views, joins, relationships, constraints, etc. That said, I'm very accustomed to enterprise m...more >>

Server: Msg 128, Level 15, State 1, Line 1
Posted by Lianne at 10/1/2004 10:29:37 AM
I got this error message: The name 'CODE_CA' is not permitted in this context. Only constants, expressions, or variables allowed here. Column names are not permitted. after running the following code in Query Analyzer: begin of code: declare @fname varchar(200) declare @str_movefil...more >>

Just want to verify performance on query
Posted by Chris at 10/1/2004 10:23:01 AM
Hi, I have the foll query in a stored procedure SET @sql = N'SELECT archive.quantity FROM customer,archive,iss WHERE customer.bill = "5000" AND archive.number = 002 AND archive.deliv = NO AND iss.number = archive.number AND iss-...more >>

SQL for SP
Posted by Vlad at 10/1/2004 10:17:21 AM
I have SP in SQL Server: CREATE PROCEDURE Admin_BuySellCompanyInsertUpdate @CompanyName varchar(50) @Address1 varchar(50), @NewBuySellCompanyID int output AS INSERT INTO dbo.CompanyData (CompanyName, Address1) VALUES (@CompanyName, @Address1) SELECT @NewBuySellCompanyID = SCOPE_IDE...more >>

osql...
Posted by Matrix at 10/1/2004 10:04:49 AM
Is there any difference beetween importing stored procedures with osql and isql???? Is it possible that some stored procedures works differently if it's imported with osql or isql???? TIA. ...more >>

Incorrect division problem in SQL query
Posted by Trieu Anh Dung at 10/1/2004 9:45:00 AM
Hi all, I'm using SQL Server 2000 running on Win2K Adv Server, my query is: SELECT Amount, TaxAmount, 'TaxRate' = TaxAmount/Amount FROM Orders After execute I've got this result Amount TaxAmount TaxRate 8,800,000.000 800000.0000 .0909 5...more >>

Select First of each group
Posted by Michael Tissington at 10/1/2004 9:14:03 AM
The schema is a little complicate so I have not included it but hope you can understand what I'm getting at here .... I have something like SELECT ContactID, Group1, Value1, ... with several JOINS Each Contact can be in multiple groups. The SELECT returns all the Contacts and the groups ...more >>

Receiving emails with SQL-Server?
Posted by owen at 10/1/2004 9:01:22 AM
I would like to have people email a certain address, and have SQL Server "suck in" those emails into certain tables on the database. Is this even possible? Thanks Owen PS. replies cc'd via email appreciated owen.southwood@mantix.com ...more >>

Is there a finction avail for
Posted by Chris at 10/1/2004 7:59:02 AM
Hi, Is there a function available to calc the average, excluding the highest and lowest number, but not duplicate of the same? TABLE1 5 1 2 1 4 So 5 will be excluded since it's the highest and 1 since it's the lowest but not the second 1. Result should be 1 + 2 + 4 = 7/3. Thanks ...more >>

date time (today)
Posted by Sherpa at 10/1/2004 7:51:51 AM
what's the best way to select return a record set of all rows that have been entered since midnight. I'd like to be able to run the query any time, and get all records for today since midnight. CREATE TABLE [dbo].[Table1] ( [c1] [name] (10) NULL , [d1] [datetime] NOT NULL , [c2] [char] (1...more >>

Import from Excel into SQL Database
Posted by Lontae Jones at 10/1/2004 7:51:02 AM
I have a DTS package that needs to insert the excel data into this table. [AgentLocatordata] ( [ID] [int] NULL , [Agent] [varchar] (10) NOT NULL , [ShortName] [varchar] (6) NULL , [BusinessType] [varchar] (6) NULL , [DisplayName] [varchar] (100) NULL , [BusinessName] [varchar] (100) N...more >>

Assign variable in Case statement
Posted by Ron Sissons at 10/1/2004 7:48:44 AM
HI,=20 I have a SQL string I would like to assign a string to based on certain = conditions. I use a CASE statement but keep getting an error. For example: declare @strSQL varchar(30), @value varchar(30) select @value =3D 'Blah' Select Case=20 when @value =3D 'blah' then @strSQL...more >>

INSTEAD OF TRIGGER ISSUE
Posted by x-rays at 10/1/2004 7:24:46 AM
Hello Experts, I created an INSTEAD OF trigger which doing some checks: CREATE TRIGGER [T_mytable] ON [dbo].[mytable] INSTEAD OF INSERT, UPDATE, DELETE AS If 'bla' <> 'bla' begin RAISERROR('no action allowed.', 16, 1) Rollback Tran end when Insert a record into mytable, even th...more >>

AutoNumber field
Posted by rodchar at 10/1/2004 7:03:05 AM
Hey all, I was wondering, is there an easy way to reset an autonumber field back to 1? thanks in advance, rodchar...more >>

Triggers & Job Scheduling
Posted by jmeyers at 10/1/2004 6:59:04 AM
I've got a SQL Server job created that I want to set/change the scheduled time for via a table trigger. I'm wondering how to do that. Specifically, I've put a trigger on a table so I know when records have been inserted. Once that happens (meaning records are in the table), I want the tri...more >>

populating a table with data
Posted by Joe at 10/1/2004 6:59:02 AM
I don't know if this is the right group. If not, please redirect me. I tried the DTS group and received no answers to this post. I know how to create tables (CREATE TABLE ...). What I would like to know is if I know what values need to populate the various fields in a table, is there a ...more >>

@@CPU_
Posted by Earl at 10/1/2004 6:29:01 AM
Getting an arithmetic overflow error and I don't know why... Here are some details: SELECT @@cpu_busy successfully returns 134217727 SELECT convert(int,@@cpu_busy) successfully returns: 134217727 declare @cpu_busy int SELECT @cpu_busy = convert(int,@@cpu_busy) returns error: Arith...more >>

raiserror
Posted by Mike P at 10/1/2004 5:51:19 AM
I want to raise an error in my stored procedure and then have the code go to a specific part of the sproc to deal with errors before exiting. Is this the right way to go about doing this? e.g. if (condition) begin rollback tran raiserror goto on_error end --other stuff ...more >>

Disabling triggers
Posted by Phil Davy at 10/1/2004 4:27:22 AM
Does anyone know if there is/are a T-SQL command(s) to temporarily disable a trigger? (a bit like SET ANSI NULLS OFF/ON) ? All I can think of doing is editing the existing trigger with a "return" statement at the start. Or I could drop it, however then I will need to recreate it. S...more >>

update order of update statement (actual problem: accumulating sum)
Posted by ulf.lagerstedt NO[at]SPAM gmail.com at 10/1/2004 4:20:37 AM
While looking for efficient ways to compute a column with accumulated sum I saw a construction like this declare @tmp decimal set @tmp = 0 update table set @tmp = acc_sum = @tmp + value This method was indeed faster than any other I could come up with. However, it depends on the order in...more >>

DBCC CHECKDB Scheduled Task
Posted by DBCC CHECKDB Scheduled Task at 10/1/2004 2:37:32 AM
Dear All, I am performing a EXEC sp_MSforeachdb @command1="print '?' DBCC CHECKDB ('?')" on my server each night, and was wondering how to send the results to myself. TIA...more >>

Memory leakage
Posted by Giovanni at 10/1/2004 1:49:13 AM
When i use in vb6 SqlServer 2000 connection all doing well. Then when i use MMC and terminate it, memory usage (using taskmanager) riseup automatically. Why ? I use WinXp Sp2, but this happens on every clients/server i try to use mmc. Why ? Does exist a way to programmatically stop memory us...more >>

dynamic statement
Posted by tarek at 10/1/2004 12:55:02 AM
HOW CAN I EXECUTE THIS ORACLE STATEMENT : EXECUTE IMMEDIATE ' SELECT FIELD NAME FROM TABLENAME WHERE CNDTN'INTO VARIABLE_NAME INTO SQL SERVER THROUGH SP_EXECUTESQL PROCEDURE ...more >>

access and excel pivot tables
Posted by marina madeleine at 10/1/2004 12:51:05 AM
If I have a number of datasets in Access, is it possible to pull the three datasets together and hook them up to an excel pivot table for analysis? How could this be done if possible? Is there an equivalent or better feature alternative to pivot tables in SQL? Can this be done without pre-co...more >>


DevelopmentNow Blog