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 2007 > threads for tuesday june 19

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

Creatin Views on temperary tables
Posted by Deepthi at 6/19/2007 10:17:36 PM
Can we create views on temporaty table in sql server2000.If yes how can we do that? From http://www.developmentnow.com/g/113_2004_3_0_2_0/sql-server-programming.htm Posted via DevelopmentNow.com Groups http://www.developmentnow.com...more >>


Problem with IS_SRVROLEMEMBER
Posted by bryme at 6/19/2007 10:16:00 PM
I'm getting inconsistencies with the function IS_SRVROLEMEMBER. When I execute the function in a query window, it returns the value I expect. In my stored procedure, it is returning null for any username that is a windows account. I'm using SQL Server 2005 SP2. Windows + SQL Server authe...more >>

Name of Stored Procedures dependent on a table
Posted by Xavier at 6/19/2007 9:54:00 PM
There are planed some design modification to be made in some tables. How can I get the name of SPs and Functions which uses this tables or view of this tables. In other word, what stored procedures and functions are dependent on a table: Thanks...more >>

Creating an exact copy of an existing database
Posted by zwieback89 via SQLMonster.com at 6/19/2007 9:53:58 PM
Hi, I would like to create an exact copy of the existing database and rename it as HR_Staging. I first created a new database - HR_Staging. Then using the Import Data tool, I imported everything - tables and views from the original database HR into HR_Staging database. However I see th...more >>

How to detect stored procedures which uses collation
Posted by Xavier at 6/19/2007 9:35:05 PM
In the database there are a lot of store procedures. What is the best way to detect which stored procedures uses a collation. For example:COLLATE Latin1_General_CI_AS? One way is to script all SPs and to search manually in the file. Is there any other way. Thanks, ...more >>

see transaction history for a table
Posted by Boot2TheHead at 6/19/2007 7:08:37 PM
I'm kinda stuck here. I need to see a value that was updated in a table, but not the current value and not the value that was there yesterday. Yesterday: xxxK Today: xxx1 xxxa xxx3 xxxG <-- I need this one xxx5 xxxU <- current My googling around hasn't yielded an...more >>

SLOW UPDATE ERROR
Posted by nuo at 6/19/2007 5:58:30 PM
I received a timeout error on my web app due to slow execution. I have this 2 similar DB (i.e. DB_A and DB_B) and when I execute an Insert/Update/Delete statement on DB_A it is much faster to complete compared to DB_B. I checked the tables' primay key PK and foreign key FK where I execute the s...more >>

Group by week having Monday as the first weekday/"week label"
Posted by Kamikaze at 6/19/2007 5:55:31 PM
Group by week having Monday as the first weekday/"week label" For any given date, I want to label/group it by week, having Mondays as the first day of the week and also the label of that group. Example: 2007-06-17 Sun: 2007-06-11 2007-06-18 Mon: 2007-06-18 2007-06-19 Tue: 2007-06-18 2007-...more >>



Deadlock question
Posted by Richard Douglass at 6/19/2007 3:38:40 PM
I recently started seeing a new description in the deadlock event. Anyone have any idea what the underlying issue might be?? "Parallel query worker thread was involved in a deadlock" Thanks Richard ...more >>

Finding relevent records in table.
Posted by Sam at 6/19/2007 3:19:36 PM
I have a header table which is called Batch and the transaction table is called GLTRAN. The key field on both is Batnbr. I want to find all Batch records where the Gltran records have multiple companyid values. Most of the Bathces will have a single companyid value i.e 'Common' or 'Joc'. ...more >>

Referencing a conditional column in the WHERE clause -- Possible?
Posted by Quimbly at 6/19/2007 3:16:18 PM
I have two tables which I'm joining in a query. In the join, I'm creating a column whose value is conditional (see columns Actual_Latitude and Actual_Longitude below). Is it possible to reference the created column in the WHERE clause? Consider the following query: SELECT S.StationID , P...more >>

OpenDataSource and sql server 2005 configuration
Posted by newToSql at 6/19/2007 2:40:32 PM
Hi, from ServerA, I query a database on ServerB (No sql logins or linked servers are allowed) select top 1 * from OpenDataSource ('SqlOleDb','Data Source=ServerB;Trusted_Connection=yes').Master.dbo.sysdatabases the error: Msg 18456, Level 14, State 1, Line 1 Login failed for user 'NT A...more >>

return value
Posted by seema at 6/19/2007 2:30:07 PM
Hi, I have following stored Procedure. I am writng following ado.net code to get return value from stored procedure but it doesn't work. String constr = System.Configuration.ConfigurationManager.ConnectionStrings["twcsanConnecti­onString"].ConnectionString; SqlConnection ob...more >>

Return Value
Posted by seema at 6/19/2007 1:28:49 PM
Hi, I have following stored Procedure. I am writng following ado.net code to get return value from stored procedure but it doesn't work. String constr = System.Configuration.ConfigurationManager.ConnectionStrings["twcsanConnectionString"].ConnectionString; SqlConnection objConn =...more >>

