Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score continuous dates
NJ - 21 Jan 2006 11:29 PM - 7 messages
Hi Guys, I have a sql query that returns a count of a certain column say the number of bugs per week on a week by week basis. there are some weeks which have no bugs and these weeks are not returned. How can I write a ...
Score VIEW will not UPDATE with INSTEAD OF TRIGGER
Dave - 21 Jan 2006 10:31 PM - 8 messages
I created a view on a table and added an INSTEAD OF TRIGGER to the view. The idea was to have all access (including data modification)  go through the view rather than the table. I tested this concept (or I thought I tested it) and everything seemed to ...
Score Maximum Size for UDT
Leila - 21 Jan 2006 8:45 PM - 6 messages
Hi, I want to use UserDefined format for my CLR UDT and I need a formula to calculate its MaxSize. Thanks in advance, Leila ...
Score Null and UDTs
Leila - 21 Jan 2006 8:45 PM - 5 messages
Hi, I am trying to use Point UDT from MSDN. But when I insert a null into this column, my SELECT on the table generates an error: An error occurred while executing batch. Error message is: Data is Null. This method or property cannot be called on Null values. ...
Score Name property of SqlUserDefinedType
Leila - 21 Jan 2006 8:45 PM - 3 messages
Hi, MSDN describes that Name property of Microsoft.SqlServer.Server.SqlUserDefinedType is not used by SQL Server, but by VS.NET IDE. I have set a name for my UDT, how can I see its effect it VS.NET IDE? ...
Score Update Help
Sean John - 21 Jan 2006 7:44 PM - 6 messages
How can I update data on this column called address1.  The path is 'c:\apps\MailBox\Attach\El Poder' and I want it changed to 'c:\apps\Sever1\MailBox\Attach\El Poder' *** Sent via Developersdex [link] *** ...
Score Whare are temp table names padded with underscores?
Bill - 21 Jan 2006 7:08 PM - 6 messages
Using SQL Server 2000, when I look at the name column in tempdb..sysobjects the names of the temporary tables I have created are always padded to the full length of the field with underscores. Is this normal? Is this always the case on every SQL Server installation? ...
Score Can CONTAINSTABLE be made to match unconditionally?
Greg Smalter - 21 Jan 2006 6:50 PM - 6 messages
Say that users searching a Books database are able to search by Author, Title, and Publisher using three separate text boxes.  They can choose to leave any or all text boxes empty if they do not care to filter by that ...
Score Confusing CONTAINS behavior
Greg Smalter - 21 Jan 2006 6:41 PM - 4 messages
I'm experimenting with the CONTAINS operation and I've come across some confusing or inconsistent results.  The following results are exactly the same if the search terms are enclosed in double quotes so that they are treated as a phrase. ...
Score append single character at specific position in string
sarah.clarke - 21 Jan 2006 4:14 PM - 4 messages
Hi everyone, i am in seek of help. I have a variable (called status) of type char(10). This needs to be extended to type char(11) and i need to append the character 'N' at this position. For example, if 'status' is any of the following strings of type ...
Score Free Hot Phone Sex
AnimalSperm - 21 Jan 2006 4:02 PM - 1 message
+8613352960090 100% Free multi-lingual AnimalSperm Production el***@digi-art.de ...
Score Free Hot Phone Sex
AnimalSperm - 21 Jan 2006 4:02 PM - 1 message
+8613352960090 100% Free multi-lingual AnimalSperm Production el***@digi-art.de ...
Score Making a term found in a string the subject
philipbennett25 - 21 Jan 2006 3:52 PM - 5 messages
Hi, I am trying to make a term from a string into the subject and then be able to count the occurences of this. using: Where (Fail_Desc like '%C[1-999]%' or Fail_Desc like '%U[1-99]%') Which would output: ...
Score Inserting Records from Table type to Temp table
Uma - 21 Jan 2006 3:07 PM - 2 messages
Hi, I want to insert records from table type to temp table without using cursors in SQL Server 2000 stored procedure. Regards, Shanmugam ...
Score Problem with too many queries.
Vani Donthula - 21 Jan 2006 9:58 AM - 3 messages
Hi I have 3 tables and I have to do search feature with 12 drop downs i.e 12 Parameters. I have to select 1or2  fields from each tables. There are almost more than 1000 queries,when I placed these in codebehind of ...
Score String Manilpulation
SouRa - 21 Jan 2006 8:33 AM - 3 messages
Hi, I want to display the name in Title case (like this - Soura Raja) Please advise me. rgds, Soura ...
Score Time format hh:mm:ss pm
SouRa - 21 Jan 2006 8:31 AM - 3 messages
Hi, I want time 'hh:mm:ss AM/PM' like this format. Can u tell what are the ways to except substring using. rgds, Soura ...
Score Order By Primary Key
INeedADip - 21 Jan 2006 4:46 AM - 19 messages
I've got a table with an a primary key of type 'int' (auto incrementing). Were talking about millions of rows. The name of this field is TempID. I always want to sort by the TempID ascending....is that something that I ...
Score [ot] VBA workgroup / domain name
rmanchu - 21 Jan 2006 4:10 AM - 2 messages
hi i'm being asked to log, users workgroup_name and domain_name in an audit trail? is this do-able? how shud i proceed on this? thanx ...
Score Use of TABLOCKX
PD - 21 Jan 2006 3:16 AM - 5 messages
I have a stored proc that generates keys based on an existing table row. Here's the code: ===== CREATE PROCEDURE [GetNewID] @newID char(4) OUTPUT AS DECLARE @lastID char(4), @userIDNum int -- Get the latest existing userid from Users and put it in the ...
Score stored proc help
Mike P - 21 Jan 2006 1:18 AM - 4 messages
I'm trying to create a stored proc where the season and team name of a sports team are passed to it, and it returns the week, opponent and scoreline of the game, plus a path to the opponents logo.  The fields i ...
Score Text file import
Grace - 21 Jan 2006 12:58 AM - 4 messages
I have multiple text files need to be imported into SQL server. All files use same column delimiter, row delimiter but have different number of columns. Some have over 100, some have just 10 or 20. I am wondering if there is a way ...
Score Yukon and intellisense?
brett - 21 Jan 2006 12:38 AM - 4 messages
I've seen references that Yukon does have intelliesense.  Is this full blown intellisense or something stripped down?  Are there any web references describing some of its details? Thanks, Brett ...
Score Select where result are by the best match
Senna - 20 Jan 2006 11:40 PM - 24 messages
Hi Looking for a way to get the right product tax depending on the zip code. The query should look something like below, but don't know how the expression for the zip code matching should look like. ISNULL(SELECT Tax FROM ProductTax WHERE ProductId = @productid AND CountryId ...
Score Verify if a Table Exists
Paul DeWitt - 20 Jan 2006 10:13 PM - 3 messages
Is there a command to verify that a table exists?  I am writing a .Net application.  I would like to have the .Net application check if a table exists (initiated by a menu command) and then create the table if it does not ...
Score Need the Guru HELP. Ðåáÿòà, ïîìîãèòå!
Kachmaryk Yuriy - 20 Jan 2006 10:03 PM - 4 messages
I have 3 tables: Teble #1 - CUSTOMER ----------------------------------------------- 30 000 rows Teble #2 - PRICE ----------------------------------- 25 000 rows Teble #3 - DEAL_PRICE Expect Results for CustomerID=241: 25 000 rows Thanks to anyone who could help. ...
Score getting today's data in '2006-01-20' format
hazz - 20 Jan 2006 9:20 PM - 5 messages
I would like to use today's date in the format as below  ('2006-01-20') How do I format the result of GetDate() to achieve that? Thank you.  -hazz declare @now datetime set @now = '2006-01-20' ...
Score tnx
Fred - 20 Jan 2006 9:18 PM - 1 message
u guys are real quick - tnx Jens, its not exactly what i want coz a customer may not be a member of a group; Jim u r GREAT, this will really speed up my work, my queris have a lot ...
Score Table to comma delimited
Matt Sonic - 20 Jan 2006 8:59 PM - 5 messages
Looking for a little function/trigger writting help. I need to convert data in one column of a table/view to a comma delimited string in a single field in a related row on another table.  I want to use a ...
Score Data Compare
Joe - 20 Jan 2006 8:58 PM - 3 messages
I have and use Red Gate software for comparison.  However; I'm at a loss on this data compare scenario: I have two tables I want to compare, but the PK-ID field is seeded differenly between the 2 tables.  So when I do a comparison - every row is ...
Score Changing NULL to zero
CL - 20 Jan 2006 8:49 PM - 2 messages
Greetings folks, I have a dilemma that I thought was going to be a slam dunk.  I have a table with several integer and money columns that contain about 50% null values.  I need to sum them, and have the nulls treated as zero. ...
Score remotely start/stop sql server service in a workgroup
Fred - 20 Jan 2006 8:38 PM - 4 messages
hi, i have an administrator account on a box, there is a sql server pc in the same workgroup w/ a different admin pass (which i know ^_^, and the sql sa pass too), how can i restart the sql server service from my box ? ...
Score union ?
Fred - 20 Jan 2006 8:35 PM - 3 messages
hi, i have tables Customer, CustomerGroup and CustomerCustomerGroupXref ( :) ), now i want to find customers having say vip_flag, only that flag can be set for whole gropus and the indivdual customers inside group wont than have it set curenty i do ...
Score Can I write query like this
Nick - 20 Jan 2006 8:24 PM - 4 messages
hi, guys Can I write query like this: I need to get the amount of stores that have @PID inventory less than 2 select count(*) from (      select StoreID, sum(Inventory) as Inv from products where productID = @PID group by storeID ...
Score is there a way to get listing of table relationships
Rich - 20 Jan 2006 8:02 PM - 3 messages
Hello, I am examining the relationships, indexes, constraints of tables in a DB that I am supporting.  There is no documentation, so I want to get a listing of the relationships rather than just looking at the database diagram and ...
Score where current of cursorName
jaylou - 20 Jan 2006 7:53 PM - 9 messages
Hi all, I am trying to sequence rows in a table.  this is for differnt policy#'s I am using policy#,effectiveDate as my critiria to start my numbering.  The problem is there are no unique Identifiers in this table I have 6 rows that ...
Score Changing the Table Type
CSHARPITPRO - 20 Jan 2006 7:45 PM - 2 messages
Is there a to change the  Type property on a table?  I would like to be able to change the Type from 'User' to 'System' through code. Adv-thanks-ance ...
Score ASP.NET * Cannot find file
Terry - 20 Jan 2006 7:16 PM - 2 messages
When launching created file 'eSurvey.aspx' the following error occurs. How can I resolve this matter? Thanks! ERROR: Could not find a part of the path "E:\Documents and Settings\wardte\Desktop\eSurvey\convert\files\Rigid_PCB_Questionnaire.htm". Description: An unhandled exception occurred during the execution of the ...
Score TRIGGER UPDATE QUESTION
ReTF - 20 Jan 2006 6:52 PM - 4 messages
Hi All, If I have one UPDATE TRIGGER to table 'TA' and in this trigger I have one UPDATE to the same table TA, this will stay in infinite loop? Thaks ...
Score How to add sproc to multiple databases
bill - 20 Jan 2006 6:23 PM - 4 messages
Hi all. Lets say I had a script to run (create sproc) and I needed to run it on several different databases on one sql server. Can someone give me an idea how I could do that short of changing the "use databse" ...
Score Clean out (Reinitialize) SQL Server Database?
Joseph Geretz - 20 Jan 2006 6:02 PM - 8 messages
It there an easy way to 'clean out' a SQL Server database? I need to get a database of an unknown state back to a known state of 'empty'. Is there an easy way to drop ALL structures; TABLES, VIEWS, SPROCS, FUNCTIONS, INDEXES, ...
Score Identity Values
Ferdinand Zaubzer - 20 Jan 2006 5:23 PM - 3 messages
Hello, I have the Following Problem: I have some tables on a SQL Server database that have primary keys without the identity property. This was necessary for importing data from old databases... Now I want to change some primary key columns to be an Identity. ...
Score instead of trigger on view
Michael Schroeder - 20 Jan 2006 5:21 PM - 6 messages
Hi I have a view 'vwTest' that is based on 'table1' and 'table2'. Whenever a new entry appears in that view i'd like to fire a trigger that inserts the new data into a third table named 'results'. If there's an insert into the basetables I can see the new entry in my ...
Score sending results of query into a table
hazz - 20 Jan 2006 5:04 PM - 10 messages
A colleague is going to automate (using Reporting Services) a daily report using the following sql. He asked that I put the results of this query into a table. How do I do this?  Thanks.   -hazz declare @now datetime ...
Score Throwing Errors In VB Script From SQL Job
Doug - 20 Jan 2006 4:57 PM - 2 messages
Hi,   I am creating a SQL Job and using a VB Script inside of it.  In the script, under certain conditions I throw an error.   When I test the script under those conditions, I get notification the ...
Score How to remotely start SQL Server instance?
Igor Solodovnikov - 20 Jan 2006 4:36 PM - 2 messages
When you connect to SQL Server instance using SQL Query Analyser there is  "Start SQL Server if it is stopped" option. Is it possible to remotely  start stopped SQL Server instance from my custom application? How? ...
Score Really really slow cursor
Si - 20 Jan 2006 4:29 PM - 11 messages
I'm stumped on this. My developers proc left to run all night consumes tons of cpu but does no updates at all and I have to kill the connection in the morning. The select in the cursor declaration returns 357 rows so not an outrageous ...
Score Problem copying data from column in same table
Iris Faber - 20 Jan 2006 4:26 PM - 13 messages
I have a column that I would like to copy data to.  The column definitions are exactly the same.  I tried creating an Insert Into query and changed the type to Insert Results.  Everytime I run this query, all the values in my column remain to be null.  Below is a sample of what I did: ...
Score Not like operator seems to be being ignored in Trigger
Kendra - 20 Jan 2006 4:06 PM - 6 messages
I'm trying to find out if the "not like" operator is ignored in triggers.  I have a fairly simple trigger, but it is firing for all inserts, disregarding the "IF @CustomerName not like '%solec%' RETURN" statement.  I even set the name to null thinking it may have been holding ...
Score TreeView Populating problem
JN - 20 Jan 2006 3:56 PM - 2 messages
Hi All, I am using an SqldataAdapter to fill a dataset table: Dim dadEmployees As SqlDataAdapter = New _           SqlDataAdapter("SELECT FirstName + ' ' + LastName AS FullName Employees", con)          Dim dst As DataSet = New DataSet() ...
Score Inline table function help
.... - 20 Jan 2006 3:42 PM - 7 messages
Hi I have a table looks something like this CREATE TABLE TEST (         theid        INT,         thevalue   TEXT ) Example Data ...
Score Creating a table
John - 20 Jan 2006 3:19 PM - 4 messages
I have a recordset that consists of among other things a list of values and dates  over the next 12 months, I want to display these dates in a table ie Jan Feb Mar Apr May Jun etc 12   80    120   5    65  56  etc ...
Score Have Svr name, need DBs
Bob - 20 Jan 2006 3:15 PM - 5 messages
Hello Folks! I have a bunch of servers, actually there are about 340. I have the names of the servers but what I'd like to do is loop through the servers and return all the databases on those servers. ...
Score variable for DateAdd datapart constant
WCL - 20 Jan 2006 3:04 PM - 2 messages
Can DateAdd accept the datepart parameter as a variable? e.g declare @start_date datetime declare @end_date datetime declare @adjustment int declare @adjustment_units ??? -- set the input values -- set @end_date = DataAdd(@adjustment_units, @adjustment, @start_date) ...
Score xp_readmail
baddy - 20 Jan 2006 2:25 PM - 3 messages
Can anyone tell what's the replacement for xp_readmail in SQL Server 2005? All I could find in BOL was: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to ...
Score Hyperlink
GTN170777 - 20 Jan 2006 1:56 PM - 3 messages
Hi All, Silly question, but what is the best column type for hyperlinks? Many thanks ...
Score How can we CREATE a VIEW with variable which stores a select stat?
savvy - 20 Jan 2006 1:32 PM - 3 messages
The code shown below is working perfectly in the analyzer. I want to create a view with the results Is it possible ? Thanks in Advance DECLARE @searchstring varchar(22) SET @searchstring = 'aspnet' declare @strSQL varchar(244) select @strSQL='select FileName,Path from scope('''' ...
Score finding the difference from one row to another
polluxopera - 20 Jan 2006 1:03 PM - 3 messages
Hi there... I have a table with this data: id       entered_time 1        2:38:33 PM 2        2:54:45 PM ...
Score Update one table from another table
Carl - 20 Jan 2006 1:01 PM - 6 messages
Hi. I want to update table1 from table2. table1 ID  D1  D2  D3 1    2 3 table2 ID  D 1    X 1    Y 2    Z ...
Score reverse like?
chandy - 20 Jan 2006 12:07 PM - 8 messages
I am trying to do the equivalent of following pseudo-code: select id from tablename where %stringcolumn like 'mystring' so I would have a record returned if the values in stringcolumn were: ystring string tring ring etc.. To me this seems like some kind of backwards 'like' but I can't get it ...
Score Case Within Where Clause
Sh0t2bts - 20 Jan 2006 11:46 AM - 7 messages
Hi All, I am written a query that runs each day and pulls all of the work logged by an office, it works fine Mon - Fri but as the managers dont work Sat-Sun they want my report to show all work from the weekend. ...
Score Stored Procedure to Delete Rows
Dooza - 20 Jan 2006 11:38 AM - 4 messages
Hi there, I have made this statement that will select credit card details from one table if the order status is shipped in another table. SELECT     dbo.tblOrderDetails.orderStatus, dbo.tblCreditCardDetailsTest.orderNumer, dbo.tblOrderDetails.cName,                        dbo.tblCreditCardDetailsTest.creditCardNumber ...
Score Can't we use variables in OPENQUERY, FREETEXT("@searchstring")?
savvy - 20 Jan 2006 11:14 AM - 14 messages
I'm writing a stored procedure for a keyword search in a Word or PDF doc which i've done through Index Server and linked the results to SQL Server. Part of my stored proc is shown below in which for a FREETEXT keyword ...
Score sa password
Igor Solodovnikov - 20 Jan 2006 11:11 AM - 9 messages
Is there default password for sa user in SQL Server 2005 Express Edition? ...
Score Calling webservice from CLR Stored Procedure
.LP - 20 Jan 2006 11:01 AM - 4 messages
I would like to be able to call an webservice from a SP, I'm able to add a webreference to the webservice in the database project, but how to call it in code, and how to set up the code access illudes me? ...
Score Program Logic
marcmc - 20 Jan 2006 10:36 AM - 5 messages
My program runs a number of batch files. I use a parameter table as below to loop thru what commands should be fired in Exec master..xp_cmdshell @pCommand ; For ev_id 4,5,6 & 7 I want to add an if statement to only execute one of them. ...
Score Problems Enumerating Role Permissions with SMO
James Culshaw - 20 Jan 2006 10:10 AM - 1 message
Hi, I am attempting to enumerate role permissions using SMO. I can enumerate the permissions on a atbel, view, or store procedure no problem. When I try to enumerate the permissions that a role has I get the following error: ...
Score Varbinary columns...
Tudor S - 20 Jan 2006 9:51 AM - 5 messages
Hello all, I'm working on a SAP database which I have to connect to a telephony exchange database. Both databases are installed on a SQL Server 2000 SP4 machine. I have to create a view over those two databases; the join columns have ...
Score Is it possible to use a Function directly as a Input Parameter for a Inline UDF
Franz - 20 Jan 2006 9:47 AM - 3 messages
In a Scalar-valued Function i can give a other Function (System or UDF) directly as Input Parameter. In a Inline Function and  Table-valued Function it doesn't work. See the samples: -- Create this Function as a  UDF Inline Function ...
Score Job LastRunOutCome??
Phonzo - 20 Jan 2006 8:40 AM - 3 messages
Hi all, I am trying to determine the status of a Job after it has finished running, but I don't get the correct results: I first check if the Job is currently Running: Private Function isJobExecuting(sJobName As String) As Boolean ...
Score Joining Tables
John - 20 Jan 2006 8:21 AM - 6 messages
help please I have two tables I want to join, Table 1 (T1) nd Table 2 (t2). Table 1 has several fields A1,B1,C1......... etc and Table 2 has several Fields A2,B2,B3 etc I want to join A1 to A2, which is simple enough, but then I want to join B1 ...
Score SQL Server Express 2005 and VS.Net 2003
Good - 20 Jan 2006 8:02 AM - 7 messages
Dear all Is Visual Studio.Net 2003 compatiable with SQL Server Express 2005? I have tried to use the Data Form Wizard to link with the SQL Server Express 2005 but "There were errors configuring the data adapter" error shown after ...
Score Biztalk 2004 & SQL
Johnson - 20 Jan 2006 7:30 AM - 2 messages
I have some questions about how to determine if my Biztalk 2004 is using connection pooling or not.  Also, I would like to determine if the Microsoft Biztalk 2004 application uses OLE DB, or ODBC for its connection to SQL ...
Score inserting single precision data into sql server float column
Vivek - 20 Jan 2006 7:17 AM - 10 messages
Hi,   iam using the bcp api to load data into sql server. The data to be loaded is single precision and hence my bcp_bind type is SQLFLT4. The column in my sql server table is a FLOAT(which is of course double precision). ...
Score Funny! More offers to select a search engine! (PP)
world - 20 Jan 2006 4:29 AM - 2 messages
wycareerster ...
Score SQL Help - dynamically change where condition
Mike - 20 Jan 2006 3:15 AM - 7 messages
I am trying to modify the where condition of this query based on certain values that will be passed to this query. I get this error Incorrect syntax near '!'. select emp_id, emp_name from employee where emp_code = 'FIN' and case when ('889977' != '') then (emp_id != '889977') else (1=1) end ...
Score DateTime Bugs??
Kenny - 20 Jan 2006 3:07 AM - 6 messages
Hi,     Below shown simple script to get the weekday. Any idea why the weekday for spanish datetime is 1 instead of 2 for 'Ene 16 2006  2:00PM' ('Jan 16 2006  2:00PM') ?? TEST ------ print DATEPART(dw,'Jan 16 2006  2:00PM') ...
Score SQL dilema
T - 20 Jan 2006 2:26 AM - 22 messages
I have a table with the folowing few lines of data. 4460      Alexander, Julie A.    12    5    11/10/2005    0.0 4460      Alexander, Julie A.    12    5    11/11/2005    0.0 ...
Score Funny! More offers to select a search engine!
helloworld - 20 Jan 2006 1:24 AM - 1 message
[link] ...
Score GetDate inside a Function
John - 20 Jan 2006 12:42 AM - 11 messages
Hi, I tried to use GetDate inside a SQL server 2000 user defined function and got error: Invalid use of GetDate within a function Here is my code snippet: DECLARE @Today smallDateTime SET @Today = GetDate() What should I do? TIA ...
Score on insert trigger and a linked server?
darwin - 20 Jan 2006 12:40 AM - 4 messages
Hi all Is it possiable to use an on insert trigger to insert the same record into another server (linked)? Any hints or issues with this would be appreciated. thanks ...
Score performance on the join
culam - 20 Jan 2006 12:30 AM - 2 messages
I know that join on an integer field is faster than join on varchar field. What if I cast the fields to integer within the join clause, ex. JOIN CAST(tableA.field AS int) = CAST(tableB.field AS int) would this speed up my query? ...
Score Cant It be Done?? Backup mdf and ldf only
Sean John - 20 Jan 2006 12:04 AM - 3 messages
Can you backup database that has .mdf, .ldf, and .ndf and restore only .mdf and .ldf?  Reason is if you have a large table thats part of a filegroup and you want to restore database to another sever and not the ...
Score User Instances and Scripts
Ibrahim Mesbah - 19 Jan 2006 10:58 PM - 2 messages
I have been reading about SQLExpress User Instances.  I deployed a C# app that uses sqlexpress' user instance functionality.  I need to deploy an upgrade with a fix to certain stored procs.. I figure I could use sseutil or sqlcmd to run a .sql script upgrade file ...
Score CTE vs. Table Variable (Paging)
Eyal - 19 Jan 2006 10:56 PM - 11 messages
Hello Experts. I'm trying to find the pros / cons of using CTEs (Common Table Expressions) vs. Table Variables for 'Paging' through data. Here is the scanario: A.  Table Variable Example: Select Query returns 100k posible matching rows, I store the matching key ...
Score generate three rows out of one row from a table
sqlguy - 19 Jan 2006 10:25 PM - 2 messages
i've two tables as shown below, i want to generate the table2 using table1, more details -- for each in table1 i want three rows in table2 these three rows col2 says A, B, C table1 ------- c1 --  1 2 ...
Score Re: multiple large table scans
Alexander Kuznetsov - 19 Jan 2006 10:10 PM - 4 messages
Hi Hugo, In my experience an indexed view with aggregates may introduce very serious lock contention if used in OLTP environment. Although there are some ways around (I can elaborate if necessary), I'd prefer to use index covering if an OLTP table VeryLargeOrders is simultaneously ...
Score can't insert into ...because of nulls problme!
Rich - 19 Jan 2006 9:55 PM - 10 messages
Hello, I am trying to insert some records into a table from an SP but get this message: Server: Msg 515, Level 16, State 2, Procedure stp_InsetIntoSubDetail, Line 6 Cannot insert the value NULL into column 'CurEntryDate', table 'Subscriber.dbo.SubDetail'; column does not allow nulls. INSERT fails. ...
Score Consoldate columns in a SELECT
Terri - 19 Jan 2006 9:17 PM - 5 messages
I have a vendor supplied orders table that tracks the fee types associated with an order. The allowable fee types are A, B, C, D, and E. These fee types can be in anyone of the six fee code fields. In the corresponding fee ...
Score Programatic replication
Dave S. - 19 Jan 2006 8:33 PM - 2 messages
I have SELECT access to a database that is very, very slow to work with to the point where I am looking to replicate at least one table to my own server to use the data locally. What is the best way to check for new ...
Score Backup Contains .mdf .ldf and .ndf dont want .ndf
Sean John - 19 Jan 2006 8:25 PM - 5 messages
Hello, I have a database(.mdf and .ldf) with a large table that is attached to its own filegroup(.ndf).  I have created a full database backup and used Restore FilelistOnly From Disk = 'C:\MSSQL\Data\Backup\Contact.bak' ...
Score Encrypting Stored Procedure Code
darrin.wilkinson - 19 Jan 2006 7:13 PM - 6 messages
Hi, Is it possible to encrypt the code within a stored procedure in Microsoft SQL Server? My example is: I've written a stored procedure.  I don't want anyone to be able to view the contents/code within this stored procedure unless I allow them ...
Score how to read a 1204 and 1206 trace log entry
jason - 19 Jan 2006 7:00 PM - 3 messages
so i'm investigating deadlocks which occur on the database i am responsible for. i've put in place a 1204 and 1206 trace, and now i'm just curious how to interpret the findings. i have read the BOL section ...
Score Stored procedure problem - update help needed
ROBinBRAMPTON - 19 Jan 2006 6:55 PM - 3 messages
Hello everyone, I'm using the following procedure to do two functions. 1) Extract all zip codes from a  database of American zip codes, which falls within a 15 miles radius from a predefined zip code (variable @zipcode) Then... ...
Score Using output parameters in SQL Functions
praveen - 19 Jan 2006 6:22 PM - 6 messages
Hello Friends, I'm trying to use an output parameter in a function. But it seems the syntax I used is incorrect. May I know the correct syntax for using an output parameter in a function. Sample Function I used: ...
Score SMO-license
Fred - 19 Jan 2006 6:17 PM - 2 messages
I'm writing a application using SMO, however, I have some doubts regarding the redistribution of this application, commercially. Is it possible? What is necessary legally speaking to redistribute? Thanks in advance ...
Score How to get the name of the column that is an Identity Column
CSHARPITPRO - 19 Jan 2006 5:40 PM - 8 messages
I would like to know the best method of getting the name of the column if it is an IDENTITY column.  I need to remove the IDENTITY property on all tables. Thanks ...
Score Job issue
Enric - 19 Jan 2006 5:37 PM - 2 messages
Dear all, I want to define a job which might be able to launch a .BAT where its location is my local workstation. Is it possible? That .BAT call a .EXE and we wish to keep out of our production server. That job will be scheduled from ...
Score big log file
Owen - 19 Jan 2006 5:34 PM - 2 messages
Hello: I have a db with 2 data files and 2 log file, but one log files is about 9GB, I would like first reduce the db to only one pair of file, one data and one log and second reduce the size of log about 1gb or 2. how can I do that? ...
Score Query Timeouts--Indexing Questions
Larry Menzin - 19 Jan 2006 5:31 PM - 5 messages
I am helping a client with query timeout issues. Their tables have an identity field used as a primary key, with a clustered index on the primary key. This key really has no functional significance; it is just a number. ...
Next »