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 > may 2005 > threads for monday may 2

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

how to know if trigger is disabled?
Posted by Keith G Hicks at 5/2/2005 11:56:28 PM
Is there a functoin or property that you can look at to tell if a trigger has been disabled? Something in the schema? Like: Print IsTriggerDisabled(tblCustomers.MyTrigger) Keith ...more >>

Retrieve Index names
Posted by Madhivanan at 5/2/2005 11:37:57 PM
What is the query that list out all the index names used in the tables? Madhivanan ...more >>

Equvalent to Oracle's START WITH .... CONNECT BY PRIOR
Posted by Abhilash Thomas at 5/2/2005 11:01:02 PM
I have a complex qurey as given below.Anybody can suggest a procedure which is equvalent to Oracle's START WITH .... CONNECT BY PRIOR clause. Qurey:"SELECT c_production FROM Production_ASSIGNMENT WHERE I_COMPANY = 1 START WITH c_Production_ASSIGNMENT = 2 ...more >>

osql -o
Posted by Hoosbruin at 5/2/2005 10:28:18 PM
I would like to create a dynamic output file with the following code: Declare @cmd varchar(1000) Declare @filepath varchar(1000) Set @filepath = '\\server\path\filename+date.csv >>>> I would like the mm/dd/yy appended to the filename then .csv extension Set @cmd = 'Osql -E -S My...more >>

Programatically Backup and Restore User Logins Problem...
Posted by David Dolheguy at 5/2/2005 6:00:01 PM
I'm sure your all aware of the bug in SQL 2000 where if you take a backup and then do a restore on a different database server, the users accounts are not added to the server's own security (login) section. The user accounts are though added properly to the databases "users" list however. ...more >>