HashBytes and select
Posted by Yankee Imperialist Dog at 6/19/2007 12:54:01 PM
How can i get a select to work correctly? the values do match as displayed, but i can not select on this value. declare @binVal as varbinary(150) set @binVal = HashBytes('MD5', 'MyUserID') select @binVal select HashBytes('MD5', secUserID),* from sec where HashBytes('MD5', secUserID) = @bin...more >>

Nesting Transactions: Transaction Count error
Posted by Jerry J at 6/19/2007 12:11:00 PM
I am using nested transactions in SQL Server. My nested transactions work as expected. If one of the transactions does a "Rollback" before the upper most transaction is commited, then all the transactions will rollback. However, when that occurs I get this error: "Transaction count after ...more >>

Nested Case When
Posted by Raju at 6/19/2007 11:24:25 AM
I get an error when trying to use Nested Case When: CASE WHEN oh.date_created=oli.datetime_refunded then CASE WHEN oli.ItemStatus IN (10, 20, 30) THEN SUM(oli.Price) ELSE SUM(oli.Price) * -1 END AS Tickets, CASE WHEN oli.ItemStatus IN (10, 20, 30) THEN SUM(oli.TransactionFee) ELSE SUM(oli...more >>

Help with query
Posted by navvyus NO[at]SPAM yahoo.com at 6/19/2007 10:01:31 AM
I have a stored procedure which returns three values: 1. The 1st select returns the gross sales 2. The 2nd select returns the refunds 3. The 3rd select returns net sales which is gross sales-refunds The 1st and 2nd select are workin just fine. The 3rd select also works fine as long the order ...more >>

debugging sql server 2000
Posted by Wendy Elizabeth at 6/19/2007 7:57:32 AM
i would like to know if there is a way to 'step through sql server t-sql commands' using one of the sql server 200 tools, sql server managment studio, or viusal studio .net 2005 professtional version? If so can you give me directions on how to 'step through' (debug) the t-sql commands. if not...more >>

Concatenating output {HELP PLS}
Posted by ITDUDE27 at 6/19/2007 7:40:51 AM
I am concatenating data for the famous ticket process. I am now joining to another table (customer_own_Pnumber) for an additional column. The problem I’m having is data in that table does not always have their own part number in that table. So, when I join cust_ID or item_id (which does...more >>

Full Text Indexing Special Characters
Posted by clintmazur at 6/19/2007 7:10:00 AM
I have an index on a column which is free form. The problem comes up when I have a value in the column such as abc/xyz. If I search for abc, the results come back finding the value, however if I search for xyz no values are returned. I assume the forward slash is acting as an escape charact...more >>

Where to start with database design and creation?
Posted by Mike at 6/19/2007 6:37:15 AM
Hi, I'm looking for advice on creating databases for someone just starting out. Articles, books, websites, etc. Here's what I'm trying to do. I want to create a SQL database to be used as a business contact manager, where I can input names, dates, phone numbers, etc and keep a log of variou...more >>

nesting transactions
Posted by Jerry J at 6/19/2007 5:54:03 AM
I'm not sure if this is a SQL Server or .net question so I appologize if this is in the wrong news group... I have two sql server stored procedures that use transactions. Both stored procedures have there own begin transaction , commit and rollback. Currently I have .Net code that exec...more >>

date format
Posted by Rob at 6/19/2007 5:50:01 AM
Hello, I need to convert this string: '6/13/2007' to this string: '06/13/07' This statement returns the correct format that I need. SELECT CONVERT(VARCHAR(8), GETDATE(), 1) AS [MM/DD/YY] Just can't seem to figure out how to convert the initial string to date, then to this format, then ba...more >>

SQL 2005 sp_send_dbmail query parameter
Posted by basulasz at 6/19/2007 5:22:00 AM
Hi; I want to select some data from tables in db and with the query below exec msdb.dbo.sp_send_dbmail @profile_name='webmaildb', @recipients='dogumgunu@bimeks.com.tr', @subject= @SUB, @query='SELECT NAME,SURNAME,BIRTHDATE FROM PERSONAL WHERE RECNO=XXXXXXXXX, @exclude_query_ou...more >>

protect/hide stored procedure/view/udf code
Posted by hpesata at 6/19/2007 4:59:09 AM
Hi! I wrote an ACCESS 2003 app which uses SQL Server 2005 Express Edition. My app uses a lot of stored procedures/views/udfs and I somehow would like to hide/protect the source code of these objects when I install my app and the database by a customer. I think I can use permissions on my ob...more >>

how to enable clr stored procedure, msg 6263 - sql server 2005
Posted by Peter at 6/19/2007 4:20:02 AM
Hi folks, I created a clr stored procedure, deployed to the database successfully. And I could see the stored proecedure in the object browse window of the management studio. When I ran it, I got an error message as below: - Msg 6263 - Execution of user code in the .net framewor...more >>

select query within SP - need to use values returned
Posted by Jeff at 6/19/2007 3:38:41 AM
Hi I need to perform a select query within a stored procedure eg, SELECT lng,lat FROM table WHERE postcode='BN1' I then need to put lng and lat into variables to use in a different query. How do I do this in SQL? Thanks Jeff ...more >>

Converting a GUID back to its original contents
Posted by lloyddsilva NO[at]SPAM gmail.com at 6/19/2007 3:23:12 AM
Hi, I have an SQL Server Table in which one of the attributes is stored as a GUID. The GUID actually represents the name of a SQL Server Reporting Services report. Once I retrive the GUID from the DB, I cant figure out how to get the Report Name back from it. I was wondering if anyone co...more >>

Sql is inclusive is it not?
Posted by Steve Dassin at 6/19/2007 3:19:55 AM
http://beyondsql.blogspot.com/2007/06/dataphor-inclusive-sql-vs-exclusive-d4.html ...more >>

Primary key value reset
Posted by Sundara Murthy at 6/19/2007 2:55:03 AM
Hi Experts, How to reset the primary key values. For Examples Primary key in my is now 750, i want to delete all the rows and start primary key value to 0 regards sundara murthy s...more >>

sql server management studio startup erorr
Posted by at 6/19/2007 2:26:10 AM
i have got a brand new windows 2003 standart insallation with brand new sql server express 2005 and brand new sql server management studio instalaltions. When i start sql server management studio i get this errorr (see link) http://img265.imageshack.us/img265/6607/mamagementstudioerroryd8.jpg ...more >>

How to disable the identity on a column
Posted by Sammy at 6/19/2007 2:02:00 AM
Hi I don't thik there is but for confirmation is there a way programatically to remove the identity from a column on table on a Sql 2000 Server. I can remove it using EM but I have a script that I would like to run to completion. I am updating some of these values to diff numbers. t...more >>

SQL 2005 Partitioning table Question
Posted by M A Srinivas at 6/19/2007 1:09:51 AM
Following is the simplified form of ddl create table securityprice( securityid int, pricedate datetime , price numeric(20,8)) Price is updated everyday . Need to store old prices which are dating back to 2004 . Most of the queries are targeted towards current date OR dates in the current...more >>

SELECT behaviour with AND clause
Posted by Roger Tranchez at 6/19/2007 1:05:00 AM
Hello, I'm having a doubt abut the behaviour of the AND clause in the SELECT order I have a table with a VARCHAR field called COD, wich contains different codes for ledger accounts; its contents are: 43001021 45001129 45001128 45001127 45001126 4500112C If I want to select all th...more >>

Performance Tuning SQL query in Trigger
Posted by Ganesh at 6/19/2007 12:25:01 AM
i am using sql server 2000. I have written update trigger on CORP_CAGE table to log the details in CORP_CAGE_LOG_HIST table,if any changes in EMP_SEQ_NO column. please find the structure of CORP_CAGE table: 1.CORP_CAGE_SEQ_NO 2.RECEIVED_DATE 3.EMP_SEQ_NO CORP_CAGE table is having 50,0...more >>

NEED TO GO MUCH FASTER
Posted by Uncle Rico at 6/19/2007 12:00:00 AM
HI IS THERE A WAY TO GET MY PROC FASTER IT RUNS OK NOW BUT I JUST NEED IT FASTER THANKS. POSTING HERE B-COZ I WAS TOLD THAT THE REAL SQL GURU'S HANG AROUND IN THIS GROUP CREATE PROCEDURE SP_ORDERSUBMISSION @SENDRECORD BIT, @TYPE CHAR(3) AS SET NOCOUNT ON DECLARE @STR_USER_ID CHAR(...more >>

Working days calendar in T-SQL?
Posted by pedestrian via SQLMonster.com at 6/19/2007 12:00:00 AM
My company working days is from Monday to Friday. I would like to generate a result set which show all consecutive working days (Monday to Friday excluding the weekends) that is, for June 2007, it show me 1st, 4th, 5th, 6th, 8th, 11th etc... until 29th (last working day of June). Is it possi...more >>

use one query to exclude data from another query
Posted by chuck at 6/19/2007 12:00:00 AM
I have two tables: table1: Id col1 1 my dog is black 2 my cat is white 3 my bird is yellow 4 my snake is green table2: Id col1 1 yellow 2 white I want to return the rows from table1 where the values from table2 are not found results: my dog i...more >>

Update process slow
Posted by Bpk. Adi Wira Kusuma at 6/19/2007 12:00:00 AM
I use Sql Server 2000. I've structure like it: Create table T1( RID int primary key, A varchar(8), ... ... ) Create table T2( RID int primary key, A varchar(8), ... ... ) then I make a view like it Create view VUni as Select RID, A From T1 uni...more >>

server compromised?
Posted by Claire at 6/19/2007 12:00:00 AM
Hi Yesterday one of my colleagues pointed out to me that some database software under development wasnt working. I checked the event log to be greeted with a message that 'user bromley was disabled'. I tried to log onto the server remotely with Management studio using windows authentication ...more >>

getting database script by code
Posted by Roy Goldhammer at 6/19/2007 12:00:00 AM
Hello there For some reasons i would like to run actions from sql server or from application uses sql server in order to get entire database creation script or creation scripts for objects on sql server Where can i start learn on it? ...more >>


DevelopmentNow Blog