Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score SQL to synchronize two tables
Edgard L. Riba - 20 Aug 2005 9:12 PM - 5 messages
Hi, This is probably a common requirement, but I need help in getting this going. I have a table declared as CREATE  TABLE iTransRow ( idLoc                      TINYINT NOT NULL, ...
Score SQL Statement Help - Concatenate String
Craig Parsons - 20 Aug 2005 7:55 PM - 9 messages
Folks,       Hope someone can help me, in a bit of a muddle and trying to find the most efficient solution!  Basically I have a table which has two fields (which I am interested in): ...
Score executing SP
simon - 20 Aug 2005 2:09 PM - 4 messages
I have stored procedure with parameters. Can I exec stored procedure somehow with result set of select statement, for example: exec dbo.myProcedure (select par1,par2,par3 FROM myTable) Or I must declare each parameter: declare @par1 int,@par2 int,@par3 int ...
Score owner advice
Keith G Hicks - 20 Aug 2005 1:07 PM - 4 messages
I'm not an expert so please be gentle if I say anyting incorrect in here. Just looking for advice. Not any specific problem right now. I'm working on a db that will be run independently in several offices. The owner of every ...
Score self repair?
Keith G Hicks - 20 Aug 2005 12:51 PM - 12 messages
Someone mentioned to me that they heard about a self-repair feature that can be set up in MS SQL 2k. I did some hunting in BOL, on the web and in these NGs and didn't find anything. This person had a couple of power outages in ...
Score Weired Problem
jsfromynr - 20 Aug 2005 11:22 AM - 5 messages
Hi All,      I am trying to insert rows from two tables which are having same number of rows with similar schema (except constraints) so I mean two tables One having constraints and another not having any constraints ...
Score can someone improve this
simon - 20 Aug 2005 10:18 AM - 3 messages
Case of study: I have warehouse which stores items. Wharehouse has defined different locations - location is represented with locationID. (location has also type and distance - that is the distance in meters from start position, but this data is used just for order) ...
Score -- 'password' was found in the text of this event.
Jonathan Allen - 20 Aug 2005 4:05 AM - 9 messages
-- 'password' was found in the text of this event. -- The text has been replaced with this comment for security reasons. Where can I find more info on this? Particularly, how to turn it off on our development machines. ...
Score How to trap an error from insert ?
Tam Vu - 20 Aug 2005 3:52 AM - 11 messages
When inserting rows from a staging table to a production one, I need to convert a column of type varchar to type int. Often there're rows that have junk data in this column and that makes convert() fail. Is it ...
Score Columns referenced inside store procedures may not exist issue
Peter - 20 Aug 2005 1:33 AM - 2 messages
I have a stored procedure which I want to be added to 2 different databases. However, I run into an issue that some statements in the stored procedure are referencing columns only exist in one of the databases. I want to SQL Server ...
Score Selecting MAX per group
Dave - 20 Aug 2005 12:40 AM - 2 messages
I have the following table and I need to extract the maximum price for each billitem (i.e., A-69 and B-174). Can anyone give me some pointers on how to do this in T-SQL? billitem    itemquantity    unitprice ...
Score Grid display
tshad - 20 Aug 2005 12:19 AM - 9 messages
How would I take a bunch of records and make it display in a Grid Format (actually going to go into a DataGrid) in one select statement - or can you? If I have 12 records: CREATE TABLE [dbo].[Rentals] ( [RentalID] [int] IDENTITY (1, 1) NOT NULL , ...
Score Like vs =
John - 19 Aug 2005 11:48 PM - 9 messages
Hi Is there a major speed difference if WHERE col like 'abc%' is used against WHERE col = 'abc' in a select statement in stored procedure? Thanks Regards ...
Score Who is the owner of dynamic job created in my sql server from my ASP.NET app?
J-T - 19 Aug 2005 11:36 PM - 6 messages
From my ASP.NET app (which is impersonating under a domain account) ,I am trying to call an stored procedure which creates a temporary job and then delete it. Dose any one know what type of permission do I need to execute ...
Score T-SQL Question
MS User - 19 Aug 2005 11:22 PM - 8 messages
I need to execute a sql Select (A.JanSalary * 20) as JanSal,            (A.FebSalary * 20) as FebSal,            (A.MarSalary * 20) as MarSal, ...
Score Client Side Cursor and CommitTrans
Scott Meloney - 19 Aug 2005 9:44 PM - 2 messages
I am trying to trap an error using VB6, ADO 2.8 and SQL Server 2000.  Using a client side cursor, if I pull the ethernet cable just before issuing a CommitTrans statement, the CommitTrans succeeds anyway.  I cannot get the ...
Score Procedure
Manny Chohan - 19 Aug 2005 9:28 PM - 3 messages
Guys, Would this be a ideal procedure? Somehow my program is ffailing but i cant find out if it is in procedure or my program. CREATE PROCEDURE dbo.sp_approveDocument @uniqueid int, @approvedby char(15), @documentid int output AS INSERT INTO ext_DocumentCenter (CategoryID, DocumentTitle, Description, ...
Score Update an image column with new image from file
dw - 19 Aug 2005 9:22 PM - 5 messages
Hello... I have a table that contains an Image column.  I will be receiving updates from a user with some new images and I will need to update the table using these new images (.jpg) format. I looked at the BII utility...which looks great, but it only handles the ...
Score Query Speed
jmeyers - 19 Aug 2005 8:41 PM - 18 messages
I've got a query that does a select of specific fields from a table.  I'm finding that when I trim down the record length to approx 793 bytes, the query returns approx. 14,000 records in 1 second.  When I go over the 793 ...
Score execute .exe from sql 2000
atx - 19 Aug 2005 8:39 PM - 2 messages
Hi, I have a table where an application logs user events. I want to trigger or execute another .exe from sql 2000 server when there is a new record in the table. I want to execute/trigger the .exe for each new record, where .exe ...
Score Changing SP Owner
Rich - 19 Aug 2005 8:20 PM - 6 messages
I maybe using this command incorrectly but here goes:            exec sp_changeobjectowner 'usp_get_blindedversion', 'dbo'. I want to make this stored procedure created by a developer to owner=dbo. I cannot get this to execute, the error is "Object usp_get_blindedversion ...
Score creating a udf
bagman3rd - 19 Aug 2005 8:05 PM - 2 messages
I have built a query to parse the first 4 chunks of data in a string for natural alphanumeric sorting, and would be extremely and eternally grateful if someone could show me how to turn this into a function that I could use ...
Score Order of maintenance procedures?
Stephanie - 19 Aug 2005 7:47 PM - 11 messages
What is the suggested order for these procedures if they all have to be run once on a weekend WITHOUT dependencies? 1) DBCC DBREINDEX all user database indexes based on a logical fragmentation threshold 2) sp_updatestats on all user databases ...
Score Selecting Data from one DB and Inserting into another DB
Danny Cary - 19 Aug 2005 7:13 PM - 4 messages
Is it possible to use a stored procedure to select data from one database and insert the data into another database? The stored procedure would be located in the database from which the data would be selected. ...
Score estimate table spaces
Britney - 19 Aug 2005 6:22 PM - 4 messages
hi guys, sp_spaceused 'table1' I have two ntext columns in 'table1', by default, is sp_spaceused calculating space for ntext too? ...
Score Need help changing database dynamically
Sydem - 19 Aug 2005 6:03 PM - 4 messages
I have the following code.  I basically want to dynamically empty all data from every user table in every user database.  I have the code that processes all the databases I want and then gets all of the tables I want.  My problem ...
Score xp_cmdshell and mapped drive
bluemug - 19 Aug 2005 5:57 PM - 2 messages
Hi there, I've seen a lot of discussions around using xp_cmdshell to access a mapped drive. My problem is a little bit different. I have a local mapped drive F:. I have no problem accessing the drive from command ...
Score Stored procedures in an n-tiered environment.
tshad - 19 Aug 2005 5:55 PM - 19 messages
How are people dealing with SPs in an n-tiered environment? If you have x number of machines and they all have to have the same SPs, how do you deal with changes to the SPs? Do you make changes to one Server and then copy them to the rest? ...
Score how to generate test data in fastest way
Britney - 19 Aug 2005 5:19 PM - 2 messages
Hi guys, I try to insert 1 million rows into an empty table, test table. but it takes too long to insert 1 million row. how can I make it faster? DECLARE @number INT SET @number = 0 WHILE  @number <1000000 ...
Score a really bad ordering problem
Lynn - 19 Aug 2005 5:17 PM - 11 messages
I've been on this one for more than a month.  I've tried it countless different ways, but it's just not happening.  It's an ordering problem.  I want this:         20 2Yr, 45 3Yr, 3 5Yr, 42 10Yr, 2 30Yr ...
Score retriving data from a temporal table
Jorge Lozano - 19 Aug 2005 4:14 PM - 5 messages
Hi , I've created a stored procedure wich creates a temporal table (called #results) , then i fill the table with data and finally at the end of the procedure i make a "Select * FROM #Results" . When i execute the procedure from the query analizer  i can  get the data ...
Score Performance penalty for LIKE when I really mean Equal?
BBM - 19 Aug 2005 4:14 PM - 4 messages
Hi, I have a situation where I can retrieve either all the rows in a table or just some of them based on a "type" field in the row.  The type of the rows to select is passed as a parm to the method that retrieves the rows.  If the ...
Score change collation of a type of text column
Imre Ament - 19 Aug 2005 4:11 PM - 4 messages
Hi! I have to change a complate database collation. After I had changed the database collation I go through the tables and its columns and make a DDL command on collated columns : "ALTER TABLE table ALTER COLUMN column text COLLATE Hungarian_CI_AS NULL" ...
Score IF ELSE in a select statement
Bruno - 19 Aug 2005 3:54 PM - 6 messages
Hello friends Is there any possible to use a if.. else in a select statement? for example select ,field_a          ,field_b          , if field_a like 'TEST' then field_c else field_d ...
Score Design Question
Jake - 19 Aug 2005 3:16 PM - 2 messages
We have a third-party application that I want to extend.  It used MS SQL as a backend and I want to add new custom tables to the db.  Is it bad practice to add custom tables to the live db?  Or should I create a seperate db to ...
Score Rollback an ad-hoc query from QA?
Mnemonic - 19 Aug 2005 2:53 PM - 7 messages
Just curious how could one rollback an ad-hoc query executed from Query Analyzer? The analyst did not use any BEGIN TRANSACTIONS statements, just a simple Update statement with too broad criteria. Does this mean the query is committed as soon as it completes and we would have to ...
Score Could not find database ID 102.
Simon Worth - 19 Aug 2005 2:36 PM - 5 messages
I have an update statement that I'm running - for getting unit testing results.  For some reason this particular update statement returns an error that I can't explain. The error message is Server: Msg 913, Level 16, State 8, Line 1 ...
Score simple .sql question
Amil - 19 Aug 2005 2:18 PM - 4 messages
hi all, how can i call a .sql script from the Query Analyzer?  I know I can open the script and run it.  I want to test a my code but need to initialize the tables everytime (which is what the .Sql script is doing) i run it.  so i was ...
Score Executing an application from a query
harry - 19 Aug 2005 2:15 PM - 9 messages
Hi All,            Is it possible to execute a file or perhaps send a call to a webpage using an SQL query? Does anyone know of any such feature. Basically I need to call a webpage(coldfusion script) from my query and ...
Score Strange error with varchar(200) - fixed with varchar(100)
ianh - 19 Aug 2005 1:57 PM - 5 messages
I am moving a database from SQL7 to SQL2000. One of the tables is structuredas follows : Create table TestEmployeeDetails( EmployeeNumber  varchar(20), EmployeeFirstName varchar(200), EmployeeLastName varchar(200) ) (Don't ask me why the designer wanted 400 characters in total for a name, ...
Score SQL Data Conversion Question
Yosh - 19 Aug 2005 1:44 PM - 2 messages
I have a column in a table that is a data type varchar. I am copying that data to another table's column that is nvarchar. The lengths are the same. I understand the differences between the 2 types BUT do I need to explicitly convert the varchar to nvarchar data type? ...
Score Calculated fields with Days/Dates
CJM - 19 Aug 2005 1:38 PM - 7 messages
Preface: This is a bit of a long read, but if I cut too many corners it would all sound like nonsense, so apologies in advance. I'm working on application where customers may have a nominated carrier to deliver goods to them on one of several given days. The carrier will collect ...
Score A Trigger Question
Serdar C. - 19 Aug 2005 1:07 PM - 4 messages
hello there, i am trying to write a swl trigger for update in my database application... there are 2 tables like this: Table1: Stock             Column1: StockCode             Column2: Stockquantity ...
Score Newbie: conditional UPDATE syntax
AlexT - 19 Aug 2005 12:52 PM - 7 messages
Folks I have a table with four fields PK Field1 Field2 Status I'd like to write an UPDATE query (err, stored proc) that set the value of Status to 1 if field1 < fiel2, to 2 if both fields are equal and to ...
Score Remove Cursor
Pradeep Kutty - 19 Aug 2005 12:52 PM - 5 messages
Hi all, I have a table A with 2 cols one id and the other linkedids separated with pipe "|" id    linked ids 1    4|5|6 2    9|10|11 I want the output as without using cursors or while loop.. ...
Score What is Difference WHERE and HAVING in SQL SERVER
DMP - 19 Aug 2005 12:37 PM - 4 messages
Hi, What is the difference between WHERE & HAVING and Proper uses of HAVING ? ...
Score Display rows as columns
Renjith - 19 Aug 2005 12:00 PM - 5 messages
Hi i have a table like Id , ColumnName   group 1    C1                   1 2    C2                   1 ...
Score help with Rollback Transaction
hals_left - 19 Aug 2005 11:54 AM - 5 messages
Hi, I have a stored procedure that has the following stages - 1,Start a Transaction 2,Retrieves a Primary key of a customer based on a sales ID 3,Create a master Invoice record 4,Retrieves the Primary Key value of the Invoice ...
Score backup
Vanitha - 19 Aug 2005 10:16 AM - 2 messages
Hi friends, I don't have master db has backup itself. Now how to rebuild the db? Thanks in advance vanitha ...
Score Is This a Correct Method ?
jsfromynr - 19 Aug 2005 8:43 AM - 7 messages
Hi All,    While inserting date value I wish to take only date part So I tried this Create Table JTrial (     XYZ int,     d datetime default convert(varchar,getdate(),112) ) insert into JTrial(XYZ) values(1) ...
Score how to write query
Yoshitha - 19 Aug 2005 7:34 AM - 2 messages
I have a table with the fileds  empid,empname,designation,branch.. etc I have 5 types of  designations CEO,BM,PL,Tester,and PRG and the two branches those are Hyderabad and Visakhapatnam i need the query like ...
Score Result substitution in query when null (not COALESCE)
AlexT - 19 Aug 2005 6:47 AM - 3 messages
Folks I have a typical Parent / Child table relationship. I have a field that is always present in Parent but only sometime in Child (the idea is to override de Parent value for a specific Child line). Now I'd like to query Child and, when the said field is null, have ...
Score One Small Question regarding Date Format
kishor - 19 Aug 2005 6:01 AM - 11 messages
I hav a very small application, which insert some date related data in sql server. But tht application while inserting date time values. on some server gives error. because datetime format of machine/server is different. I want to make ...
Score Update Trigger - how to cacptures only changes
Ben - 19 Aug 2005 4:35 AM - 5 messages
Hi, I've created a trigger to capture 2 fields (f1 and f2). I did and check by using If update(f1) or update(f2) then only firing the trigger to create old and new image. But, this trigger will be fired eventhounght the f1 and f2 value did not ...
Score Automating database changes
thomson - 19 Aug 2005 4:30 AM - 10 messages
Hi all,        In our development centerwe do have a development database, Test Database and a release database,the development database goes frequent changes , creating new tables,new fields, new relationship, as it is spanned among 20 developers, we are not able to track down these ...
Score Trapping CommitTrans - returns success even when failed!
Scott Meloney - 19 Aug 2005 1:57 AM - 2 messages
Using VB6, SQL Server 2k, ADO 2.8, I am trying to implement an error handler for ADO CommitTrans.  I pause in the middle of transaction, pull the network wire, then write more records and call CommitTrans.  It completes without ...
Score Dangers of update statement
Michael C - 19 Aug 2005 1:52 AM - 14 messages
I'm always a bit concerned when doing an update statement in case there is a bug that causes it to update an entire table or too many records. Out of all the programming techniques the update statement would have to have close to ...
Score Multiple selects in sp
John - 19 Aug 2005 1:31 AM - 4 messages
Hi In a stored procedure, is it possible to check if an input parameter value has been supplied by user? Furthermore if a parameter's value is supplied then execute one select statement, if no value is supplied then use a second ...
Score Xfer of data offsite
tshad - 19 Aug 2005 1:05 AM - 3 messages
I have a system which is going to be talking to other sql servers and am looking at various options on transfering data realtime.  Mainly this is going to be for changes in the database (a persons name or status as well as ...
Score DTSRun Won't
rchrismon - 19 Aug 2005 1:01 AM - 1 message
I have been successful at setting up three or four DTS packages to run using the DTSrun command line utility and the Windows scheduler until now. The latest package gives me the following error no matter what I try. Error:  -2147217355 (80041035); Provider Error:  0 (0) ...
Score List All Instances of SQL Server
Ken - 18 Aug 2005 11:22 PM - 5 messages
Hi all, I am trying to generate a list of all available SQL Servers (named instances and all) on a network.  I have seen over and over again to use SQLDMO or isql -L.  The problem that I am having is that these methods only seem to want to ...
Score Internal SQL Server error
Colin Dawson - 18 Aug 2005 10:38 PM - 1 message
Hi all. I think that I may have found a bug in SQL Server SP4!  The problem is that I'm trying to insert data into a table which is referenced by an indexed view.  I haven't got the command to hand, but it's a nasty little beastie ...
Score Slow Stored Proc
EradicusMax - 18 Aug 2005 10:31 PM - 7 messages
I have a stored proc that can take 30 minutes to run. In QA it takes only 30 seconds. Once complete, however, the execution plans are essentially the same. My other similar SP's don't have the issue and I've dropped and ...
Score Track Modification Time
- Steve - - 18 Aug 2005 9:47 PM - 6 messages
In my table I have a column that is MODIFY_DATE.  I'm trying to track when the row was last updated.  The default value on the column is getdate() so I do know when the row was inserted. ...
Score How to test a string for numeric?
Snake - 18 Aug 2005 9:21 PM - 3 messages
How do I test if a varchar column contains a numeric value? ...
Score SQL Help
Yosh - 18 Aug 2005 8:58 PM - 5 messages
Let's say I have a column that is a varchar(3). What is the best way to pad result with 0's where length is < 3. Column        Result -----------        --------- ...
Score Stored Procedure
tp - 18 Aug 2005 8:50 PM - 5 messages
Greetings, I have a stored procedure that I would like to use. It currently gives an error message and I am stumped. Would any one be able to help get this procedure to work for me. CREATE PROCEDURE reports.mp_getuserfpsfigures ...
Score Simple Query Question
pmud - 18 Aug 2005 8:08 PM - 7 messages
Hi, From Invoices table I want to select those rows where Doc_no in those rows is same. What will be the query for this? Thanks ...
Score Login failed for user 'NT AUTHORITYNETWORK SERVICE'
ninel - 18 Aug 2005 8:06 PM - 2 messages
I am trying to execute a DTS package from vb.net. On my local machine I had no issues, but as soon as I uploaded to my company's server I received the following error "Login failed for user 'NT AUTHORITY\NETWORK SERVICE'". I searched on google and found someone's solution: I executed this statement: exec sp_grantlogin N'NT AUTHORITY\NETWORK SERVICE' I don't receive the 'NT AUTHORITY\NETWORK SERVICE' error anymore, but now get this error: "Cannot open database requested in login 'timeControl'. Login fails." Does anyone have any ideas???? ...
Score Login failed for user 'NT AUTHORITY\NETWORK SERVICE'
ninel gorbunov via SQLMonster.com - 18 Aug 2005 7:48 PM - 4 messages
I am trying to execute a DTS package from vb.net. On my local machine I had no issues, but as soon as I uploaded to my company's server I received the following error "Login failed for user 'NT ...
Score QUERY OUT - SQL SERVER 2000
Macisu - 18 Aug 2005 7:39 PM - 3 messages
I am using the following --COPY DISK DECLARE @FileName varchar(200),         @bcpCommand varchar(2000) SET @FileName = REPLACE('C:\OUTPUT\'+CONVERT(char(8),GETDATE(),1)+'.txt','/','-') SET @bcpCommand = 'bcp "SELECT Column COLLATE SQL_Latin1_General_CP437_CI_AS FROM civ..SALIDAserfi ORDER BY Id " queryout "' ...
Score Stored Procedures for beginners
wnfisba - 18 Aug 2005 7:38 PM - 3 messages
I need to create a stored procedure across multiple databases for a Crystal Report;Crystal version 8.0.1.0. Even then, I don't know if the 8.0 version of Crystal will enable me to use a stroed procedure across databases. ...
Score sp_xml and memory usage
AsaMonsey - 18 Aug 2005 7:23 PM - 3 messages
We have a process that accepts a small XML message from an external application and passes into SQL Server.  Our database used sp_xml_preparedocument and sp_xml_removedocument.  We pay close attention to make sure that all of our handles are "removed" ...
Score SQL view giving wrong result
David Chase - 18 Aug 2005 6:53 PM - 6 messages
Below is the code for my SQL View.  I am trying to compare the actual amounts in a table with a calculated amount to find differences. When I run it, the column named MedDiff is giving 9.99999E-03 as a result.  Do I need ...
Score ADO notification
Nigel - 18 Aug 2005 6:15 PM - 1 message
I'm using  query notification to call me back when there are changes on a table. This all works fine on one of my tables , how ever what I would like to do is for it fire on MSmerge_contents. ...
Score CASE Statement Opinion
WebBuilder451 - 18 Aug 2005 5:59 PM - 5 messages
I have the following case statement: CASE (i.idxhstRSXOPos - i2.idxhstRSXOPos)     WHEN 0 THEN 'md2'     ELSE         CASE i.idxhstRSXOLastAct             WHEN 1 then 'mdG' ...
Score Multiple Same indexes same table
tshad - 18 Aug 2005 5:54 PM - 3 messages
I was looking at Northwind and noticed that some of the tables have the same index, but different names on the same table. For example, on the Orders table you have the following script: **************************************************************************************** CREATE TABLE [dbo].[Orders] ( [OrderID] [int] IDENTITY (1, 1) NOT NULL , ...
Score Advanced Execution Plan Question
Mike Jansen - 18 Aug 2005 5:53 PM - 2 messages
I have a scenario where I have 3 tables joined together.  The first is the "main" table that will define the result set.  The second is a lookup table; the main table has a foreign key to it.  The third is a detail table; it has ...
Score Datatype question
HP - 18 Aug 2005 5:49 PM - 3 messages
What is the difference between decimal(9) and decimal(9,0)? Thanks! ...
Score Transaction log
DBA - 18 Aug 2005 5:47 PM - 7 messages
I have a weird issue. I need to be able to see my transaction log for SOX reasons. We have purchased Log Explorer from Lumigent to do this. However, on different databases, we see see differing lengths of data. Some we can see ...
Score Day of the week
qjlee - 18 Aug 2005 5:31 PM - 4 messages
I have a table whcih contains order Id (orderid_c), and order date (orderdate_d). Is there anywhere I can program to count the number of order from Monday to the day the report is run, for example, when I run the report on Wednesday, ...
Score INDEXPROPERTY IndexDepth vs. SHOWCONTIG Level
Stephanie - 18 Aug 2005 5:25 PM - 1 message
Is INDEXPROPERTY(<table id>, <index name>,' IndexDepth') the same value as DBCC SHOWCONTIG TABLERESULTS output column 'Level'? ...
Score Inserting Non-duplicate rows?
Rich - 18 Aug 2005 5:11 PM - 4 messages
say tbl1 is a data pickup table and tbl2 is the archive table.  tbl1 and tbl2 have almost the exact same structure (except tbl2 has an identiy column and tbl1 does not) - these are denormalized tables - to ensure that all the data ...
Score How to Obtain A Job Name
Tom Frost - 18 Aug 2005 5:01 PM - 2 messages
I have a common stored procedure that is called from any number of Jobs and I'm looking to determine if theres any way that the stored proc using SQL  can determine the ID of the job which executed it so I  can go out to ...
Score estimate size of table based on number of rows
Britney - 18 Aug 2005 4:36 PM - 9 messages
Hi everyone,     This might be a tough one, I don't know if this is doable. Basically I want to create a stored procedure to return estimated size of a table. because I don't know how many rows it will have in the future,  I want to ...
Score [OT] SQL Humor
Mike Labosh - 18 Aug 2005 4:34 PM - 107 messages
I am sure many of you folks are already subscribed, but for those who are not, here's a story of some DBA job interviews of candidates that should just be summarily shot: (This will wrap) [link] ...
Score Difference between UDT and UDDT in SQL 2005
B.M - 18 Aug 2005 4:34 PM - 2 messages
Hi, I've noticed in SQL Server Management Studio (under types branch), the existing of  new object type "User-defined Type" Is there any difference between User-defined Data Type UDDT and User-defined Type UDT ? Thank you ...
Score getting list of users who have access to db
Brian Henry - 18 Aug 2005 4:33 PM - 2 messages
What is the procedure for getting a list of users that have rights to access a database? I'd like to get a listing back of anyone who has any rights to a specific db (sorry still learning the backend dbo type commands in sql ...
Score exporting numbers to fixed-width field text file left aligns numb
AndreasB - 18 Aug 2005 3:51 PM - 2 messages
I export a Table containing numbers to a fixed-width field text file using the Import-Export Wizard. The numeric fields are automatically left aligned just like the char fields. Is there a way to right align the  numeric fileds ...
Score Cursor or not?
Chris Lane - 18 Aug 2005 3:46 PM - 10 messages
Here is the scenario , I need to pull data from several tables and there will also be a sub query in one of the joins that does summing of an amount column, then I need to perform 3 separate Inserts into diff tables with the ...
Score SQL Question
Yosh - 18 Aug 2005 3:34 PM - 3 messages
I have a SELECT INTO [#tmp] statement. Can I add an index to this temporary table after it  was created by the SELECT INTO? Thanks, Yosh ...
Score using getdate()
A.B. - 18 Aug 2005 3:33 PM - 4 messages
I have created a SP that will generate information for the week leading up to the time it is run. The buttonpushes SP needs two values a begin date and an end date. It works fine when I put in the date for the week ...
Score physical shrink of transaction log - sql 2000
tbrauch - 18 Aug 2005 3:31 PM - 6 messages
I have a log file in my sql 2000 database that is over 1gb in physical size.  The recovery model is "simple".  The transaction log is not backed up.  Implicit/explicit checkpoints are supposed to truncate inactive portions of ...
Score Ole Automation procedures. DB scope?
Snake - 18 Aug 2005 3:09 PM - 3 messages
I have been looking at the OLE automation procs (ex. sp_OACreate, etc. ) and am wondering about their scope. Does the OLE process have scope on the executing  transaction?  Or must the OLE object establish its own database connection?  For example, I have an example using 'SQLDMO.SQLServer' and it ...
Score sql join help
Tom - 18 Aug 2005 3:01 PM - 5 messages
I need a query to return rows that will be used in an insert statement. I think the easiest way to explain is with a diagram: Table1 contains the following rows: SubjName FromName ArchviedDate -------- -------- ------------- Subj1    From1    1/1/2005 ...
Score sql join help
Tom - 18 Aug 2005 2:59 PM - 1 message
I need a query to return rows that will be used in an insert statement. I think the easiest way to explain is with a diagram: Table1 contains the following rows: SubjName FromName ArchviedDate -------- -------- ------------- Subj1    From1    1/1/2005 ...
Score DBREINDEX at threshold for all databases
Stephanie - 18 Aug 2005 2:55 PM - 3 messages
There is a proc in Books Online that allows you to execute a INDEXDEFRAG on all indexes in a database that have a logical fragmentation percentage above a specific limit.  IT useds SHOWCONTIG and a temporary table.  I want to run ...
Score Need Query Help
Jeff - 18 Aug 2005 2:41 PM - 7 messages
I'm need a query that takes the number from the identity column, then uses that for the next routine in a range....something like; Select IdentityNumber From TableName Where LastName = 'Somebody' (Then it takes that IdentityNumber, say row 100, an uses it to grab the rows ...
Score Derived Table
wnfisba - 18 Aug 2005 2:28 PM - 2 messages
I have created SQL using a Derived Table. Obviously, there's a method for my madness here and it has been a while since I've used a derived table. I am testing portions of my query and I am having a problem with the following ...
Score exclusive set of data query
Amil - 18 Aug 2005 1:52 PM - 3 messages
hi all, given that i have the following tables and data: mst_locs.locid    ctl_loctypes.loctypeid [description] 1                      1  [plant] ...
Next »