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 2005 > threads for thursday 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

Database problem
Posted by Pradeep at 6/16/2005 11:20:20 PM
Hi i want to build a table. The situation is as follows : There are 7 customers which send in their nominations. Also they keep sending their revised nominations. I need to track the nominations, revised nominations, revised dates of each customer. What i hav thought is following columns Cust...more >>


Job Success or Failure Notification in Windows Appln Log file
Posted by Sevugan at 6/16/2005 11:00:19 PM
Hi, In Job Scheduling dialogue box, under notifications tab there is an option called "Write to windows application log file". Where do I find this file? I would like to know the physical path of the file. Regards, Sevugan.C...more >>

xp_StartMail - SqlDumpExceptionHandler - Exception Error
Posted by Sevugan at 6/16/2005 10:57:26 PM
Hi, As soon as the mail session is started I am getting the following error message. Why Am I getting this? How should I resolve this? Help me in this regard at the earliest. SqlDumpExceptionHandler: Process 52 generated fatal exception c0000005 EXCEPTION_ACCESS_VIOLATION. SQL Server is...more >>

Max Parameters
Posted by Renjith at 6/16/2005 9:20:04 PM
Hi any idea how much parameters stored procedure supports. renjith...more >>

Disabling Trigers
Posted by Renjith at 6/16/2005 9:08:26 PM
Hi Is there any way to disable a trigger from running (trigger is not dropped). i just dont want the trigger not to be executed for a temporary purpose(but must be in database) renjith...more >>

TRIGGERS that Update Spatial Files
Posted by deStress at 6/16/2005 8:59:32 PM
I have been trying to implement the following: 1. A user updates a table ... 2. A trigger fires on the event that ... 3. Run a shell command DTS pointing to a batch file [d:\test.bat]. 4. The batch file executes: @echo off dir >> d:\test.txt It will execute .MBX file(s) associated to an...more >>

who is moderator of this forum ?
Posted by John Grandy at 6/16/2005 7:43:53 PM
Could the moderator please move all my posts regarding replication to the replication forum ? Thanks. ...more >>

t-sql to disable replication for a db
Posted by John Grandy at 6/16/2005 7:25:25 PM
when I run exec sp_dropdistpublisher @publisher = 'server1' i get the error Cannot drop server 'MACHINE1' as Distribution Publisher because there are databases enabled for replication on that server. what is the system sp to disable replication for a db ? ...more >>



maximum number of tables in query (256) was exceeded
Posted by Liangyew at 6/16/2005 6:49:03 PM
Hi, I have an union join statement and sql give me the message : Server: Msg 4414, Level 16, State 1, Line 1 Could not allocate ancillary table for view or function resolution. The maximum number of tables in a query (256) was exceeded. When I count the table anf found only 78 table. I usi...more >>

Conversion from string to datetime
Posted by lily at 6/16/2005 6:22:02 PM
Can I know how to convert a string of such format "31/05/2005 12:30PM" to date time in order to store in database. I have used this select cast(convert(char(19),LOGIN_DATE,103) as datetime) but it display index of out range.The purpose i want to store it in this format is because later i wil...more >>

DTS Help Urgent.
Posted by XXX at 6/16/2005 5:08:15 PM
I posted this in DTS group but did not receive any solution that I can use. So reposting I have to move data from 2000 tables from one Server to another (total 10 million records). The Servers are physically in different locations. Is there an easy way to create a DTS package to do the same? ...more >>

Recursive Trigger
Posted by Moh at 6/16/2005 4:49:03 PM
Hi All, I need help in setting recursive trigger option on for several triggers... Can you please help me.. If i set with sp_dboption it is for the entire database; i don't need that.. Thanks Moh...more >>

Recursive Trigger
Posted by Moh at 6/16/2005 4:19:04 PM
Hi, Is there a way i can set recursive trigger on for only a set of triggers or do i need to give on database level. Thanks Mohamadi....more >>

