Groups | Blog | Home


Archived Months
January 2003
June 2003
July 2003
August 2003
September 2003
October 2003
November 2003
December 2003
January 2004
February 2004
March 2004
April 2004
May 2004
June 2004
July 2004
August 2004
September 2004
October 2004
November 2004
December 2004
January 2005
February 2005
March 2005
April 2005
May 2005
June 2005
July 2005
August 2005
September 2005
October 2005
November 2005
December 2005
January 2006
February 2006
March 2006
April 2006
May 2006
June 2006
July 2006
August 2006
September 2006
October 2006
November 2006
December 2006
January 2007
February 2007
March 2007
April 2007
May 2007
June 2007
July 2007
August 2007
September 2007
October 2007
all groups > sql server (alternate) > november 2004 > threads for november 22 - 28, 2004

Filter by week: 1 2 3 4 5

Update Table
Posted by jonascasberg NO[at]SPAM yahoo.com at 11/28/2004 8:48:47 PM
Hi, I got a new SQL Server database and are in the process of porting my Access databases to my new SQL Server. I have worked with Access and Oracle in the past but I am new to the SQL Server environment. I have a tool called ConVersion that is helping me rewrite my queries in Access into SQL...more >>


Storing japanese characters
Posted by fake_healer NO[at]SPAM hotmail.com at 11/28/2004 6:34:47 PM
I'm trying to make a site work for japanese characters. It works fine except for the alerts in javascript. The characters are stored in unicode, as this; 'コミック全巻配' Those unicode characters are translated by the browser, but not in the alert. ...more >>

Triggers
Posted by Mark Flippin at 11/27/2004 10:08:13 PM
I'm just starting to use triggers in my databases and find the support in Enterpise Manager lacking. Using Enterprise Manager and Query Analyzer you can maintain the triggers, but it's cumbersome. Are there better tools for creating and managing triggers? Mark Flippin ...more >>

link to access.mdb
Posted by nando NO[at]SPAM consolidated.net at 11/27/2004 6:01:15 PM
i'm new to sql server.. i have searched google / help, but can't find what i need.. basically i just need a "how to" on creating an sql view in an sql database using an access.mdb how do bring an access.mdb table into an sql view so i can create links w/ other sql tables ...more >>

MS SQL Server JDBC Driver Type 2 and Driver Type 4 Differences
Posted by agupta NO[at]SPAM in.ibm.com at 11/26/2004 9:59:03 PM
Hi, Could some please tell me whether Microsoft provides Type 2 and Type 4 jdbc driver ? For Type 4 MS provides com.microsoft.jdbc.sqlserver.SQLServerDriver driver. What is the cofiguration required for type 2 driver and what driver class files required ? Its very urgent to me please reply....more >>

Store procedure's debug
Posted by saimon at 11/26/2004 8:56:56 PM
While I debugging a SP, I try to catch the value of local variable ( DECLARE @ls_where VARIANT(8000) ) but I see that is not completely, but truncate. The SP works correctly ... how can I catch the completely value of the local variable ? I have The same result if I Print the variable. Thx ...more >>

audit trail...
Posted by heruti NO[at]SPAM lycos.com at 11/26/2004 3:12:26 PM
Hi... A much lamented question, I guess.. I'm trying to create a simple audit trail. log the changes to an SQL 2000 table, so that they are written into a mirror table. The entire record, only the updated one, i.e. if say only one field changes, the audit table will be inserted with one rec...more >>

Technique for concurrent access?
Posted by Robin Tucker at 11/26/2004 2:18:10 PM
I've been asked to turn our single-user database system into a multi-user system. At present, each user has a copy of the MSDE on their desktop machine and uses our program to access it. In future, we would like to centralise our MSDE instance and allow multiple users to access it. In ord...more >>



