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 > october 2006 > threads for friday october 20

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

data
Posted by joe at 10/20/2006 9:48:02 PM
how many char can ntext store if i want to store 1 million char in a field what datatype is used?...more >>


BIDS / Conditional Split Problem....
Posted by Bob McClellan at 10/20/2006 8:37:56 PM
Not sure if this is the right NG to post this to but here goes..... I am really struggling with a package I am developing in BIDS. I'm sure Moving from DTS to Visual Studio will be great once I get through the curve but it's driving me nuts so far. I have a conditional split that should se...more >>

BCP in Query Analyzer
Posted by research_stuff at 10/20/2006 7:54:34 PM
Can BCP be executed in SQL Query Analyzer? I saw the following example. bcp pubs.dbo.authors in c:\temp\authors.bcp -c -Sstevenw -Usa -P The question I have is how do I obtain a file from a network file server? I have not found any examples. I am not able to use the SQL Server to place...more >>

How to launch windows script from database [via Trigger]?
Posted by querylous at 10/20/2006 7:23:02 PM
Hi- what is the best way to launch a windows script via SQL Server trigger or other means? When we update certain tables, we want to fire a script which will generate custom text messages containing data from the database for an external system. We don't want to generate these messages on the ...more >>

DTS or SQL Server programming question
Posted by Blasting Cap at 10/20/2006 4:56:00 PM
I'm not sure exactly where this question ought to reside..... In our production environment, we have 2 sql servers that we alternate between different days production totals. For instance, on Friday, Server #1 (the primary one) will load the previous night's production totals to it for rep...more >>

Update to #tmp table hangs with no message
Posted by Joresm at 10/20/2006 4:03:39 PM
Hi, I have the following SP which is called by a previous SP, but it hangs. there are a couple fo routines liek this Insert and Update and they are both to #tmp table. they both hang. any ideas on why this happens. the env is SQL 2005 built 9.0.2153 tempdb on a seprate SAN segment and chopp...more >>

RUNNIG EXE FROM QUERY ANALYSER
Posted by at 10/20/2006 3:54:07 PM
I have a c# application. When I compile it produces exe file automatically. I want to run it from Query analyser. I tried exec master.dbo.xp_cmdshell 'C:\Inetpub\DOTNETDENEME\AlisverissaatiXMLHTTP\WindowsApplication1\obj\Debug\WindowsApplication1.exe' It returned *The system cannot fin...more >>

sql datetime overflow error
Posted by Rnt6872 at 10/20/2006 3:22:19 PM
Hello All, I have a .NET application and I'm using a SQL database on the backend.When I try to delete a record where my date is the primary key. I receive the sql dattime overflow error. I know that the date types in ..Net and SQL server are different. Is there any way that I can workaround thi...more >>



Capture Before/After Data on Multirow update statement
Posted by Ymerejtrebor at 10/20/2006 2:52:02 PM
Problem: I only get one record of before and after data when performing multirow updates from a single update statement. I want to get before and after data for ALL updated records from the update statement. How can I do this? I am using sp_trace_generateevent to capture before and after ...more >>

Is it possible to do the following with a stored procedure?
Posted by Big Daddy at 10/20/2006 2:37:11 PM
A typical simple stored procedure might look like this CREATE PROCEDURE [dbo].[GetPatients] @locationNo int AS BEGIN SELECT Name, DateOfBirth FROM Patients WHERE LocationNo=@locationNo END In this case, the parameter passed to the sproc goes into the WHERE clause of the SELECT ...more >>

Database Install Which way is best
Posted by Hank123 at 10/20/2006 2:14:02 PM
Hello, I am developing some software that will be using a SQL server to hold the database. When installing the program I will need to also install the database. I have come up with about 3 different ways to install the database but I want to know which is the best way to install it. Possibly s...more >>

Give Date Range or Start Date
Posted by atatum at 10/20/2006 1:34:33 PM
I have the query below. It works great, but the output is mm/yyyy. Basically, it will say, for example, 44/2006 for the 44th week of 2006. That really doesn't help much when I'm trying to calculate figures, etc. Can I make it either show a date range or the first day of the 44th week. So, it wou...more >>

Adding INT field to existing table and autoincrement for each record
Posted by webonomic at 10/20/2006 12:53:54 PM
I have an existing table with many records. I need to add an INT field, then for each record go from the number 1 and go up by 1 until the last record. What syntax do I use? TIA ...more >>

Counting Entries for Given Time Span
Posted by randy1200 at 10/20/2006 11:44:02 AM
Working with SQL 2005 and t-sql. I have a table with a DateTime column. I need to count the number of entries for each day between 10 pm and 2 am. I'm struggling with how to work with just the day, month, year in the select statement. If I have an entries at 10:04 and 10:06 on a given day, I...more >>

How to drop all constraints inclusing PK off all tables in a datab
Posted by Moh at 10/20/2006 11:24:02 AM
Is there something in SQL Server that will automatically drop all of the constraints of a table. I'm having to do this programmatically, and it's a lot of programming to find all the constraints first to drop them all before dropping the table itself. Thx -- Sr DBA Pier 1 Imports mab...more >>