get hours
Posted by js at 6/16/2005 3:53:37 PM
hi, how to conver the time to: dddhh -> Mon01 - Tue23? Thanks. ...more >>

using outer join instead of sub select
Posted by TS at 6/16/2005 3:48:42 PM
i saw that if sub select contains aggregate, you should use outer join. I have to do a subselect because i only want the max(date) from one of my joined tables instead of all that meet the inner join criteria, but i don't see how to do it. Is there an example you can give me or a website to go l...more >>

Expression Evaluation
Posted by Sam Davis at 6/16/2005 3:34:06 PM
Does anyone know of a product or way in which we can submit a dynamically created expression and determine if it is TRUE OR FALSE? We allow our users to activate certain expressions such as balance > 10000 and x < 3. We need to be able to dynamically evaluate the expression as true or false fr...more >>

dynamic expression evaluation.
Posted by Sam Davis at 6/16/2005 3:14:06 PM
We need to be able to dynamically take an expression such as 1 AND 1 AND 0 and have it evaluated. Anyone know of a way to do that without using an extended stored procedure. Needs to be a user defined function so that we can make it part of a select statement. thanks....more >>

Failed in create function
Posted by engine_li at 6/16/2005 3:06:02 PM
Dear all, I got a problem when try to create user function. Can anybody help me? Below is my statement: CREATE FUNCTION test (@par1 int) returns int as begin declare @par1 int return @par1 end And got the following error: Server: Msg 170, Level 15, State 1, Line 2 Line 2: Inco...more >>

Trigger question
Posted by jaylou at 6/16/2005 3:04:04 PM
Hi all, I have created a trigger to insert a row into an Audit tables for specific users. when they update, insert or delete from tables in the DB. 2 questions: 1) can I capture what the user was doing? (insert,delete,update) 2) if Update can I capture the field(s) updated? TIA, Joe...more >>