UPDATE matching another table
Posted by David C at 5/2/2005 5:20:58 PM
I want to use the code below to update one table from another. Can anyone see any problems with this code? Thanks. UPDATE tblBillingDetail SET AppealBalance = AppealBalance - P.PaidAmount FROM dbo.tblBillingDetailPaid P INNER JOIN dbo.tblBillingDetail D ON P.DetailID = D.DetailID WHERE (P...more >>

Data conversion
Posted by js at 5/2/2005 5:18:25 PM
Hi, Usually how people do the data conversion? For example, I have a well defined database, the new client use another similar relations database and have few years data in it, he want to migrate to my system, so I need to convert his data into my database, customer, appointment, transactions...more >>

Who has rights to what table?
Posted by lhacool at 5/2/2005 4:41:01 PM
Hi, I am trying to find out who are the users that has rights to what tables in a database. Is there a way to accomplish this within query analyzer? Thanks, lha...more >>



join advise on two queries
Posted by Kurt Schroeder at 5/2/2005 1:39:02 PM
anyone have any suggestions on how to join these two queries? 1. they both give results, but i'm trying to avoid creating temp tables. select h.stkhstdate, h.stkhstRSBS, count(h.stkhstRSBS) as Sell from stkhst h join unvmem u on u.unvmemcsiid = h.stkhstcsisym where unvmemUnvID = 7001 and h.s...more >>

Design Question - Implementing User Privileges
Posted by Naveen at 5/2/2005 1:37:12 PM
I have the following skeleton DDL and need to do the following: *Ability to override a users privileges of the 'Role' that he belongs to. For e.g. if a user belongs to Role 1 that has Privileges 1, 2, and 3 then I want the ability to override this users privileges such that he can be assigned...more >>

Conditionally truncating strings
Posted by Joel at 5/2/2005 1:31:06 PM
First, I have been programming in Access JetSQL for a long time, but am new to T-SQL. I have the following view set up: SELECT Material, [Plnd order] AS PlannedOrder, Ord#quantity AS OrderQty, OrderStart, Ord#finish AS OrderFinish FROM OPENQUERY(ZUPG32000564, 'SELECT * FROM [S...more >>

transform column members into row members
Posted by hazz at 5/2/2005 1:08:02 PM
how do I transform 'Percentage' in the following table so that 'Percentage' values are returned in one row for all the given years. Column 'ID' Column 'Year' Column 'Percentage' Column Grade 1 2001 25 A+ 2 2002 30 ...more >>

SQL Server 2005 Beta and MSDE
Posted by Mike P at 5/2/2005 1:07:20 PM
Is it necessary to uninstall MSDE before installing SQL Server 2005 Beta? And if so, do you also have to give the server instance a different name on setup? Cheers, Mike *** Sent via Developersdex http://www.developersdex.com ***...more >>

Remote queries using sp_executesql run inconsistently
Posted by vogelm at 5/2/2005 12:48:01 PM
This one has stumped me! I recently implemented a process to monitor database usage and growth on our production servers. I use on server as the "master" that collects data from all the other servers into one database. The problem I'm having is that only every other day the process com...more >>

ANSI NULLs set at table level?
Posted by DWalker at 5/2/2005 12:21:19 PM
SQL 2000: Ack! I thought my database had ANSI NULLS set to On. I find that it doesn't. I always use IS NULL to check for the existence of nulls, rather than using = NULL, so this setting might not matter much. I see there is a database-wide setting for ANSI NULLS. Also, there appears...more >>

Complex query, please help
Posted by DigitalVixen at 5/2/2005 12:16:06 PM
I think this is any easy one, and hopefully full DDL is not required as there is A LOT. Goal: Create a report(using RS) that shows client name, id, total amt loaned, total amt paid. Data will be displayed in a grid and the balance must be displayed in the pertinent age category..so if Tom...more >>

SQL Server DB Development Project
Posted by te goody at 5/2/2005 12:01:07 PM
I'm looking for MS Project templates or examples relating to all and different SQL Server activities; e.g. installation, upgrade, database design, Application Development, etc. Are there such samples available to download somewhere -- anywhere?? Thanks. ...more >>

Query Help
Posted by XXX at 5/2/2005 10:52:28 AM
Just started working at a place which has a SP which runs a loop and gets the id. Then this id is used as follows: SELECT name, 0 from tbl WHERE name like '%'+id+'%' AND xtype = 'u' Basically to get the names of the tables that have the "id" as part of the name. How can I a...more >>

query question
Posted by microsoft.news.com at 5/2/2005 10:36:31 AM
I'm new to SQL server and I need some help on something. In my current table i have a column formatted like MM/DD/YYYY hh:MM:ss AM, how can I only get the MM/DD/YYYY> I need to do a query and get the data were this column = 1/1/2000 only. I don't need the time or if its AM or PM thanks ...more >>

sp default question
Posted by Kurt Schroeder at 5/2/2005 10:36:06 AM
I'm trying to set the default value for a parameter in a stored procedure CREATE PROCEDURE x @endDate INT = Convert(VarChar(8), GETDATE(), 112) as BEGIN ........ END return 1 this gives me an error. if i set the default to say 32445 it's ok. Is there a way around this so that i can set the...more >>

Important please read this Thank you `°º·...·º°`°º·...·º°`°º·.†..·º°`°º·...·º°`°º·..·º°` `°º·...·º°`°º·...·º°`°º·.†..·º°`°º·...·º°`°º·..·º°` `°º·...·º
Posted by Ronald700053 NO[at]SPAM yahoo.com at 5/2/2005 10:28:23 AM
This is the most important question of your life. The question is: Are you saved? It is not a question of how good you are, nor if you are a church member, but are you saved? Are you sure you will go to Heaven when you die? The reason some people don't know for sure if they are going...more >>

Open and read the log file
Posted by Nuno Pereira at 5/2/2005 9:53:13 AM
I need to open the log file of a database to see the commands in it kept to verify ones definitive inserts that they had been made in the database. How I can make this? -- Nuno Pereira...more >>

sp removing leading zero
Posted by David C at 5/2/2005 9:45:40 AM
I have a stored proc that is removing a leading zero from a nvarchar field. For example, if I pass it '0146' for the @userid it updates the field to '146'. Below is the code. Can anyone spot why this is happening? Thanks. CREATE PROCEDURE [ef_episys_contact] (@EntityID [int], @UserID...more >>

Concatenating output parameters
Posted by Andy at 5/2/2005 8:56:12 AM
I have a stored procedure (PROC1) that calls another stored procedure (PROC2) multiple times. Both procedures have an output parameter and I am wondering if I can take the multiple output parameters from PROC2 and combine them into the parameter that is output for PROC1. Example... Say th...more >>

How to retrieve results in predefined chunks
Posted by Nad at 5/2/2005 7:52:51 AM
Hello, Let's say I am planning retrieve thousands of records and load them in my datagrid in a windows form. This is very slow and I want to retrieve the result in small chunks. For example I want to retrieve first 100 rows and load it and then when user scrolls down on the grid I retrieve ...more >>

format datetime without characters
Posted by Sherry at 5/2/2005 7:10:04 AM
I need to convert the date format with an output of yyyymmdd' I have tried the following code but it doesn't produce the desired output CONVERT(VARCHAR(8),supp_creation_date , 112 ) , Any suggestions? Thanks in advance...more >>

I'm newbie. Script to generate scripts (add job steps).
Posted by andrea favero at 5/2/2005 6:21:01 AM
Hi, I want to add to my 50 single step jobs a second step with command "execute JOB_STEP_FAIL <jobname>" where <jobname> is job name from sysjobs table. I want to use sp_add_jobstep . I do not want to make this job by hand. Thanks !!!!!!!!!!!!!!!!!!!!!!!!!!...more >>

Migrating from RMS II
Posted by B NO[at]SPAM rney at 5/2/2005 5:11:07 AM
We're migrating a production database (mission critical) from RMS to SQL Server. In the original database the primary key is negative. Using negative numbers builds a more balanced tree... Are there any drawbacks for doing this in SQL Server?...more >>

Migrating from RMS to SQL Server
Posted by B NO[at]SPAM rney at 5/2/2005 5:06:04 AM
We're in the process of migrating a RMS database to SQL Server. Our migration task has so far mapped some datatypes as follows: currency related data: double precision -> float (8) number (in range: -25000 to 25000, one decimal point) -> real None of these columns will be used for indexing,...more >>

Stored Procedure advice requested - Creating SP during runtime, or during installation
Posted by Russell Mangel at 5/2/2005 1:03:56 AM
Is there a more correct, or nicer, or cleaner way to create Stored Procedures: The following code works fine, just wondering if there is a more acceptable way to do this: The IF EXISTS line, seems somewhat messy to me, maybe this is as clean as it gets? Thanks Russell Mangel Las Vegas...more >>

Calculate Difference
Posted by wrytat at 5/2/2005 12:56:01 AM
Sorry, I know that I'm very troublesome I will like to create a view that stores the difference between 2 Integer columns from 2 different table. Is there a function to perform this? And I wrote a SQL statement as below, Select CustID, ReqNo, 'Total'=Sum(AcceptedQty) From Delivery Group By ...more >>

trigger vs. unique index
Posted by Keith G Hicks at 5/2/2005 12:00:00 AM
In general, is there any problem with using a trigger to keep the value of a column unique in a table as opposed to setting the column as a unique index? Keith ...more >>

Careless Delete SP , HOw can I recover (Urgent help)
Posted by Agnes at 5/2/2005 12:00:00 AM
I delete 40 SO so careless ly, Any method to recover ??? ...more >>

Select rows, return and delete only those rows?
Posted by William Stacey [MVP] at 5/2/2005 12:00:00 AM
Learning some SQL and ADO.Net. Have a mail style learning app with a table where each row has at least a subject string and body string. On the client, I want to select all active rows and return to client (e.g. pop3 like). I then want to delete only those rows (or flag as deleted) only t...more >>

Get error description (message) associated with @@Error
Posted by JB via SQLMonster.com at 5/2/2005 12:00:00 AM
If i use FORMATMESSAGE it allways returns NULL. Any suggestions?? -- Message posted via http://www.sqlmonster.com...more >>

Monitoring for files
Posted by Joe90 at 5/2/2005 12:00:00 AM
Hi, Does anyone know of a method using File System Objects to monitor for filenames that are date & time stamped. The filename will always follow the form "BACS Day File [ddmmyyhhmm]" There should only ever be ONE file present in the directory - however because it is timestamped I am findin...more >>

dynamic cursor declaration
Posted by Andreas Wöckl at 5/2/2005 12:00:00 AM
hi group! I am searching for a possibility to declare my cursor dynamicly in a way like that ALTER PROCEDURE dbo.proc @param varchar(30) AS declare cursor projekt_cursor CURSOR FOR 'select * from tbl_projekt where projekt_nr in (' + @param + ')' @param is a varchar like that...more >>

Multiple Batches via ADO
Posted by Patrick Wolf at 5/2/2005 12:00:00 AM
Hi, how would I go about sending a Update Script (with multiples Batches) via ADO to an SQL 2000 Server. As much as I know the Command.CommandText can only take a single query. Thanks a lot Patrick ...more >>

Update Script within a Transaction
Posted by Patrick Wolf at 5/2/2005 12:00:00 AM
Hi, below you find an extract of an update script I would like to use. It should check if the Database Version is correct for the update and if not it should stop (by raising an error?). The whole script should be within a transaction. If an update failes it should rollback everything. T...more >>

Select from table
Posted by PawelR at 5/2/2005 12:00:00 AM
Hello group, I have table with 3 columns ( id(int) , ColName (varchar) , ColProperty (int)). In column ColProperty I have binary represention of property (code in binary system) for example: if value is 43 that [Weight ratio * state of property] (1*1)+(2*1)+(4*0)+(8*1)+(16*0)+(32*1)+(64*0)...more >>

Real SQL scripting quandry linking data to 2 values on the same row
Posted by Macsicarr at 5/2/2005 12:00:00 AM
Hi All Wonder if you could help me with the problem I've caused myself!! I have 2 problems both exactly the same and I can't fathom how to get round them. PROBLEM 1 (I am using an Access 2000 DB): I basically poke the codes of team names into a line-by-line history table so I'm not s...more >>

ROBUST PLan
Posted by Rafael Chemtob at 5/2/2005 12:00:00 AM
Select a.id_customers, firstname, lastname from customers How would i use ROBUST PLAN with this query? please advise. rafael ...more >>

T-SQL Scripts to Manage Users in SQL Server 2000
Posted by Saradhi at 5/2/2005 12:00:00 AM
Hi Can any one tell me how to create a group and user in sql server 2000 programatically in C#? Is there any system stored procedure to do this one? I want to create a user and need to place it under a group. and each group has its own set of roles like to access some tables and to deny s...more >>

Tab Delimited
Posted by Tony at 5/2/2005 12:00:00 AM
Hi, I have records with tab Delimited in it. 123 123 123 (one Coloumn Data) 333 555 555 (one Coloumn Data) Is that possible that using stored procedure, I can Split every row on the basis of Tabs and hold them in seperate varibles? Thanks In advance Tony ...more >>

Cost of Sql Server - programmer - customer
Posted by Frank Dulk at 5/2/2005 12:00:00 AM
Which the cost to have the sql server, for the programmer and which the cost for my customer? Is it very difficult of installing the sql server in the customer? is a technician necessary, or does he have as a cd of installation of the system or did he see code to leave the program rotating witho...more >>


DevelopmentNow Blog