Home All Groups Group Topic Archive Search About

SQL Server database programming

microsoft.public.sqlserver.programming
Score combine values in view?
r - 28 May 2005 10:58 PM - 2 messages
Is there an easy way to do this? I need to pull sales values for each store and make one record per month. This used to be easy, as I was provided only one sales record per month per store, but now I've been told that SOME of the stores have a "secondary" ID ...
Score Can?
Bpk. Adi Wira Kusuma - 28 May 2005 5:30 PM - 2 messages
I make a view that get data from 2 tables  (inner join, and there's no group). Can i append/edit data with its view? if I make a function that return tables, so  Can i append/edit data with its ...
Score There's got to be an easy way
Chris - 28 May 2005 3:35 PM - 2 messages
Hi, I have been at this since 5 am. I still can't even find proper info. I have a sp that takes a while to run and I want to have the sp create an excel file of the result and send it to several users. I created a DTS but how do I ...
Score Debugging Stored Proc
Krishnaprasad Paralikar - 28 May 2005 10:36 AM - 2 messages
Hi, When I go to debug any SP thru Object browser in query analyser .... it starts well ... takes all the required parameters to begin ... but when I click on execute button, it completes the SP execution immediately. It does not allow to use functions like Step into, Step over etc .... Why does this ...
Score Send Mail with SQL Server issue
Chris - 28 May 2005 8:17 AM - 8 messages
Hi, I have a sp that takes a while to execute and I want the sp to send an email with an excel attachment of a select query from a table. Is it possible to convert the query to an excel file than send as attachment? If so wher can I ...
Score show ???? in datafield
javad.ebrahimnezhad - 28 May 2005 7:12 AM - 2 messages
hello to all i user a sql server database report in some win 98 system the reports show ????  for data field i set  " translation data" in  crystal reports 8.5 to false  and it was true ...
Score Display pictures in Northwind on the VB form
§Chrissi§ - 28 May 2005 6:10 AM - 4 messages
Hi, In Northwind , there is an employees table which store photos.  It seems the pictures are linked to the picture files because there is a photopath field containing the path.  When I try to display the photos on the VB form, it give me a error.  I used the same way to display the logos in the pubs and there is no problem.  In VB, I used ODBC data source with ADODB control and a picture control.  Could you try it and tell me how to solve the problem? ...
Score change charset
Win - 28 May 2005 5:42 AM - 2 messages
I changed the charset in a web page using (<META>). Browse IE can see the contents changed. But when I view the source, the charset of data does not changed. Can I change the charset of the data ? ...
Score finding the letters
rodchar - 28 May 2005 2:37 AM - 3 messages
hey all, if i have a field that contains values like these: BOC123 MC123 FIN123 How do i just get the letters? thanks, rodchar ...
Score Why Output
tshad - 27 May 2005 10:48 PM - 5 messages
I as looking at a book about asp.net and was curious, why do we need "Output" parameters? In the example from the book: *************************************************************** Create Procedure GetLastName (     @firstname varchar(20),     @lastname varchar(20) Output ...
Score extended procedures
Brad White - 27 May 2005 9:44 PM - 2 messages
I'm finding lots of code samples for writing extended procs, but *all* of them do nothing with SQL.  Hello or calculating free disk space are common examples. I'm writing a sp because I want to work with SQL data.  How do I do ...
Score Recursive rows in table and deletion problem
J-T - 27 May 2005 9:40 PM - 7 messages
I have a table with the following schema.As you can see it stores questions of a survy and each question can have child questions which are related to their parents by "Parent_ID".I'm using IDENTIY for the Question_ID which is ...
Score "Insufficient key column information for updating and refreshing"
bagman3rd - 27 May 2005 9:37 PM - 4 messages
"Insufficient key column information for updating and refreshing" What does this message mean.  All that I am trying to do is manually update 2 rows in one table with one join to another table with the updated values. Thanks. ...
Score SQL Server EM/Query Analyzer Access
dm4714 - 27 May 2005 8:59 PM - 4 messages
Hello -- we have SQL Servers running in a Service Bureau environment.  How clients frequently use applications at their sites to access our SQL Server. Unfortunately, some of our clients are more sophisticated than others and know about Enterprise Manager and Query Analyzer, which they can try and use ...
Score Possible to drop IDENTITY from a column?
Snake - 27 May 2005 8:57 PM - 4 messages
I have several tables with the IDENTITY attribute (my problem now!) and I need to remove the IDENTITY attribute from some of those tables/columns.  Is there a sane way of doing it?  If so, could you share it with me? ...
Score Centralizing Two Stored Procedure Queries (one using Cursor Output
John Walker - 27 May 2005 8:56 PM - 5 messages
Hi, I have a stored proc (called spTrucker) SQL query that I need to use in two places: in an ASP.NET app (results of the query will be put in a datagrid), and in another stored procedure (called spDistinctCodes) where the results ...
Score Improving performance of SPs
EggsAckley - 27 May 2005 8:19 PM - 5 messages
Hi: Can people please post general guidelines for improving the performance (speed) and/or efficiency of Sql Server stored procedures? Thanks for your attention. EA ...
Score file operations
Bob Castleman - 27 May 2005 8:04 PM - 2 messages
I'm writing a proc to do tlog backups. I want to validate the path before attempting to issue the backup command but I don't see any documented file handling funtions in T-SQL. What's the best approach for this? ...
Score Return always 0.
tshad - 27 May 2005 7:26 PM - 11 messages
I am trying to find out why my return from my ASP.Net page is always 0. I have the following code: ****************************************************   Dim objCmd as New SqlCommand("AddNewResumeCoverTemplate",objConn)   objCmd.CommandType = CommandType.StoredProcedure   objCmd.parameters.add("@ClientID",SqldbType.VarChar,20).value = ...
Score Hoping not everyone is gone the Friday before Memorial Day!
REM7600 - 27 May 2005 7:05 PM - 10 messages
Hey Guys n Gals... Looking to see if someone can give me an efficient means of populating a table with a complete set of dates for each of the values in a selection set. I've done it using cursors and it's horrid SLOW...  I'm no expert so I ...
Score Newbie: UPDATE a Table
steve - 27 May 2005 6:37 PM - 5 messages
Hi, I want to insert some new data in a Table. There is a possibility that there are duplicate rows . An Insert is obviously not allowed due to PK violatons. The new data reside on a temporary Table and there are NO duplicates! ...
Score how to aduit database access?
=== Steve L === - 27 May 2005 5:53 PM - 7 messages
background: sql2k on win2k3 server i have an application which no longer has further development on it (so that means no changes will be done thru front end interface of the application). but new business policies require the aduit for database ...
Score Drop all indexes
Mike Labosh - 27 May 2005 5:48 PM - 6 messages
I have been assigned to do some heavy duty index re-engineering on a database. EXECing a few sp_HelpIndex calls demonstrates that there are gobbles of useless, unused, haphazard and redundant indexes all sort of kludged together and don't even have consistent names. ...
Score Implementing natural keys
Chris Lieb - 27 May 2005 5:37 PM - 13 messages
After reading a thread about the 'merits' of natural keys, I decided that I would play around with them a little.  A database that I am working on needs to have the ability to repopulate some of its tables from a flat file.  By ...
Score ANSI NULLS performance impact
dave - 27 May 2005 5:14 PM - 2 messages
Could someone explain why having the ANSI NULLS database option off causes the following piece of SQL to run substantially slower. When the option is on, in my applications ODBC settings, the query will return in less than a second; however if the option is off then the query will take 28 seconds to ...
Score Getting Strange Execution Plan w/ DBCC
BDB - 27 May 2005 4:46 PM - 3 messages
Hi, I'm running this: DBCC CHECKDB ( '<database>', REPAIR_FAST ) WITH ALL_ERRORMSGS, TABLOCK And I'm getting this: Server: Msg 8649, Level 17, State 1, Line 2 The query has been canceled because the estimated cost of this query (13451) ...
Score backup and restore script
Craig HB - 27 May 2005 4:45 PM - 2 messages
I want to be able to create a development database based on our live database -- on an ongoing basis. I think the easiest way is to backup the live database, and restore it as a different name. Because I will be doing this ...
Score Substring with text datatype column in BOL - typo??
Mark - 27 May 2005 4:13 PM - 2 messages
Below is a excerpt from BOL about using Substring with text/ntext columns. Shouldn't it read "return the first 10 characters"?  Perhaps my BOL has not been updated ... Thanks in advance. Mark B. Use SUBSTRING with text, ntext, and image data ...
Score Simple Question (I hope)
vul - 27 May 2005 4:02 PM - 6 messages
I have a smalldatetime field with the name BidDate in a table Sopa. I need to build Crystal Report which will display all other fields grouped by Year and Month. I'm going to do grouping in the report. The first is to ...
Score Arithmetic overflow error converting numeric to data type numeric
hazz - 27 May 2005 3:40 PM - 3 messages
Column 'Grade' in table is- numeric length 5 Precision 4 Scale 2 Declare @Grade decimal Set @Grade = 19.5 Insert into table (Grade)             Values(@Grade) Arithmetic overflow error converting numeric to data type numeric. ...
Score Mode and Median functions in SQL 2000
Krishnaprasad Paralikar - 27 May 2005 3:28 PM - 6 messages
I would like to know whether statistical functions like Mode and Median are available for use in SQL 2000? If Yes, what's the syntax? If No, what do I do now? ...
Score Copy Database
-Ldwater - 27 May 2005 3:21 PM - 8 messages
Hi all, In our system, were using quite a primative method of copying one database to another, but renamed (like a live version & a play version). At the moment, we do a simple backup to a physcial file, and then restore it ...
Score Last Function in SQL Server ?
Oded Dror - 27 May 2005 3:18 PM - 4 messages
Hi there, --Access Query that Doesn't work in SQL SELECT Last([FirstName]) AS First_Name, Last([LastName]) AS Last_Name FROM Employees --Access Query that work with SQL if we have an EmployeeID SELECT TOP 1 FirstName,LastName FROM Employees ORDER BY  EmployeeID DESC ...
Score Multiple FK or "TableName" column?
David Parenteau - 27 May 2005 3:07 PM - 8 messages
Hi! I have a table "addresses". Address can be associate to a customer, an employee, a supplier or a consultant. Every of these 5 have a table with an identity primary key. My question is simple: Which of the 2 ways is the best ...
Score Monitoring of Replication using dev tools
Nigel - 27 May 2005 12:11 PM - 5 messages
What are the methods by which I can monitor replication/data row changes programmatically? I have looked at the Mergexlib but perhaps I've missed something but that *appears* to be for setting up and then monitoring (which is "ok" except how ...
Score SQL Query with Current date + 30 days
JP SIngh - 27 May 2005 11:11 AM - 6 messages
I need to find out all the records where a particular field is within 30 days of current date. Can someone help me with the SQL please I am new to SQL programming. The statement below used to work with Access ...
Score ORDER BY before UNION syntax error
Italian Pete - 27 May 2005 11:08 AM - 6 messages
I have a list of Nationalities which I want to  sort alphabetically except for the value of Nationality which is "not disclosed" which I would like to put at the top of the list. I'm trying to do this with the following query but there seems to be a ...
Score Row size increase....
Milind - 27 May 2005 10:45 AM - 4 messages
Hi, I have large test data. I have face problem with row size greater than 8060 then it give me warning/error. If i want to store in row greater than 8060 then how to do? Is it any possible way? I try with ntext and sp_tableoption ...
Score Indexes on SQL Server
Stimp - 27 May 2005 10:23 AM - 4 messages
Hi all, I'm not au fait with indexes as much as I should be... If a table has a lot of indexes (circa 18) and an insert is carried out on this table roughly every 5 seconds, this is a bad thing isn't it? ...
Score Migrating from RMS III
- B@rney - 27 May 2005 9:58 AM - 10 messages
We're migrating a production database (mission critical) from RMS on Aplha to SQL Server 2000. The data is static, it only gets updated once every 24 hrs. Some tables only once a week. Apart from the updates this is a read-only database with rather ...
Score How to be quickest
Bpk. Adi Wira Kusuma - 27 May 2005 9:20 AM - 3 messages
How to be quickest to restructure table master? If i have set "Relationship" on a database. My willingnes is When I resize key field on table master, so all Dependent tables will also change. Can I Do it? ...
Score Audit Trail - getting the current username.
cc900630 - 27 May 2005 7:49 AM - 4 messages
Hi, I have a couple of questions on writing an audit trail/last updated feature for my database. First, How can I programatically get the current user in SQL when executing a stored procedure.I have tried using sysusers table and ...
Score attach/detach db by user with no priviliges
Frank - 27 May 2005 7:15 AM - 2 messages
Hello, I am looking for a way to have users with normal security (= not system admin and so on) to attach and detach a specific database. Maybe via a stored proc. Does anyone have an idea? Thank you Frank ...
Score left join
wireless - 27 May 2005 6:02 AM - 3 messages
I'm doing the statement below which takes some cell numbers and matches them with their text names. It works fine but the thing is if a cell name is missing it doesn't return anything from that row.  In Oracle I could simply have simply done the join like this cell = acell(+) with the plus after and nulls would have been returned.  Is there an equivalent shortcut for sql server or do I need to do a left join?  If it needs a left join, how would I do it with this kind of statement? regards, -Dave select  * from (SELECT left(a.cell,3)  AS cell, SUM(rf_fade) as rf_fade FROM wireless.final a where recorddate >= '5/22/2005' AND recorddate <= '5/22/2005 23:59:59 ' Group by left(a.cell,3)) T1, (SELECT cd.cellnumber AS acell , cd.cellname  AS cellname FROM  dbo.celldata cd ) T2 where cell = acell order by acell ...
Score Date query
Ant - 27 May 2005 5:14 AM - 8 messages
Hi, I'm new to SQL. I need to return a recordset which will include only records with a date after previous June. (Could be this year or last) It's for tax purposes. How can i specify that it's the last June, not 'June' as a ...
Score Page Checksums?
DavidMA - 27 May 2005 4:14 AM - 2 messages
Hello, Does SQL have any sort of checksum value attached to each 8K page or is there a feature we can turn on to enable such a checksum?  I'm trying to optimize our block data synchronization product specifically for SQL ...
Score EM can't connect to server
Shimon Sim - 27 May 2005 1:30 AM - 8 messages
I suddenly can't work with my Enterprise Manager. It tells me that log in failed  - Can't access user's default database. What can I do about it? I really need to fix it fast. Thanks a lot ...
Score Change Unicode to MBCS
Win - 27 May 2005 1:20 AM - 3 messages
How can I change a chinese word (unicode) to MBCS? ...
Score add column to exiting table
Big D - 27 May 2005 1:08 AM - 7 messages
I have a table that has the following columns: ID    SSN    LastName    FirstName    TypeCodeID With keeping the integrity of the information can I create a new column that ...
Score Problems with an INSERT SP
Ross - 27 May 2005 12:07 AM - 8 messages
Hi folks I have a SP that inserts a record into a table.  The text is as follows: ''''''''''''''''''''''''''''''''''''''''' CREATE  PROCEDURE [dbo].[procClientAdd]      @lastname varchar (50),     @firstname varchar (50) = NULL,     @othernames varchar (50) = NULL,  ...
Score Save Table Definitions to Text File?
clintonG - 27 May 2005 12:03 AM - 5 messages
I don't know much about SQL Server yet and am going to start writing some stored procedures. I thought the best way to reference the table names and columns would be writing their definitions out to a text file like a report. ...
Score Problems with identity column
Michael C - 26 May 2005 11:32 PM - 100 messages
I was working on a program recently that had a bit field called 'completed' which recorded when a certain event was complete. I was removing this field because it was possible to tell that the event was complete through other ...
Score Select best data from a group of related records
GeorgeIggy - 26 May 2005 10:19 PM - 5 messages
How do I work with groups of records and return the best data from the group so I can update another table. Example: I have 10 records in table A that share a common field  (they all have the same business group number), some of ...
Score database size
Brad White - 26 May 2005 9:08 PM - 11 messages
How do I retrieve the size of the database from SQL Server 2000? I'm expecting that there is a sp for this, but I can't find it. I don't want to use the size from the filesystem because we are ...
Score Outer Joins
Asim - 26 May 2005 9:04 PM - 8 messages
I have a set of data which needs to be put in a table in addition to dates (daily). There are some dates where a location could be closed and hence no data values but i still want to see the date row in the table with location ...
Score Temp table permission
Ed - 26 May 2005 8:57 PM - 4 messages
Hi,   If I grant a user with datareader and datewriter  and all stored procedures with EXEC permission, does that user have permission to create any Temp Tables in the stored procedure?  I have a stored procedure that has ...
Score T-SQL Question
Boddhicitta - 26 May 2005 8:34 PM - 5 messages
Given the following table, how can I write a select statement to give the results shown below?  Blank values are not null, but ''. Thank you. Table: ID     VALUE 1    a 1    ...
Score Displays commas in type FLOAT
Rick Charnes - 26 May 2005 7:30 PM - 4 messages
I'm writing a SQL script.  I'd like to display the value I have in a column of type FLOAT so that it appears with the commas in the correct place.  It displays now as 10000000.0; I'd like it to display as ...
Score SQL Question
Yosh - 26 May 2005 7:14 PM - 11 messages
I have a datetime column where the date and time data values are sequential up to the second. There should be no gaps. What is the best way to develop a select statement that looks at this column to find gaps between the current and next record in that date and time column? ...
Score TSQL - data manipulation
culam - 26 May 2005 6:54 PM - 9 messages
ACCT                 final_decision -------------------- -------------- 2367                 Decline 2367                 Decline ...
Score always reporting error to client
Rizwan - 26 May 2005 6:52 PM - 3 messages
I have an INSERT trigger on my table (TABA) which calls a stored proc. this stored proc loop thorough another table's data (TABB) which stores the names of some stored procedures, and exectues each of them (dynamically). If i issue an INSERT statement to TABA in Query Analyzer and if any one of ...
Score query help needed
Fetty - 26 May 2005 6:35 PM - 2 messages
SELECT tblACRDIMProgramReview.ProgSumID, tblACRDIMProgramReview.SysOrgLastReviewDate, tblACRDIMProgram.ProgramName, tblACRDIMProgramReview.ProgramSID FROM tblACRDIMProgramReview INNER JOIN tblACRDIMProgram ON tblACRDIMProgramReview.ProgramSID = tblACRDIMProgram.ProgramSID WHERE (tblACRDIMProgramReview.ProgSumStatusID = 1) AND (tblACRDIMProgramReview.SysOrgSID = 2) Will get..... 26 ///9/30/2001 ///Business Marketing ///67 27 ///9/30/2001 ///Adm & Mgmt (Assoc Degree) ///66 ...
Score cross tab type query in sql
Neil - 26 May 2005 6:19 PM - 14 messages
I have three tables: tblBook has the fields bookID, bookRangeID, bookSubjectID, bookCode tblBookRange has the fields bookRangeID, bookRangeDescription tblBookSubject has the fields bookSubjectID, bookSubjectDescription so some typical data in tblBook might be: 1, 1, 1, B1HBSCI 2, 1, 2, B2HBFRE1 ...
Score Inner join in an Update
Arne - 26 May 2005 6:07 PM - 10 messages
I found this statement in a program calling MS Access: UPDATE Item   INNER JOIN (Detail INNER JOIN Main ON Detail.DetailMainKey = Main.MainKey) ON Item.ItemSKU = Detail.DetailItemSKU    SET Item.ItemGroupKey = MainParentKey This syntax doesn't seem to be supported in SQL 7.0. ...
Score Problem with ASP
Mark A. Sam - 26 May 2005 5:40 PM - 5 messages
Hello, I know this group doesn't pertain to Active Server Script, but I didn't see a group for that and though the SQL and Access people would be better suited to help me, since many have exerience with ASP scripting. ...
Score auto increase text!
tom d - 26 May 2005 5:26 PM - 2 messages
Hi, I have an initial value like this: 'TEST0001' I want to write a sql script that will automatically take that initial value and keep adding 1 to it and insert into a table for me until it get to ...
Score Remove headers in SQL Query analyzer when making a query
Tinchos - 26 May 2005 5:20 PM - 3 messages
Hi Friends... I need to know how can i remove the colum headers when making a query with sql query analizer, the query is: select succeeded from sysdbmaintplan_history i need that the field header 'succeeded' dissapear!!! thanks all ...
Score Delete Duplicate
MS User - 26 May 2005 5:13 PM - 8 messages
SQL 2K I got a table 'DptAct' having 3 million rows with columns - ID, DPTID, NAME, SUPVR, MOD_DATE I want to retain just one row for unique (ID, DPTID) combination, doesn't matter with values of rest of the columns. ...
Score Removing IDENTITY from existing column
Chris Lieb - 26 May 2005 5:01 PM - 15 messages
I have been testing some code that has been inserting large amounts of data into some tables.  All of the tables have a Primary Key that is also an Identity.  After a bad run, I go through and DELETE all of the entries in ...
Score Not For Replication Option
John Cobb - 26 May 2005 4:42 PM - 3 messages
I need to have the Not For Replication option set on some tables with Identity columns similar to the the code snippet below however this needs to be done through Enterprise Manager and can't find the option there.  Is ...
Score Consolidate two UPDATE statements into on
Carl Imthurn - 26 May 2005 4:21 PM - 3 messages
I'm working on a stored procedure to age balances. In short, here's the algorithm: Payments get applied to the oldest 'bucket' first; in my example, BalanceOver180. Is the value in the Payments column greater than or equal to the value in BalanceOver180? ...
Score Dynamic creation of Column Transformations
Jinx1966 - 26 May 2005 4:21 PM - 4 messages
I have numerous deleimited text files being delivered to a folder and I need to import them into a data base. These files have diffrerent numbers of rows AND columns. I have set up a looping DTS package (based on ...
Score help with store procedure - getting results from 3 queries
Mike - 26 May 2005 4:09 PM - 6 messages
Hi, I have a table user with the following field. id,code,xdate I am trying to write a stored procedure that would return the results as the following 3 queries a. select count(id) from user where code like 'TR%' ...
Score ADSI Group Members and SQL
KevinE - 26 May 2005 3:57 PM - 2 messages
Does anyone have a good example of querying group members out of Active Directory Group. The error seems to happen when the field I am querying has multiple vales This is what I have so far: exec sp_addlinkedserver 'xxx', 'Active Directory Services 2.5', ...
Score Conditionally skip or jump steps in a job
Dave - 26 May 2005 3:57 PM - 3 messages
Is it possible to conditionally skip or jump steps in a job without failing a step? For example I don’t want to run a step if the are no records in a table. I also need to loop based on a condition. ...
Score Conversion query
Pete - 26 May 2005 3:47 PM - 2 messages
I have 2 date variables passed into my store procedure as follows @StartDate datetime, @EndDate datetime however I am getting a conversion error when running the command below which says "Syntax error converting datetime from character string" PRINT ('INSERT INTO ' + @NewSubsList + '(SubRef) ...
Score Set Operations in TSQL
Mohan - 26 May 2005 3:42 PM - 8 messages
Hi,     I'm working on a project where I have to do an intersect query based on county & city information currently in a XML file.  I'm currently parsing the XML & doing the Intersection manually using for loops in VB... this is very ...
Score Integer Index -vs- nVarChar(50) index....
Owen Mortensen - 26 May 2005 3:34 PM - 4 messages
We have a legacy database that was ported over from LDAP where the user tables are indexed on the username (which is an nVarChar(50) field). We have sever (ok, 92) related tables all using the nVarChar(50) field as the ...
Score Query Assistance - Average Days Between Services
Jerry Spivey - 26 May 2005 3:16 PM - 10 messages
Hi, I need some help writing a two queries to determine the average number of days between services for 1. a specific machineid  2. for all specific machineids. The table contains many columns including a MachineID column (INT) and a ...
Score Need help with SELECT statement Please.
Lam Nguyen - 26 May 2005 3:10 PM - 3 messages
Hi all, I need some help with the sequel statement.  Below are the business rules and the desire results.  Any help would greatly appreciate. IF OBJECT_ID('Tempdb.dbo.#Test', 'u') IS NOT NULL   DROP TABLE #Test GO ...
Score Inserting records in a User-Defined Function
Chris Lieb - 26 May 2005 2:40 PM - 19 messages
I have the following UDF: CREATE FUNCTION [dbo].[GetInBoundID] (@Inbound nvarchar)  RETURNS int AS  BEGIN     DECLARE @InboundID int     IF (SELECT COUNT(*) FROM [TOFC].[dbo].[CITTAS_InBound_RailYard] WHERE InBoundRailYard = @Inbound) = 0 BEGIN         INSERT INTO [TOFC].[dbo].[CITTAS_InBound_RailYard] ([InBoundRailYard]) ...
Score duplicates
Big D - 26 May 2005 2:37 PM - 4 messages
How do I delete duplicate entries? For example, lets says I have the following table format: SystemName, Memory, CPU I would like to delete any duplicates that are in SystemName. ...
Score 32 bit SQLDMO code on a 64 bit server
Scott Duckworth - 26 May 2005 2:27 PM - 4 messages
Should an application written in VB6 and early bound to SQL Server 2000 SQLDMO run on a machine with 64 bit SQL Server 2000 installed? We update SQL databases with a custom written in house VB6 app. What would be involved in getting this program to run in this environment? ...
Score Convert VB.NET to TSQL PROC & Reference a Proc from another Proc
David Lozzi - 26 May 2005 2:06 PM - 6 messages
Howdy, ISSUE 1: See issue 2 below. I have a distance calculator on my site which works great. However, the users need to sort by distance, which make sense. I'm not sure how to do it other than like this. With the returning query include the distance from origin. Here's my dilemma, I have the script working great in VB which provides the distance, but that is not sortable, but when I port it over to TSQL I get differing results. Here is the code in VB: ...
Score Problem with EXEC command
Pete - 26 May 2005 1:57 PM - 20 messages
I am try to populate a table based on a variable (it holds the table name).  I have managed to create the table using the EXEC command but am having problems populating it with the following command.  I receive "Error 156: ...
Score Proc Result
Daniel Groh - 26 May 2005 1:54 PM - 3 messages
Hi, I have a proc and within another proc that i need to verify a result for my action, exemplo: if(Exec SP_VerifyUser @NewEmail=0) Begin   -- action of my current proc End But of course this does not work, there's a way to accomplish that ? ...
Score AVOID merge joins
Jan - 26 May 2005 1:53 PM - 3 messages
Hi, Does anyone know of a way to AVOID merge joins? I have a complex query that works fine on one system, but not on another. After inspection, I found that the difference lies in different query plans generated by the query optimizer. On the failing system, a merge join is ...
Score Start SP on timer
tarpan - 26 May 2005 1:50 PM - 3 messages
Hi, I want to start my SP on timer, let's say every minute. Is it possible to do in MS SQL Server internally? If not, what is the simplest way to do this? Thanks ...
Score Applying business rules to the database
Avi - 26 May 2005 1:42 PM - 3 messages
Hi Experts, My system stores events into a large table.  I would like to apply some rules on that table and possibly take action if the rules were satisfied. For example if a certain event arrives 2 times in 60 seconds then perform an ...
Score Small letter and numeric number in Tabel field
Mike Petter - 26 May 2005 12:12 PM - 7 messages
Hello ! I need help to creat SQL field in the table to accept only small letter and only number? what is way to creat this in SQL 2000? Please help me. Best regards, Mike ...
Score Grouping Data By Weeks
CJM - 26 May 2005 12:02 PM - 8 messages
I have a requirement to produce a report that breaks down some data into totals by week. The data is in SQL Server, but the user just wants a one-off report, so we can use Access or Excel as alternatives is more suitable. ...
Score If Update AND If Delete sections in one trigger?
Steve'o - 26 May 2005 10:25 AM - 4 messages
Is it possible to have an if update and if delete section within one trigger? eg create trigger tgMyTrigger on dbo.tblMyTable For insert, update, delete as if update(MyColumn) begin     blah blah etc end if delete(MyColumn2) ...
Score xml transformed output
Nishanth - 26 May 2005 9:44 AM - 3 messages
Hi,     I have xml in the following  form <ROOT><Emp><Name>Anil</Name><Age>4</Age><Phone>123</Phone></Emp><Emp><Name>S ...
Score CONTAINS not working
Madhivanan - 26 May 2005 9:01 AM - 5 messages
When I run the query, SELECT nn FROM tt WHERE CONTAINS(nn, 'test') I get the error Server: Msg 7601, Level 16, State 2, Line 1 Cannot use a CONTAINS or FREETEXT predicate on table 'tt' because it is not full-text indexed. ...
Score Advanced programming examples ?
cc900630 - 26 May 2005 7:53 AM - 4 messages
Can anyone reccomend a book or online tutorials that shows quite advanced SQL examples. Most the sites and books I have seen for SQL only give small examples from the pubs database designed for a few concurrent users. This is ...
Score nonclustered indexes
shine - 26 May 2005 7:17 AM - 2 messages
Non-clustered is additional data with pointers to the actual data, Then where the pointers are stored? shine ...
Score Find Like Records with similar field data
robert lassiter - 26 May 2005 7:05 AM - 3 messages
I have two tables in the same SQL database. Both have a similar numeric field.  One field has the same number as the other field but is prefixed with various letters. I know how to use LIKE but won't know the partial ...
Score View of Joined Tables
WB - 26 May 2005 7:02 AM - 6 messages
Hi, I have 2 tables (dbo.specsAttribute & dbo.specsValue) in my database that stores the specifications for our products. Here's some data example for the 2 tables respectively dbo.specsAttribute: attributeID    attributeName 1        Height ...
Score storing email in sql db
tejas dandekar - 26 May 2005 5:52 AM - 4 messages
i have stored email address in a column by the name email(nvarchar 100) in a table. i want that when i fetch the date on the aspx page the email address thats displayed should be clickable link that shud take the users to outlook. ...
Score replication with java
inder - 26 May 2005 4:39 AM - 4 messages
Hi all,         I'm trying to develop a Java application that will manipulate and transfer data from sql server X to sql server Y (transactional replication is not an option).  I'm pretty new to this sort of thing, but how can my ...
DMO
Next » 2 3 4 5 6 7 8 9 10