XML is wrapping
Posted by mvp at 6/16/2005 2:50:04 PM
Hello Everybody, I have query which is generating XML using for xml explicit. It is as following SELECT 1 as tag,null as parent, Id as [ROW!1!Num], FILENAME as [ROW!1!FileName!element], TransactionFlag as [ROW!1!TransactionFlag!element], Hours as [ROW!1!Hours!element], ProjectID as [ROW...more >>

Include/Exclude Query
Posted by John Smith at 6/16/2005 2:49:08 PM
Hello all: I am not sure if this is the place to get help formulating querys but here it goes. We need a way to get a total sum of a certain field for many rows but to not display some that belong to a specific category. For instance, lets say the category is "Stuff", and another category ...more >>

Update database
Posted by simon at 6/16/2005 2:40:43 PM
I have table on user interface. User can change different values on that table on each row. When clicks submit button I pass values for each row to stored procedure to create update on database. If table has 100 rows that means 100 calls to stored procedure and 100 updates. Is it pos...more >>

Unused Stored Procedures - Wasteful?
Posted by JM at 6/16/2005 2:23:20 PM
When making stored procedure changes, we always copy the existing stored procedure (change 'alter' to 'create', and append '_old_mmddyyyy' to the proc name. Well, the 'old' procedures outnumber the production stored procedures 3 to 1. I argue that these are still compiled, and consume system ...more >>

NULL
Posted by jduran at 6/16/2005 2:18:01 PM
How do you re-insert the NULL statement into a blank field?...more >>

NULL
Posted by jduran at 6/16/2005 2:13:03 PM
How can you re-set the value in a field to NULL?...more >>

Need help with CASE
Posted by Terri at 6/16/2005 1:36:25 PM
I think CASE is what I need. Given 2 columns in a table, col1 and col2. In my data set there can be 3 cases: col1 and col2 are both not null col1 is null and col2 is not null col1 is not null and col2 is null Pseudo code to follow SELECT if col1 and col2 are not null then return col1...more >>

TOP x per group
Posted by Rene at 6/16/2005 1:26:31 PM
Hi, We are using SQL 2000 and grouping sales per group. We want the top n products of each group. We have the query working where we join the sales table on itself. The performance is not too good, we have better performance when query all sales grouped (no second join on sales) and fetchin...more >>

Can a stored procedure or function call itself?
Posted by Andrew at 6/16/2005 1:13:07 PM
Hello, friend, In a function, I need it to call itself a few times. However, it seems that it is not supproted: When I created it, it said the function did not exist since this function was really not there yet. But, I do need this function to repeatedly verify certain values based on th...more >>

OpenRowSet Error 7353
Posted by Andy Metcalfe at 6/16/2005 1:01:01 PM
When running the following query: SELECT ID_i FROM OPENROWSET('SQLOLEDB','PARS100585';'abcp_admin';'Anna',abcp.dbo.Transactions) I get the error: Server: Msg 7353, Level 16, State 1, Line 1 OLE DB provider 'SQLOLEDB' supplied inconsistent metadata. An extra column was supplied during exe...more >>

Memory Issues when using XML
Posted by TomPearson at 6/16/2005 1:00:08 PM
I have an instance of SQL Server 2000 (SP4) running on Win 2K. On it I have a task that runs to decompose xml into tables using sp_prepare/sp_remove xml doc procedures and openxml. When the server is booted, or sql server and sql server agent processes restarted, it sits happily using abou...more >>

Capturing events
Posted by jaylou at 6/16/2005 12:26:02 PM
Hi All, I have created a trigger to insert a row into an audit table based on username. Is there a way to capture what the user was doing? (insert,update,delete) Also is there a way to capture what column was updated for an update? This way I can load my audit table with username,event,en...more >>

aggregate concatenation
Posted by Keith G Hicks at 6/16/2005 11:42:42 AM
Boy it sure would be nice if CONCATENATE were in the list of aggregate functions! I know how to do this manually but it seems that it has to be done often enough that it would be good to have. I know it could be a little nuts if the column to be concatenated had a lot of characters in each row ...more >>

Q: NB Insert, with condition.
Posted by Visual Systems AB (Martin Arvidsson) at 6/16/2005 10:58:49 AM
Hi! I want to insert records in a table when a special condition is met. The tables are Order and Project in the Order table, there is a field called proj as well in the Project. What i want to do is, if the Order.Proj does not exist in the Project database, i want to insert a new reco...more >>

aggregate functions in SQL statements
Posted by Chris Strug at 6/16/2005 10:58:18 AM
Hi, Probably a very simple question but... I have a table which contains customer transactions. What I'm after is a SQL statement which will give me a count of transactions for the top four customers with everyone else grouped into "Other". The thing is, I'm not completely sure how to a...more >>

Windows Appln Log File - Job Scheduling Notifications
Posted by Sevugan at 6/16/2005 10:47:01 AM
Hi, Under the Notifications tab of the job scheduling window, there is an option to update the status of the job scheduled. i.e., Write to windows application log file. Where do I find this file? I would like to know the physical path of the same? Regards, Sevugan.C...more >>

ADO Recorset closed executing stored procedure WITH NOCOUNT ON
Posted by Enrico Campidoglio at 6/16/2005 10:31:02 AM
Hi I have a fairly common problem when calling a stored procedure from ADO using the OLEDB Provider for SQLServer. I read all the post I could find about the problems and all of them found a solution in including the SET NOCOUNT ON directive at the beginning of the procedure. I did that...more >>

Datetime conversion
Posted by lily at 6/16/2005 10:07:02 AM
Can anyone show me how to convert date time to "dd/mm/yyyy hh:mmAM"...more >>

Data and Time format
Posted by 1_Lee at 6/16/2005 9:56:04 AM
Dear all, I would like to ask is there any way to write a SQL statement that display date and time such as "31/05/2005 1:30PM".All i had tried including the sample in the SQL online help, it seem that any of the code support this format. Thanx....more >>

Newbe in transactions (insert from select)
Posted by Andrzej Jakubowski at 6/16/2005 9:50:02 AM
Hello, I have got an sql: DECLARE @error int BEGIN TRAN INSERT INTO reports (a, b, c, d) SELECT dr.a, dr.b, ru.c, ru.d FROM dailyreport as dr LEFT JOIN reportunit as ru ON dr.id_dailyreport = ru.id_dailyreport WHERE state>=1 SELECT @error = @@error IF @error = 0 B...more >>

Newbe in transactions (insert with select)
Posted by Andrzej Jakubowski at 6/16/2005 9:37:13 AM
Hello, I have got an sql: DECLARE @error int BEGIN TRAN INSERT INTO reports (a, b, c, d) SELECT a, b, c, d FROM dailyreport as dr LEFT JOIN reportunit as ru ON dr.id_reportunit=ru.id_dailyreport WHERE state>=1 SELECT @error=@@error IF @@error=0 THEN BEGI...more >>

mult lingual sql server
Posted by Mahesh at 6/16/2005 8:32:04 AM
I want to test the multi lingual feature of SQL Server.. I have a database whith the default collation 'SQL_Latin_General_CP1_AS I have created a table CREATE TABLE [dbo].[emp] ( [eno] [int] IDENTITY (1, 1) NOT NULL , [ename] [nvarchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL ) ON ...more >>

simple stored procedure performance question
Posted by jason at 6/16/2005 6:38:04 AM
given the two following tables: CREATE TABLE things (thingid int, owner int, description varchar(50)) CREATE TABLE people (personid int, name varchar(50), admin bit) my plan is to implement a sort of security based on authority, the rules for which will exist in stored procedures such as the...more >>

Exporting Data
Posted by hals_left at 6/16/2005 3:31:46 AM
What is the best way to quickly export all the data from a SQL2K database to an empty SQL database of exact same strucure on another network. I cannot connect the two servers in Enterprise Manager because SQL ports are closed between the two networks but I can get a remote desktop (VPN) conne...more >>

Any ideas how to shorten this TSQL
Posted by Anubis at 6/16/2005 12:00:00 AM
Hello, I just wanted to see if anyone had any ideas on how I could shorten this TSQL script. If possible, I would like to increase the 'day' range from -3 / 3 to -7 / 7 but this would extend the TSQL even longer. Any ideas would be welcome! Thanks! Anubis. SELECT ItemMaster.S...more >>

How to use SQL Server forced clustered indexes uniqueness?
Posted by Nikola Milic at 6/16/2005 12:00:00 AM
Hi, In "Inside SQL Server" by Kalen Delaney she says: "In SQL Server 7, all clustered indexes are unique. If a clustered index is built without specifying the unique keyword, SQL Server will force uniqueness by adding a uniqueifier to the rows when necessary. This uniqueifier is a 4-byte v...more >>

The best way to move and delete data in one go?
Posted by Kim Noer at 6/16/2005 12:00:00 AM
Hi there ... I have two identical tables. When the need arise, I would like to move data from tbl1 to tbl2, and delete the just moved data from tbl1. What is the best way to do this? I can figure this out by using INSERT and then a DELETE, but is there a more clever way to do this? -- ...more >>

VPN stuff
Posted by Vince at 6/16/2005 12:00:00 AM
We have a SQL Server at our main centre which is around 10 Kms from another sub centre. The sub centre connects to the SQL server at the main centre using VPN. The students then use a computer at the sub centre in order to view their scheduled classes, give their attendance and so forth. T...more >>

hhhhelp, restore
Posted by Carlo at 6/16/2005 12:00:00 AM
ho fatto un update che non dovevo senza fare backup prima come posso ripescare i dati??? gia committato ovviamente carlo ...more >>

How to control SQL Server 2000 login and logout Method / Event.
Posted by SOHO at 6/16/2005 12:00:00 AM
-- Thanks ! ...more >>


DevelopmentNow Blog