Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score Query - perhaps GROUP BY
Jon Spivey - 27 May 2006 9:36 PM - 3 messages
Hi, Using SQL Server 2000 I have a table like this Results ResultID int primary key ProductID char(10) RetailerID int RetailerPrice money Some sample data might be ResultID        ProductID        RetailerID        RetailerPrice ...
Score error-checking on INSERT
Rick Charnes - 27 May 2006 8:30 PM - 3 messages
I'm writing a simple stored procedure in which I use INSERT/VALUES.  What is the best way to do error-checking to ensure that my rows got written to the table?  Is checking @@rowcount the best way? ...
Score Trying to improve Stored Procedure
vncntj - 27 May 2006 3:14 PM - 3 messages
I wanted to know if this stored procedure was an efficient sp? CREATE Procedure p_generatedata @StartDate smalldatetime, @EndDate smalldatetime as Set Nocount on delete ttemp_data Insert into ttemp_data SELECT appeal_codes, appeal_type, appeal_code,     SUM(total_yes) AS total_yes, SUM(Pledge_Amount) ...
Score Change Notification needed in .NET
Mukesh - 27 May 2006 11:36 AM - 3 messages
Hi, Think I want an application (say in C#) that would say "Hello" when a particular table in the database get 100 rows.  For this I could use a thread that would check the rowcount in every say 1 minute.  But the ...
Score Same query...???
MUKUT - 27 May 2006 10:11 AM - 3 messages
All,     For my project purpose I need to run the following queries to find the difference in row  count.The table is situated in db1 and db2.I guess the query 1 and query 2 are same but I got different output(Pls ...
Score Transaction option
ss - 27 May 2006 9:40 AM - 2 messages
Hi, For developing a transaction-based application for a SQL 2005 database. The database option READ_COMMITTED_SNAPSHOT is set to OFF, and the database option ALLOW_SNAPSHOT_ISOLATION is set to ON. One of the transactions in application performs only read operations. To ...
Score SQL query against data on tape...
Pradeep - 27 May 2006 9:35 AM - 4 messages
Hi, We have about 10 TB of data spread across many legacy systems. We need to move it to just one SQLServer system. However, we do not wish to keep all 10 TB of data on harddisk but on digital tapes. ...
Score isolation level
MarkH - 27 May 2006 9:02 AM - 2 messages
We're using ADO.NET and SQl Server 2K. I'm updating an integer column in a seperate table which I use to hold sequence numbers for different reference strings. Together the string and int form a unique code which is we use as user ...
Score Using ranges in between operator ?
Luqman - 27 May 2006 8:41 AM - 2 messages
I want to sum the total of following ranges, saved in a table Can I do it with one single query >? Say: select sum(amount) from InvTable where InvNo between frmCode and ToCode ? Table Name: RptInfo Name       FrmCode     ToCode ...
Score Joining three Tables in Sql Server
Rajeev - 27 May 2006 8:34 AM - 2 messages
SELECT HOSTCurrencyAmt HOSTCUrrencyCode HOMECurrencyAmt HOMECurrencyCode FROM ExpenseAmounts Currencycode can be anything US Dollars, Indian Rupees, Euro etc etc. Based on the currencycode we have to update the Amounts field for e.g. IF HostCurrencyCode is US Dollars and HOSTCurrentAMt is 5, then we have to update HOStCurrencyAMt to 5 * 46 rs. This 46 (The ...
Score 'ROW_NUMBER' is not a recognized function name.
XJ - 27 May 2006 2:57 AM - 5 messages
Hi experts,   recently i download the SQLExpress 2005 version to do some testing, when i try to run a new feature which all ROW_NUMBER, but SQL give me error                   'ROW_NUMBER' is not a recognized function name. ...
Score ss2k : maxdop matters with 1 cpu ... huh ?
John A Grandy - 27 May 2006 2:12 AM - 3 messages
I have a very intensive sproc running on a ss2k instance that starts throwing intra-query parallelism errors. If I include OPTION(MAXDOP 1) after each query in the sproc, I no longer get the errors ... But the server only has 1 cpu ! ...
Score Stored Procedure
zoneal - 27 May 2006 12:08 AM - 3 messages
I have a stored procedure in MS SQL 2000 Server to insert a record in a table. I am using ADODB in VB, I get the message that the parameter is not supplied and it is expected but I have supplied all the parameters. ...
Score Select All Columns in Pivot Table
BLIZZARDICE - 26 May 2006 10:29 PM - 4 messages
Good Evening, I have a pivot query that will return the names of the columns in a columns table. However I can't seem to get it to return them all. Is there a statement I can put in the for that will return all the columns ...
Score Unicode text into my database
ionFreeman@gmail.com - 26 May 2006 9:26 PM - 4 messages
Help!    I've tried to retrieve unicode string from the file system. TextCopy doesn't work, of course, so I just took standard output from the utility that generated it using xp_cmdshell. The 'output' column of xp_cmdshell, however, seems doggedly single byte. ...
Score xp_cmdshell in SQL 2005
bwolohan63 - 26 May 2006 9:01 PM - 3 messages
I am upgrading to SQL Server 2005.  My application uses xp_cmdshell for a number of things and I need to non-sa users to be able to excute it.  I have tried turning it on via script and via Surface Area Configuration + ...
Score Index Tuning Wizard is giving error message
S R H - 26 May 2006 8:29 PM - 3 messages
Hi all, I have a query which I am trying to optomize by running Index Tuninig Wizard against it. The query is: declare @al_Dept   T_Code, @adt_Start_Date  DateTime, @adt_End_Date  DateTime, @al_Language  T_Code, @v_noofseconds  T_Code set @al_Dept = null ...
Score Replication - Replicating the contents from a view to a Table
Query Builder - 26 May 2006 6:36 PM - 2 messages
I have a complex query I use to populate reports. I need to move the reporting environment from actual production database that gets updated frequently. I have converted the reporting query into a view that pulls information from many tables with complex joins ...
Score Max() across 2 tables in one query?
lmcphee - 26 May 2006 6:28 PM - 7 messages
I have two tables (T1 and T2) in SQL 2000 DB, each with an Integer column "ID". I want to get the Max(ID) across both tables. I know I could declare variable(s) and execute separate query for each table, but I would prefer to ...
Score SSIS Problem
Shiva - 26 May 2006 6:15 PM - 2 messages
I would like your help with the Foreach loop container. Boy, am I having issues with using it for looping through an ADO.NET dataset or what!?!? My control flow has a data flow task that is executing a Data Reader task ...
Score permissions needed for trigger
Dan D. - 26 May 2006 3:51 PM - 5 messages
Using SS2000 SP4. We're using a .NET application. What permissions should be needed for a user to fire a trigger. Ideally, I wanted the user (userWill) to only have execute permissions on the stored procedures and select permissions on the views. But all views, stored procedures and triggers are qualified ...
Score Update Query Locks-up
gc - 26 May 2006 3:09 PM - 3 messages
argh... A simple update query, lots of records (38 million), fast server, this is the only thing executing on the machine. Tbl1 has a primary key and no indexes. UPDATE Tbl1     SET FldToUpdate = #Tbl2.FldToUpdate     FROM #Tbl2 ...
Score New Import/Export Wizard error
Mitch - 26 May 2006 3:03 PM - 10 messages
I am making the adjustment from SQL Server 2000 to SQL Server 2005.  In the past I have created named ranges in Excel that look like data tables (header row followed by multiple data rows) and used DTS to create database tables in ...
Score Multiple DECLARE Sections ... why?
Tom B. - 26 May 2006 2:42 PM - 3 messages
Is there any value to having multiple DECLARE sections within a single stored proc/statement block?  I understand the value of multiple DECLARE sections that are related to local variable within specific statement blocks.  However, in working with existing SP's, I run across the following on a ...
Score OPENQUERY vs. sp_executesql which is better?
Johnny D - 26 May 2006 1:24 PM - 5 messages
I have recently seen the OPENQUERY function in a stored procedure which was used to INSERT values into a table on a remote server. However, I normally use the sp_executesql stored proc. Can any one shed some light on which method is better and in what ...
Score Datalist update function creates multiple instances of updated record
mca - 26 May 2006 1:10 PM - 4 messages
Hi everyone! I am a computer engineer and have recently upgraded to .net 2005. With new data components available, I have decided to write a simple database application in order to get familiar with the new aspects of ..net 2005. ...
Score How to: Dynamic crosstab procedure without aggregate functions for text
mikecom - 26 May 2006 12:33 PM - 4 messages
Hi all Maybe somemone needs to know how to create a dynamic crosstab query without aggregate functions. The following sample is dynamic and can generate crosstab data in many variants. I could not figure out, how to insert a dynamic statement in the cursor ...
Score operation on strings in a request
samuelberthelot - 26 May 2006 11:52 AM - 12 messages
Hi, I can't figure how to do this request: I have a table that contains a field of typ ntext. The records contain the content of html pages, so the string looks like the source code of a html page: ...
Score Changing the Recovery model of the database using scripts
Saran - 26 May 2006 11:44 AM - 5 messages
Hi, I am working as a production support for SQL Server. I dont have access to use Enterpriese manage in this server, Please help me To Change the recovery model of master database using scripts. It will be great if u provide me the scripts ...
Score UPDLOCK
Olivier Matrot - 26 May 2006 10:23 AM - 5 messages
Hello All, I would like to use the UPDLOCK hint on an SQL query to prevent concurrent connexion from selecting the same records in a table. This table will contains jobs order, and the table will be processed by many clients at the ...
Score For Loop help
Shailesh - 26 May 2006 9:50 AM - 3 messages
Dear Friends, I am getting problem in the following statement. Please help. ALTER PROCEDURE dbo.Defaulters (@Stdt smalldatetime) AS declare @CNT int select @cnt = 1 FOR @cnt <= 7 Select dbo.Employee_Master.Employee_Name @stdt =@stdt +1 @cnt = @cnt + 1 Next ...
Score Copying/ Deleting Huge Data from a table
Hasan O. - 26 May 2006 9:44 AM - 6 messages
Hi, I have a problem about "userlogs" table . this table contains some information about users actions .The table has nearly 800.000.000 record in it and ~100Gb data , 50GB index. i have tried to copy some data ( like 1M records) to a temporary database, i ...
Score store procdure question
amjad - 26 May 2006 9:18 AM - 4 messages
Hi i need to write a store procdure to return records..... I have two tables both has 35 fields mean copy of each other... one table is called original table and other table called valuetobeused table... i am allow to change data in value to be used table which is fine ...... ...
Score how to get tablename in CLR-Trigger?
Helmut Woess - 26 May 2006 9:06 AM - 6 messages
Hi, i want to write an 'universal' audit trigger in C# or VB. For that i need the tablename. But i found nothing in SqlContext.TriggerContext. How can i get this tablename? thanks, Helmut ...
Score UDT in SQL 2005 and IDENTITY
Mirek Endys - 26 May 2006 8:50 AM - 2 messages
I have my own SqlUserDefinedType, for example MYTYPE. It has implemented INullable, IBinarySerialize. I have SqlFunction, that returns next possible MYTYPE Value, as like as an identity. I can use it by this way "INSERT INTO myTable(id, description) VALUES ...
Score DTS task
Win - 26 May 2006 8:36 AM - 3 messages
I've created a DTS task. I want to write VB program to execute the DTS task. How can i do it ? ...
Score Update if Delete fails
hals_left - 26 May 2006 8:16 AM - 11 messages
I want a stored procedure that wioll attempt to delete a record and if it fails because of a foreign key thats doesnt allow delete cascades and  related records, I want it to continue and do an update instread - ...
Score Cursor and dynamic slq
amjad - 26 May 2006 8:15 AM - 2 messages
hi can we use sql dynamic query with curosr like set @cur=cursor for exec(@sql) .... some thing like thanks ...
Score Whty backup master ?
hals_left - 26 May 2006 8:12 AM - 3 messages
What am I losing if I dont back it up ? I have restored main databases without master abnd it works OK, other thanm some SQL Accounts. Does it include the backup jobs, user accounts etc Thanks. ...
Score Autogenerate data
Robert Bravery - 26 May 2006 8:11 AM - 3 messages
Hi, Does any one know of a script that can autogenerate test data. Does not have to be real intellagible data at this stage, just to fill tables. Thanks Robert ...
Score Cross Referencing The Same Table
Andrew Hayes - 26 May 2006 6:27 AM - 10 messages
Hi all, I have a PERSON table that stores personal info, and a RELATIONSHIP table which just has a list of relationships. Now I want to be able to define a family by means of a crossref table between PERSON and PERSON using the RELATIONSHIP. ...
Score SQL Server 2005 SMTP and POP3 - Suggested Reading Please...
Mark Micallef - 26 May 2006 4:01 AM - 4 messages
I'm interesting in learning more about the capabilities of SQL Server 2005 integration with POP3 mail servers, but I'm having difficulty finding any good articles on the net.  I'm especially interested in (1) how the server is configured to retrieve emails from a POP3 server, and ...
Score literature for starting SQL users/ book to use SQL server as a backend for a MS Access frontend?
Philip Leduc - 26 May 2006 2:50 AM - 2 messages
Does anyone have know a good book for SQL starters 2000/2005 , not too teoritical with handson examples and sample code. I am an experienced Access VBA programmer. Would like to know how make 1) SQL VB.net applications including setting up ...
Score Problems Using a View of a View
magrimshaw11 - 26 May 2006 2:36 AM - 4 messages
Hay guys, Here's my delema.  I have been placed in charge of a custom enterprise ASP application.  We are using SQL server as the back end.  Here are two views, one selecting from the other. Most of this code I'm sure will be meaningless to most of you but I ...
Score Line 1: Incorrect syntax near 're'.
Nachi - 26 May 2006 1:28 AM - 4 messages
Hi Guys, This is my Sql Query to insert values. All the fields are nvarchar except the postcode which is Int. I have a condition if the postcode field is numeric then insert values otherwise error message. Only one of the customer gets the message on his browser ...
Score BCP in using bcp_sendrow fails, not enough columns bound
Robert B - 26 May 2006 12:43 AM - 4 messages
Hello, first posting: I am using bcp_sendrow to INSERT data from program variables into the database. I am sending less columns than the database contains, because new columns need to be added to the tables before the program is changed. ...
Score Re: Create Table In Store Procedure and inserting data with the Kalen user.
Stu - 26 May 2006 12:38 AM - 3 messages
As Mike said, don't create objects in tempdb.  However, your stored procedure is failing because the first thing you are doing is dropping a table that doesn't exist. What are you trying to accomplish? Stu ...
Score trouble connecting to a SS2K instance from SEM
John A Grandy - 26 May 2006 12:26 AM - 3 messages
For the first time, I am having trouble connecting to a SS2K instance from SEM.  All of these servers are on the same domain. I am attempting "New SQL Server Registration" using "Windows account information ..." and receiving the error "SQL Server does not exist or ...
Score insert row question
talinkio - 26 May 2006 12:05 AM - 4 messages
Hello all, my main question is i guess, is this the easiest way? INSERT INTO table1 (c1, c2, c3...) SELECT number1 AS c1, c2, c3... FROM table1 WHERE c1 = number2 Just so there is no confusion: I am only working with one table here. I ...
Score Create Table In Store Procedure and inserting data with the Kalen user.
Fernando Flamenco - 25 May 2006 11:15 PM - 3 messages
Hello. First: Sorry for my inglish. I'need create this "simple" SP I Work with (SQL 2000 + SP4) Use TempDB GO     Create  procedure DBO.ProcTest     as         drop table Tempdb..TabTest ...
Score SQL inserts random CHAR(13) into stored procedures
JustinS - 25 May 2006 11:01 PM - 24 messages
This is a very difficult problem to describe and troubleshoot because the "special character" (Carriage Return, CHR 13,  HEX 0D) I am having issues with is a control character and is not always visible in EM, QA or notepad. ...
Score Debug SProcs
Andrew Robinson - 25 May 2006 10:55 PM - 2 messages
I have both SQL2005 and Express installed on my local development machine. I am able to step in / debug stored procedures in dbs on Express just fine. Stepping into a stored procedure from within Visual Studio 2005 under the full version of SQL on the local machine pops up the "run stored procedure" ...
Score how to get the parameters information of UDFs?
nick - 25 May 2006 10:15 PM - 3 messages
I can get the list of UDF from sysobjects. Any simple way to get the parameter informations? Tx ...
Score Stored Proc Doesn't Run in Shell Script, but gives no errors
bchodo - 25 May 2006 9:09 PM - 15 messages
I have a shell script that calls an UPDATE stored proc. When I run the stored proc in QA it runs fine. When the shell script runs it, I get no error messages, but the UPDATE does NOT take place.  ...
Score Help with user defined function
Blasting Cap - 25 May 2006 8:33 PM - 7 messages
I have the following function: create function dbo.AttributesList (@Customerno varchar(10), @sold_to_sales_grp varchar(3), @attr varchar(2)) returns varchar(15) as     begin         declare @sOut varchar(15)         set @sOut = '' ...
Score Unpivot in T-SQL 2005
Mitch - 25 May 2006 8:13 PM - 3 messages
I have a table that is structured like this... Product    Item_Label     200603     200604 A123        Sales $            2389         2468 ...
Score Get last inserted PK
David Chase - 25 May 2006 7:46 PM - 12 messages
I have a table that has a computed value in the primary key (int column). The computed expression is below: (convert(int,(rand() * power(2,30)))) Does anyone know how I can get the last inserted value on this table since I ...
Score Can this be changed to a CASE construct?
Carl Imthurn - 25 May 2006 7:15 PM - 12 messages
-- First, some DDL: CREATE TABLE #TEMP (    Requirement varchar (20) NOT NULL,    ExpirationDate datetime NULL ) ON [PRIMARY] INSERT INTO #TEMP (Requirement, ExpirationDate) VALUES ('REQ1', '2006-01-23') INSERT INTO #TEMP (Requirement, ExpirationDate) VALUES ('REQ2', '2006-05-29') ...
Score Selecting a row by row number
Rudy - 25 May 2006 7:08 PM - 5 messages
Hello All! I have a table that is populated from a text file.  First row and every 13th row after  that contain the values  I need.  I couln't seperate this info before the import.  I would like to try and select the top and the 13th row ...
Score Concatenated string as parm value
Rick Charnes - 25 May 2006 6:28 PM - 6 messages
In my main proc, I'm calling a secondary proc MYPROC that takes an argument.  How can I use a concatenated string with variables for this argument?  This generates an error: EXEC MYPROC 'Hello ' + @myname Thanks ...
Score [OT] User-Defined string Functions Transact-SQL
Igor2004 - 25 May 2006 6:00 PM - 2 messages
Ladies and Gentlemen, I am pleased to offer, free of charge, the following string functions Transact-SQL: AT():  Returns the beginning numeric position of the nth occurrence of a character expression within another character expression, counting from the leftmost character. ...
Score Line Feed in Text Box on rdl file
Adi - 25 May 2006 5:18 PM - 3 messages
I am triyng to add a line feed char to my DB string which is assigned to a text box, cant figure out how. Line One"\n"Line Two ...
Score using variable with quotes - do I need to use QuoteName?
Rich - 25 May 2006 5:13 PM - 4 messages
I need to select the following select * from tbl1 Where fldx In ('A', 'B', 'C') --this returns 10 rows in my example Declare @s varchar(30) Set @s = '''A'', ''B'', ''C''' Print @s This prints 'A', 'B', 'C' Declare @s varchar(30) ...
Score SQL Query HELP!!!
jaawaad - 25 May 2006 4:31 PM - 28 messages
I have a simple query which combines the two table and looks for similiar fields and return the result. select t1.fld1, (t1.fld2+ t2.fld2) from Table1 t1, Tablet2 t2      where t1.fld12.fld1                and t1.hour = 10 ...
Score Linked Server VFP, error OLE DB
Michel LEVY - 25 May 2006 4:18 PM - 5 messages
Hi, SQLExpress on Windows XP SP2, authentification mode Windows I trie to link a Visual FoxPro database with OLEDB provider (yet installed) That query : EXEC master.dbo.sp_addlinkedserver     @server = N'MyLinkedServer',     @srvproduct=N'Visual FoxPro 9', ...
Score Please Help ... Can't Figure This One Out
James Walker - 25 May 2006 3:59 PM - 3 messages
Greetings, I need to write a SQL stored procedure to accomplish the following and I'm not having any luck. So that I don't confuse anyone too much, I'll leave out the code I'm trying and just explain what I'm trying to do. ...
Score Quotation marks
MittyKom - 25 May 2006 3:53 PM - 7 messages
Hi Can someone tell me what i am doing wrong below: ...
Score Need help with a query
Bob - 25 May 2006 3:35 PM - 3 messages
This is the table creation script from sql 2005. USE [MYNEWDB] GO /****** Object:  Table [dbo].[licQuartsChauffeurs]    Script Date: 05/25/2006 10:09:45 ******/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO CREATE TABLE [dbo].[licQuartsChauffeurs]( ...
Score Dummy Keyword in SQL Server
DUMMY Keyword in SQL Server 2000 - 25 May 2006 3:34 PM - 2 messages
Hi SQL Server 2000 has an undocumented key word called DUMMY. Does anybody know how this could be used ? Thanks ...
Score error handing and IGNORE_DUP_KEY
Panos Stavroulis. - 25 May 2006 2:56 PM - 10 messages
Hi, I've got a table where I've intentionally have a IGNORE_DUP_KEY index to ignore duplicates rows so don't have to check for it programmatically with exists etc. This is the proven faster solution. The problem is that there is an warning being generated saying duplicate key ...
Score Query to Return Duplicate Number of Records Based on Value in Fiel
tomt220 - 25 May 2006 2:41 PM - 3 messages
Hello, I would like to write a single query to return the multiple copies of the same record, based on information contained in the field of one of the records. So, for example "I have a record with a field named x with a value of 3." ...
Score use column value subquery
Nano - 25 May 2006 2:39 PM - 4 messages
Hi, Is it possible to use a columnvalue in a subquery? Like this: SELECT id, tablename, columnname, description, (SELECT Count(columnname) FROM tablename) as recordcount FROM tableobjects Obviously where "columnname" and "tablename" in the subquery should be the values from columns in "tableobjects". ...
Score Limiting Rows in a Report
lucky - 25 May 2006 1:47 PM - 3 messages
I am having a table with 100 rows and i want to prepare a report in a way that each page in the report want to display 10 rows in a page of the report please say me the procedur for this . ...
Score Using Materialized Path to create a paths table
Matthew Brealey - 25 May 2006 1:41 PM - 14 messages
I wonder if anyone has any thoughts on using the materialized path as an intermediate step to create a kind of paths table to represent a tree hierarchy Here are some records EmployeeId   ParentEmployeeId   MaterializedPath 1                   <null>                    1. ...
Score call database Maintenance plan from Sql Server Agent->Job
Ganesh - 25 May 2006 10:25 AM - 4 messages
Hi There can i call database Maintenance plan from Sql Server Agent->Job what i'm trying to do I've to truncated records on log table, then shrink all databases the call maintenance plan to take all database backup ...
Score Nullable column in composite natural key
decland - 25 May 2006 9:19 AM - 39 messages
I think this one is best explained with an example. Consider tables of employees (stripped of all but employee number), payroll (retains earnings history, null end_date indicates the current period, basic constraints only e.g. tests for contiguous periods omitted) and the Birthday Cake Club (open to current earners only): ...
Score Working with both 2000 and 2005
Craig HB - 25 May 2006 8:05 AM - 7 messages
I have 2 servers: one with SQL Server 2000 and another with SQL Server 2005. (1) Databases on SQL Server 2000 need access to data on the 2005 server (2) A database on the SQL Server 2000 to insert data into a database on the ...
Score Triggers?
Hennie - 25 May 2006 7:18 AM - 4 messages
I have a table tabRate with the follwoing columns RateID int (PK) MarketTypeID int (FK) Rate decimal ValidTo datetime If a row is inserted, updated or deleted with a specific MarketTypeID (22) I want to insert update or delete a row in the same table with a MarketTypeID ...
Score Can we do the Validations in bcp format file
Veeru - 25 May 2006 5:39 AM - 2 messages
Hi I need few clarifications. I am using bcp 9.0 tool to load the data into the table in SQL Server 2005. Can we do validations in bcp format file. The validations like 1. if the datafile field data is "ABC" I want to insert the data into table ...
Score Can we specify the format of the date field in Format file
Veeru - 25 May 2006 5:00 AM - 9 messages
Hi We are using Format files to load the flat file data into the table in SQL server 2005 and using bcp utility (version 9.0). Can we specify the format of the date field in Format file to load the date ...
Score Previous row calculations using SQL
mmonis - 25 May 2006 4:21 AM - 6 messages
Hi, I need help in writing a SQL, where in a calculated column depends on previous's row column, for example, Table: test Time Pkts Seq_no --------------------------------- 10:00 20 25 10:01 15 40 10:02 17 57 10:03 10 60 ...
Score How to identify one sql server installation to another
Edward Low - 25 May 2006 3:27 AM - 4 messages
Hi All, How can we identify one sql server isntallation to another installation? For example, installed sql server into a station, later remove it, then installed again. How can we differential this 2 different installations? Best Regards, Edward ...
Score Equivalents For sysdatabases and syslogins?
Derek Hart - 25 May 2006 2:26 AM - 7 messages
Are there equivalents for sysdatabases and syslogins that are guaranteed in future versions of SQL Server? ...
Score Row Correlated calculation Query
mmonis - 25 May 2006 2:21 AM - 4 messages
Hi, I need help in writing a sql, where a calculated column depends on previous's row column, for example, Table: test Time      Packet Seen    Seq_num --------------------------------- 10:00     20             25 ...
Score Updating SSN column with incrementing numbers
danlin99 - 25 May 2006 12:47 AM - 3 messages
Hi, I need to desensitize our employee table by upating the SSN_ID column with 9 digit incrementing numbers.  TIA Example: Empl_ID    SSN_ID 7100         000000001 7101         000000002 ...
Score Copy database from an Sql server to another
pedestrian via SQLMonster.com - 25 May 2006 12:14 AM - 6 messages
How to copy a database from one server to another? Regards Pedestrian ...
Score Converting negative numbers to positive
MittyKom - 24 May 2006 11:41 PM - 7 messages
Hi All I have a table with  column Col2 with negative and positive numbers. I would like to query the col2 and  make sure all the negative numbers are converted to positive in the resultset.  eg Tb1: ...
Score best/fastest why to do this - high level
John Smith - 24 May 2006 10:30 PM - 8 messages
Hello Here is table       FileID FileType DateCreated Active       1 Revised 1-Jan-06 1       1 Revised 2-Jan-06 1       1 Created 3-Jan-06 1 ...
Score OUTER JOIN issue
FJC - 24 May 2006 10:24 PM - 4 messages
The following stored procedure was created by one of our developers and it's taking too long to be executed, we already identified that the section of the coding with the problem are the outer joins, can anybody suggest something to ...
Score Deleting a login account
scott - 24 May 2006 9:54 PM - 3 messages
I'm getting the below error when trying to change a few properties for a login account. If I delete the login from Ent. Manager and then create a new login with the same name, I get the same error. ...
Score MS SQL Server 2000 - Run query as a different user
Dmitri Shvetsov - 24 May 2006 9:12 PM - 2 messages
Can we run some query as a different user working with MS SQL Server 2000? For example if we connected to the DB in the Enterprise Manager as User1, can we run some query as User2? We need to select from a VIEW pulling data from some DB, we can encrypt the ...
Score Permissions
Dmitri Shvetsov - 24 May 2006 8:56 PM - 6 messages
All, How can we grant the permissions to the user to SELECT from some view on one database which is pulling the data from several tables on another database but hide the structure of these tables for this user? The problem is the ...
Score For Each Loop Container in SSIS
Shiva - 24 May 2006 8:52 PM - 2 messages
Is anyone aware of any good links on how to use the For Each Loop Container for ADO.NET dataset? Thanks, SHiva ...
Score Help with SQL query
dan_williams@newcross-nursing.com - 24 May 2006 8:42 PM - 2 messages
I have a ContactTypes table as follows:- ContactTypeId int PK ContactType    varchar(50) I have several different types of contact types (i.e. Invoice, Business, Manager, Home, etc). I have a Client table as follows: ClienttId int PK ...
Score View for accumulate data
Feches - 24 May 2006 8:28 PM - 4 messages
Hi all,   I have a table with product in/out and I need to calculate my stock at any date.   For example: Date        Product    IN/OUT 01/05/2005    1        5 ...
Score Need help with poorly performing SPROC
Corky - 24 May 2006 8:26 PM - 7 messages
I have a SPROC that gradually slows to a crawl. It processes roughly 38,000 records from a staging table, makes some alterations to data, and subsequently calls other SPROCS to either insert or update production data based on what is in the staging table. ...
Score Check for constraint on delete
hals_left - 24 May 2006 8:10 PM - 2 messages
How do you code a  procedure to delete a record where if it has an error (because of foeign key constraint , no cascade and related records) it will continue and do an update instead. I have tried this but it doesnt continue if the delete hits an error. ...
Score watching a column value
hugonsantos - 24 May 2006 7:42 PM - 4 messages
Hi! I would like some help on creating a trigger to watch a column value. The objective is the following: when a values is equal to 1 for 5 seconds or so, change it to 0. Thanks Hugo ...
Score Update integer value based on "group by" clause
dw - 24 May 2006 7:40 PM - 2 messages
Hi, all. We've got a table that looks like this, CREATE TABLE [tblApplicantRef] ( [UserID] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Position] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL , [Confirmation] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL , [ApplicationDate] [datetime] NULL , [Rating] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ...
Score trailing spaces in columns
David - 24 May 2006 7:40 PM - 5 messages
How can I the number of trailing spaces in a colum of the table? Thanks! ...
Next »