Tricky Select
Posted by babz at 10/20/2006 8:56:04 AM
Declare @T Table (Idy Int Identity(1,1) , Col1 Int) Insert into @T (Col1) Values (1) Insert into @T (Col1) Values (Null) Insert into @T (Col1) Values (Null) Insert into @T (Col1) Values (2) Insert into @T (Col1) Values (Null) Insert into @T (Col1) Values (Null) Insert into @T (Col1) Val...more >>

filtered join
Posted by bootlegg at 10/20/2006 7:26:01 AM
Table1 and Table2 are joined where the ids from the 2 tables are equal. This works well. In addition, I would also like to retrieve all (filtered) records from Table1 not contained in Table2. Here is my query: SELECT tblBigFixExtract.DomainName, tblBigFixExtract.SystemName, tblBigFixExtr...more >>

Help on simple querry ??
Posted by serge calderara at 10/20/2006 4:32:01 AM
Dear all I have a table without any primary or foreign key and a single column 'Name'. I would like to retrive from that table the single occurs of a Name and the number of times it apperas in the tables. In other words if Bob is recorded thre time in the table I should retrive a single r...more >>

SQL GETDATE() and VBSCript NOW() return different values?
Posted by Paul at 10/20/2006 4:27:01 AM
Hi, I have a package that starts by populating globals using VBScript and one is dtmStartDateTime which I set with NOW(). At then end of the package I use a SQL task to insert values into table which takes a parameter for the date set above and uses GETDATE() for the EndDateTime. As t...more >>

FOREIGN KEY on mutiples column
Posted by JohnSaintJohn NO[at]SPAM gmail.com at 10/20/2006 3:36:57 AM
Hello everyone, I think there is something I missed with the foreign key constraint on composite primary key creation in SQL Server ... Here is my problem. I've a first table with a primary key couple defined as follow: CREATE TABLE TABLEA ( PK_FK_FirstID INTEGER NOT NULL , PK_FK_S...more >>

Copy database in Express Edition
Posted by Kungen at 10/20/2006 1:39:29 AM
Hello! I use 2005 Express edition. I'm desperately trying to copy a database, but I'm not knowledgeble enough to make it, it seems. Whatever I do, I end up with a copy that is not independent from the database it was copied from. If I right-click the new database, choosing properties, selecting...more >>

Copy DB in Express
Posted by Kungen at 10/20/2006 1:35:28 AM
Hello! I use 2005 Express edition. I'm desperately trying to copy a database, but I'm not knowledgeble enough to make it, it seems. Whatever I do, I end up with a copy that is not independent from the database it was copied from. If I right-click the new database, choosing properties, selecting...more >>

Unable to open BCP host data-file --- please help--urgent---
Posted by laravind narayanan at 10/20/2006 1:28:30 AM
hi everybody, Hi im a new member to the group. Im facing a problem when im trying to execute BCP utility.The following is my code. ---creating a view first--- create view arv as select Roc_code FROM RNS_101006.dbo.AP_MARCH where ROC_CODE= 'RC404' --im using this view 'arv' in bcp utili...more >>

Problem calculating forms per hour
Posted by Assimalyst at 10/20/2006 1:27:00 AM
Hi, I have a relatively simple select query that returns a table including a count of forms, and the number of hours between first and last form entry. This seems to work as expected, but as soon as i attempt to perform a forms per hour count, no rows are returned. Here's the query: @dateSt...more >>

trigger programming
Posted by Ulrich at 10/20/2006 1:01:03 AM
In Oracles trigger syntax you find the option .... for each row .... to process all rows of a recordset got preparing an update. Am I right supposing I have to use cursors on deleted and inserted to realize this aim with SQL-Server? -- Ulrich...more >>

Dynamically generated Autoincrement field in database view
Posted by Tj at 10/20/2006 12:29:33 AM
Hi. I was wondering if there is a way to generate (compute) an autoincrement field in a view. I need to be able to count the rows starting from 1 in the resultset, the view generates, but I don't know how to get this done. It would be nice if it was possible to have an autoincrement field as par...more >>

Backup and Restore dialogs.
Posted by Robinson at 10/20/2006 12:00:00 AM
Hi, Is there some programmatic way I can launch a Backup or Restore dialog for SQL Server (2005), kind-of like a Windows Common Dialog? I'm writing a VB.NET client, but don't mind getting my hands dirty with Interop. I'm hoping something like this exists in the API's but I can't find it. ...more >>

Is There an easyer way
Posted by Msdn at 10/20/2006 12:00:00 AM
I have created my first trigger so im a newbie. The job was to update a field in the updated row with a value which i had to find i the the same table. The trigger "sounds" like this. set ANSI_NULLS ON set QUOTED_IDENTIFIER ON GO ALTER TRIGGER [dbo].[UpdateRef] ON [dbo].[tbl_VareG...more >>


DevelopmentNow Blog