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 > november 2004 > threads for sunday november 21

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

Old Dates!
Posted by Leila at 11/21/2004 11:17:10 PM
Hi, I need to store information and articles with the date before 1700. It seems that this is not supported in SQL Server, what should I do? Thanks, Leila ...more >>


Indexed View
Posted by Leila at 11/21/2004 11:14:16 PM
Hi, I have a database with structure similar to Northwind. When the users place orders, the customerid and employeeid are optional. Therefore when I want to create reports of sales, I use outer join like this: select c.companyname, o.orderdate, o.shipcountry, e.lastname from orders o left jo...more >>

MSDE to Access?
Posted by TheNortonZ at 11/21/2004 11:09:38 PM
We have an application (client server, single user, all installed on the users machine) and we use MSDE 2000. One major complaint we have had is that if people download the product from the web, it is such a large download (70mb) just for the desktop engine. Our marketing department is now...more >>

Insert Stored Procedure where the table is provided as input argument
Posted by Sarutobi_Sama at 11/21/2004 8:31:47 PM
Hello, I am trying to write a SP that will do some simple Inserting into a table that is not known until run-time. I am aware that I could do it through string concentation and build the query in the Sp, but since i am trying to avoid building dynamic Sql queries in the beginning with. T...more >>

Remove duplicate data within every month
Posted by ausgoodman NO[at]SPAM hotmail.com at 11/21/2004 8:14:21 PM
Hi All SQL Server 2000 Query Gurus, I searched lots of articles but can't find a solution to solve my problem: I need to pick up only one row for each MONTH from the following database table ID Company Product Platform Num1 Num2 RunDate 1 Mic P1 ...more >>

Change returned data in a view based on security role?
Posted by Dooler at 11/21/2004 7:59:12 PM
I have a table for storing data (credit card info) and have two roles: nonAccounting and Accounting. What I would like to do is create a single view that everyone uses, but the data returned changes based on role person is in. IE: Accounting would see 1234-4567-9012-3456, but nonAccounting ...more >>

programmatically check if column has Identity property set
Posted by Mark at 11/21/2004 5:04:35 PM
Is there a way to programmatically check if a column has the Identity property set? I'd love to be able to use information_schema views or similar, but I don't see the information there. (select * from syscolumns where id = 1355151873) doesn't seem to have it either. sp_help 'table_name' all...more >>

using case in where clause**
Posted by maryam rezvani at 11/21/2004 3:38:24 PM
Hi I need a good select statement to select the special record when status is 1 and to select all records when status is 0: declare @status as numeric(1),@code as numeric(8) set @status=1 select * from employee where code like case @status when 1 then @code when 0 then '*' end it work...more >>



Run Multiple Stored Procedures in order with a script??
Posted by Tom at 11/21/2004 3:32:16 PM
Hello. I have to run many sql scripts each day. Sometimes I'll have 100+ scripts to run. The scripts always come in a folder numbered in the order they need to be run (001 - ScriptA, 002 - ScriptB, etc.). I've been running them all manaully one by one so that I can look for errors in the re...more >>