LIMIT in MS SQL ??!!
Posted by Urban at 11/26/2004 1:13:48 PM
hi, I have a question. Maybe You know the equivalent to command LIMIT from MySQL I couldn`t find something like this in MS SQL PS I try to display 10 records begining form e.g. 4 sort by id something like: "SELECT * FROM table WHERE name=... LIMIT 4, 10 ORDER BY id" in MySQL thanx, Urb...more >>

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.
Posted by tony.despain NO[at]SPAM gmail.com at 11/26/2004 10:33:29 AM
Anyone, I have a user "john" whose machine is part of the "job" domain. He is trying to establish an odbc connection to an MS SQL 2000 server on the "school" domain. He uses Windows authentication to establish the odbc connection however it gives the error "Login failed for user '(null)'. ...more >>

locking and rowid
Posted by Tenkre at 11/26/2004 10:21:19 AM
Hello! 1. How can I know exactlly what row is locked? Is data in "resource" column of sp_lock usable? For example, resource = 03000d8f0ecc 51 14 0 0 DB S GRANT 51 14 277576027 1 KEY (03000d8f0ecc) X GRANT 51 14 277576027 1 PAG 1:1112 IX GRANT 51 14 277576027 0 TAB IX G...more >>

if..then
Posted by avitalnagar NO[at]SPAM walla.co.il at 11/26/2004 7:58:17 AM
Hi, I have a sql query with cases. I need to add a condition that if hasamafactor=5 then display only cases m11-m14 else display the rest. Of course sum ( kamut) as total4mosad has to be only for the relevant cases and not all of them. CREATE PROCEDURE [dbo].[MisgeretMosad_Sum] (@...more >>

sql7\sql200 connectivity
Posted by nick.fletcher NO[at]SPAM apdcomms.com at 11/26/2004 1:52:23 AM
Im trying to access a sql200 database from a sql7 hosted stored procedure and this is not working. I know that SQL7 is not compatible with the MDAC for SQL 2000. Does anyone know if this is what is causing me my problems and if so is it possible to upgrade the SQL7 MDAC without breaking it? T...more >>

common UPDATE syntax for SqlServer and Oracle
Posted by Jan van Veldhuizen at 11/25/2004 11:44:54 PM
The UPDATE table FROM syntax is not supported by Oracle. I am looking for a syntax that is understood by both Oracle and SqlServer. Example: Table1: id name city city_id 1 john newyork null 2 peter london null 3 hans newyo...more >>

How to use a value from one recordset in another..?
Posted by Bane at 11/25/2004 10:43:38 PM
Im doing a select that should retrieve a name from one table and display the number of correct bets done in the betDB (using the gameDB that has info on how a game ended) I want the "MyVAR" value to be used in the inner select statement without too much hassle. As you can see im trying to get ...more >>

Executing Script Files From Transact-SQL
Posted by hp_howell NO[at]SPAM hotmail.com at 11/25/2004 9:28:02 PM
Hi, I have my create statments for tables, procedures, views, etc in individual Transact-SQL script files (.sql). I wnat to write another script file that executes these scripts in the correct order to create the database. What is the syntax for executing script files from Transact-SQL? ...more >>

audit tables, delete triggers, and asp.net
Posted by encee5 NO[at]SPAM gmail.com at 11/25/2004 8:44:57 PM
i'm in a bit of a bind at work. if anyone could help, i'd greatly appreciate it. i have a web app connecting to a sql server using sql server authentication. let's say, for example, my login/password is dbUser/dbUser. the web app however, is using windows authentication. so if I am logged...more >>

good table design...
Posted by toedipper at 11/25/2004 3:59:31 PM
Hello, I am designing a table of vehicle types, nothing special, just a list of unique vehicle types such as truck, lorry, bike, motor bike, plane, tractor etc etc For the table design I am proposing a single column table with a field name called vehicle_type and this will contain the vehic...more >>

Data replication from MSSQL to MYSQL
Posted by Luca at 11/25/2004 2:27:05 PM
Hi all. I need to set a oneway replication of some data from MSSQL (running under Windows 2000 server) to MYSQL (running under Linux). Do you have some ideas to solve the problem? Thank you Luca ...more >>

Table Rowcount question
Posted by MissLivvy at 11/25/2004 8:28:22 AM
What's the difference between the rowcount column returned by: DBCC SHOW_STATISTICS('table_name','primarykey') and SELECT rows FROM sysindexes WHERE id = OBJECT_ID('table_name') AND indid < 2 Is the second query always accurate, whereas the 1st may not be if the table stats are bad? ...more >>

SUM function with negatives values
Posted by jeanclaude.darchivio NO[at]SPAM getronics.com at 11/25/2004 8:10:05 AM
I have a table like this order_id price 1 -1000 2 2000 3 3000 4 4000 I want to know the total of the order amount, I use this query SELECT SUM(price) FROM MyTable and I get 8000 instead of 9000. The negative value seems to be read twice! ...more >>

Join stored procedures?
Posted by gjvdkamp NO[at]SPAM hotmail.com at 11/25/2004 7:18:55 AM
Hi all, I have a challenge (not a problem). Simplifing it as far as i could, i have this situation: Table Persons Id (PK) Name Table Scores FK_Person (PK) Period (PK) Value Now, i want to make a stored procedure that returns the scores for all people in a certain...more >>

Peak During Time Period
Posted by dave NO[at]SPAM court-technologies.com at 11/25/2004 2:02:25 AM
Hi I am hoping someone might be able to help me out with this. I am writing a helpdesk system which records agents logging in and out of the system. I need to write a stored procedure which will show the peak number of agents logged in concurrently during a specified time period. Within ...more >>

Seeking Testing Volunteers W2K MTS/DTC to VMS DECdtm Distributed 2PC Transactions
Posted by Richard Maher at 11/24/2004 6:58:42 PM
Hi, I am seeking the help of volunteers to test some software that I've developed which facilitates distributed two-phase commit transactions, encompassing any resource manager (e.g. SQL/Server or Oracle) controlled by Microsoft's Distributed Transaction Coordinator in a Windows2000 environme...more >>

SQL Delete Syntex
Posted by rc NO[at]SPAM die NO[at]SPAM you NO[at]SPAM !spammers.sandworm.demon.co.uk at 11/24/2004 6:49:09 PM
Hi You can do a select top 1 * from <table>, my question is how does one delete the row whithout having to do lots of where clause ? Is there a equivelant delete top 1 from <table> Thanks ...more >>

View on different databases!!!
Posted by MerLiN at 11/24/2004 2:10:24 PM
How to make view based on two different databases.How do i access table in other database.. Thanx...more >>

When to use the NOLOCK hint.
Posted by slmcmahon NO[at]SPAM gmail.com at 11/24/2004 10:32:44 AM
Background: I am currently working on a mission critical web based application that is accessed 24 hours a day by users from just about every time zone. We use MS SQL Server as our database and we have lots of problems with time-outs. We used to have lots of problems with locks until my manag...more >>

SQL 7: One column's value is repeated throughout entire result set
Posted by caleb.mail NO[at]SPAM gmail.com at 11/24/2004 8:20:28 AM
I'm using the following query to look in a log file and show some statistics. It counts the total number of views and the total number of unique users who have viewed a particular item (the "id" and "title" fields are associated with the item). SELECT title, COUNT(id) AS NumberViews, COUNT(DI...more >>

Help Cursor Based Stored Procedure Is Getting Slower and Slower!
Posted by philipdm NO[at]SPAM msn.com at 11/24/2004 7:11:47 AM
I am begginner at best so I hope someone that is better can help. I have a stored procedure that updates a view that I wrote using 2 cursors.(Kind of a Inner Loop) I wrote it this way Because I couldn't do it using reqular transact SQL. The problem is that this procedure is taking longer and l...more >>

What's the best SQL book for an intermediate level database programmer?
Posted by jklimek NO[at]SPAM gmail.com at 11/23/2004 8:27:41 PM
In May of this year I graduated from Penn State with a BS in IST (Information Sciences and Technology). Right after graduation I got a database programming job with a company that uses Delphi 6 and MS SQL Server 2000. I've been working with this company for six months now but I'm still not ve...more >>

Dealing with a null parameter in SP
Posted by laurenquantrell NO[at]SPAM hotmail.com at 11/23/2004 2:48:24 PM
I have a stored procedure as a recordsource from a contacts table. In this example, users can enter parameters to limit contacts by first letter of last name or company name or keywords: Example: @myName nvarchar(30) = null, @Alpha char(1) = null SELECT Contacts.ContactID, ContactType, ...more >>

2-table join where only need one row of second table.
Posted by Clinton Pierce at 11/23/2004 2:46:48 PM
For discussion sake, I've got two tables: customers and orders. What I want is a query that will return the most recent order for each customer. Let's say the tables are like: Customer: customerId, customerName Orders: orderId, customerId, orderDate The simple joins I've done give me back...more >>

SQL Server 7 Backup Problems
Posted by alijsyed NO[at]SPAM hotmail.com at 11/23/2004 1:05:41 PM
I am having problems trying to get SQL server Agent to run an unattended backup of my databases. I setup (or think I did) a schedule in maintenance but it doesn't work. Is there a website or link where I can get step by step instructions for setup of a backup using sql server agent or anyth...more >>

Error Authentication User Informations
Posted by garrydawkins NO[at]SPAM hotmail.com at 11/23/2004 12:59:08 PM
Hey Gang, I get a error message "Authentication Failed for SQL Server instance: local with friendly name local SQL Server does not exist or access denied". I have a Just loaded SQL Server on my virtual box and loaded Microsofts bpa and microsoft security anlyzer. The security scan work but t...more >>

creating a view with columns not in another table
Posted by margraft NO[at]SPAM yahoo.com at 11/23/2004 11:36:40 AM
Hello, I'm somewhat of a newbie and I need to create a view with a column that is not derived from any other tables. What I want is for this field to be an auto-increment field or some kind of UID. Can anyone quickly tell me how to do this. Here is my dilemma. I need to pull data from a ...more >>

query help: need to return 2nd from top record
Posted by Toucan at 11/23/2004 11:36:10 AM
i need to retrieve the most recent timestamped records with unique names (see working query below) what i'm having trouble with is returning the next-most-recent records (records w/ id 1 and 3 in this example) i also need to return the 3rd most recent, 4th, 5th and 6th most recent - i figu...more >>

Qualified table names
Posted by newtophp2000 NO[at]SPAM yahoo.com at 11/23/2004 7:32:31 AM
I have a quick question on how to qualify table names as it relates to "dbo" vs. user names. Suppose that I am a user named "dwuser1", and that I need to create a table named "dw_stage_1". Do I use dbo as in "dbo.dw_stage_1" or do I use "dwuser1.dw_stage_1" for the qualified table name? Are b...more >>

Mysql on different servers
Posted by bairdoid NO[at]SPAM hotmail.com at 11/23/2004 1:30:02 AM
Is it possible to connect to different databases on different servers so i can merge them as one. I heard there is a tool that does this but still to come accross it any help appreciated....more >>

HowTo Update Date Field
Posted by fwiest at 11/22/2004 8:16:27 PM
Could someone help me with the most efficient way to update a date field. I have a field with Date and Time in it but I want to update it with only the Date and strip off the time. Any ideas for the shortest way to do this? ...more >>

Linking Lookup Tables
Posted by jack-b NO[at]SPAM humlog.com at 11/22/2004 7:06:10 PM
Hi, If you have lookup tables which are used by multiple tables (e.g. 'City' lookup table might be used by the 'Employee' and the 'Company' tables) do we need to link it to both tables? Or can it sit by itself and just referenced? Cheers, Jack...more >>

Help! Top N in SQL Server?
Posted by ThugPassion NO[at]SPAM gmail.com at 11/22/2004 6:17:28 PM
Hi, I'm working on a SQL Server project right now, and I'm not sure how to approach one part. Basically I have a table full of orders for a software program to process, then mark with the date/time to show it's been finished. What's in the Q at any time could be a few orders, or several hu...more >>

MS sql server on workgroup not domain.
Posted by Father Jack Hackett at 11/22/2004 6:14:42 PM
Hi have a small network setup and have MS sql server on workstation. Can access it locally but cannot access it from other work stations. I am assuming it is some sort of logon error, being it is not a domain. Any ideas on getting by this ?...more >>

help with showcontig
Posted by Jean at 11/22/2004 5:21:13 PM
Hi, i'm on windows nt4 sp6a , sql server 7.00.0842 i have something that i don't understand. The table 'source' is taking lot of space but when i bcp out, the file take only 11MB (fixed delimiter option) i issue showontig and it says me that Avg. Page Density (full).....................: 4...more >>

Restore Database
Posted by gonne at 11/22/2004 4:34:01 PM
Hi, I have a db-backup and i'd like to restore on another pc... No problem with the same.. backup and restore on same machine.... anyone can help? tnx David ...more >>

Query "hightest value" contents of each "folder"?
Posted by Robin Tucker at 11/22/2004 2:00:51 PM
Hi, Can anyone tell me how to select the "most recent" date values from a grouped query? Consider the following: CREATE TABLE [dbo].[TestQuery] ( [ID] [int] NOT NULL , [ID_Parent] [int] NOT NULL , [Date] [datetime] NOT NULL ) ON [PRIMARY] This is a simplified adjacency list. What ...more >>

SQL Server Analysis Services
Posted by sandeepmadduri NO[at]SPAM gmail.com at 11/22/2004 1:08:05 PM
Hi All, When I try to run the SQL Server Analysis Server, I get the following error: "Cannot Open Connection to Analysis Server <server name>.Network error (during operation)". I have not had any luck with SQL Server Books online with this issue. Would really appreciate any help lead...more >>

Alter table weird bug?
Posted by jcombe NO[at]SPAM acxiom.co.uk at 11/22/2004 8:22:13 AM
I have created the following test SQL code to illustrate a real problem I have with some SQL code. CREATE TABLE JCTable ( CustomerName varchar(50) ) ALTER TABLE JCTable ADD CustomerNo int INSERT INTO JCTable ( CustomerName , CustomerNo ) VALUES ( 'Jon Combe' , 1 ) INSERT INTO JCTable ( Custo...more >>

Multiple Update with multiple condition
Posted by msreerajan at 11/22/2004 2:27:58 AM
I'm having an Employee table with a Salary field. How can we increate the salary of the employees with following conditions: 1) salary between 1000 and 10000 : increase 25% 2) salary between 10000 and 20000 : increase 15% 3) salary between 20000 and 30000 : increase 5% Surely you can crea...more >>

creating a matching program
Posted by chudson007 NO[at]SPAM hotmail.com at 11/22/2004 2:18:39 AM
Hi, I'm just looking for some general advice on how to approach something. I have two tables A and B, containg common fields of product, sales date and qtyo. Some records contain the same data and I want to dump them in a new table called C and leave Tables A and B containg only data that ...more >>

Variable Table Name in a Stored Procedure
Posted by fniedermeyer NO[at]SPAM aareon.com at 11/22/2004 2:12:46 AM
Hello Forum ! I want to have the tablename "dbo.Enbxxxx" as an additional parameter for a procedure like this: ALTER Procedure prcSucheUNR ( @UNR int ) As set nocount on SELECT ABRUFNR, UNR, STICHTAG, Datum, Inhalt INTO #temp FROM dbo.Enb WHERE UNR = @UNR ...more >>


DevelopmentNow Blog