problem with sub-entities
Posted by Srdjan Mijatov at 11/21/2004 3:11:42 PM
Here is what I have right now: CREATE TABLE Analitics( analitic_type CHAR(3) NOT NULL CHECK (analitic_type IN ('CST', 'WRK', 'BNK')), analitic_id CHAR(6) NOT NULL, analitic_name VARCHAR(30), PRIMARY KEY (analitic_type, analitic_id)); CREATE TABLE Customers( analitic_type CHAR(3...more >>

trigger problem
Posted by shank at 11/21/2004 3:10:37 PM
What's wrong with the below trigger? Syntax checks OK. The query runs in QA. Yet I get the following error. The table ItemPrice is there obviously. thanks! ------------------------------------ Could not execute query; could not find linked table Invalid object name 'ItemPrice'. (#208) -------...more >>

Foreign Keys
Posted by Darshan Mehta at 11/21/2004 3:09:04 PM
Hi, im new to SQL 2000. I need to create a foreign key between the Category and Item tables. I was told you can achieve this through Query analyzer. Can someone please help me with the code I need to write? I have to relate the 2 tables by ID in Category table and CategoryID in Item tab...more >>

create column on view based on conditions
Posted by anonym0 NO[at]SPAM gmail.com at 11/21/2004 2:36:53 PM
Hi, I have the following table id address_id --- ------- <int value> I want to create a view that will have a new column which will be set to 1 if address_id >100, or 0 otherwise. so the new view will have something like id address_id value --- ---------- ----- 1 50 ...more >>

Stored Procedure Timing Out
Posted by Jon Spivey at 11/21/2004 2:30:12 PM
Hi, SQL Server 2000/Win2003/IIS6/VB.net I have this stored procedure CREATE procedure spTodaysBest as SELECT T.ISBN,T.Title,T.BookPrice,R.Price,T.bookprice - R.price as saving,R.PercentSaving,t.imageurl FROM Titles T INNER JOIN ( SELECT R3.ISBN, R3.PercentSaving, ( ...more >>

How use with temp #Table in Storage Proc (Sql 2000), with no worry
Posted by mttc at 11/21/2004 1:51:50 PM
I looking for Temp table in Stored Proc. With no worry about what happen When this proc called twice on same session, and what happen if two users run it in the same time. The ##temp table can’t be used on multiusers environment. Because it have same name for all users. the #temp table, use...more >>

Complex Query Column To rows
Posted by Aneesh at 11/21/2004 1:33:32 PM
Hi, I have a table of the following Structure SectionID SectionName DisID DisName MedID ----------- -------------------------------- ----------- ----------- ------- ----- 8 Others 1 Ans 1 8 Others ...more >>

XML truncated
Posted by Leila at 11/21/2004 12:45:50 PM
Hi, I need to save result of FOR XML to a file in QA. When I choose "Results to file.." it saves but truncates the output. How can I save whole of that? Thanks in advance, Leila ...more >>

Access Project with SQL Server-passing parameters to action stored procedures using ADO
Posted by zlatko at 11/21/2004 11:56:13 AM
There is a form in an Access Project (.adp, Access front end with SQL Server) for entering data into a table for temporary storing. Then, by clicking a botton, several action stored procedures (update, append) should be activated in order to transfer data to other tables. I tried to avoid any ...more >>

Type Mismatch error when using sp_oamethod to call a method of a COM object
Posted by miltvp NO[at]SPAM best.com at 11/21/2004 11:40:38 AM
Hi, I have been trying, unsuccessfully to call a method of a com object from a stored procedure using sp_oamethod. I am using MS SQL Server 2000 Developer Edition with SP3a applied on Windows XP Professional with SP2 applied. The problem I am having is that one of my sp_oamethod calls alway...more >>

BugCheck Dump
Posted by thejamie at 11/21/2004 9:23:01 AM
SQL SERVER [MSDE] which has installed many times without fail did not install properly on my current system. XP SP2 (pro) - .NET 2003 Studio - IISLockdown? may have had something to do with this - Symptoms include SQLMgr.exe says the specified service does not exist or is not specified as a...more >>

Query timeout
Posted by Dick Swager at 11/21/2004 9:21:12 AM
I have a query that takes a little more than a minute to complete. When I call it from within a C# program it times out. I have set the Query Timeout to 0 using Enterprise Manager on the Connections tab of the Server prorety sheet. And I have executed the code sp_configure 'remote query ...more >>

JOIN on multiple conditions
Posted by Gunnar Liknes at 11/21/2004 1:14:27 AM
Hi, I have a problem constructing a sql procedure... I have a join between two tables. Then I want to join with a third table if one of two conditions are true: Either: a field (lets call it 'a') in table 3 (T3) matches a field ('b') in table 2 (T2) or: an other field ('c') in table 3 mat...more >>


DevelopmentNow Blog