all groups > sql server (alternate) > september 2004 > threads for september 1 - 7, 2004
Filter by week: 1 2 3 4 5
Query to get column name with specific value
Posted by kjaggi NO[at]SPAM hotmail.com at 9/7/2004 5:42:19 PM
Here is tested schema
if exists (select * from dbo.sysobjects where id =
object_id(N'[dbo].[TestTable]') and OBJECTPROPERTY(id, N'IsUserTable')
= 1)
drop table [dbo].[TestTable]
GO
CREATE TABLE [dbo].[TestTable] (
[SerialNumber] [char] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
,
... more >>
sql select
Posted by Jemy at 9/7/2004 2:45:56 PM
Hi all, I need to do a keyword search against database table (MSSQL 2000) on
particular field/column, say the keyword: "sql server 2000". The search
should return without any order restrictions, so it might return result
contain '2000' and 'sql' and 'server', or can return that contain 'server... more >>
HELP! Incomplete data in SQL Server table.
Posted by sriram.santhanam NO[at]SPAM gmail.com at 9/7/2004 2:29:48 PM
Hi SQL Server Experts,
I really need some help ASAP.I thank you in advance.
We have an ASP/MS SQL Server Shopping cart application,developed by an
independent developer.We really have a problem where the Order_details
are not getting stored completely.
The concerned Tables are:
Table1 ... more >>
SQL Server 2000 Training London
Posted by Lez Oxley at 9/7/2004 1:39:50 PM
One of our guys needs some SQL server 2000 Training.
Can anyone recommend a good training agency in the London (UK) area?
Thanks
Lez... more >>
Subquery in FROM clause
Posted by Evgeny Gopengauz at 9/7/2004 12:21:51 PM
Let us suppose that we have a table:
CREATE TABLE
transactions(
currencyID_1 int,
value_1 money,
currencyID_2 int,
value_2 money
)
I need to calculate the totals by each currency.
It might be express with the construction like this:
SELECT curre... more >>
SQL Server Connection
Posted by TruckeeBill NO[at]SPAM ltol.com at 9/7/2004 10:05:27 AM
I've developed a program in VB 6 and SQL Server using ADO connections.
I am the owner of the database objects associated with the program.
On one form, I have dropdown combos and dbgrids associated with ADO
data controls. The data controls are connected to the server with ADO
using Windows se... more >>
Need help on Create View
Posted by kackson NO[at]SPAM yahoo.com at 9/7/2004 4:47:03 AM
Hi.
I created a simple view with the following statements:
CREATE VIEW dbo.VIEW1
AS
SELECT dbo.VIEW_ALL.ID,
dbo.VIEW_ALL.Code,
Another.dbo.OTHER_VIEW.Label as SpecialCode
FROM dbo.VIEW_ALL LEFT OUTER JOIN
Another.dbo.OT... more >>
Insert statement which uses a return value from an SP as an insert value
Posted by chris_q2 NO[at]SPAM hotmail.com at 9/7/2004 4:06:08 AM
I'm quite stuck with this:
I have an import table called ReferenceMatchingImport which contains
data that has been sucked from a data submission. The contents of
this table have to be imported into another table ExternalReference
which has various foreign keys.
This is simple but one of th... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Capture existing table
Posted by William F. O'Neill at 9/6/2004 9:17:03 PM
I trashed SQL Server2000 when I added the WINXP SP2, and had to reinstall
it. When I did, my database(DEV_DATA) remained intact, but when I go in
thru Enterprise Manager, it is not located in the system tree, and is
therefore inaccessible. Can anyone suggest how I could get this database
i... more >>
Newbie problem with counting rows
Posted by webermax2004 NO[at]SPAM yahoo.fr at 9/6/2004 3:37:43 AM
This is a refinement of my previous problem. I have the following
table :
C0 | C1 | C2
----+----+----
A | 1 | X
----+----+----
A | 1 | X
----+----+----
A | 2 | X
----+----+----
A | 1 | Y
----+----+----
B | 1 | X
----+----+----
B | 1 | X
I want to write a request... more >>
SQL 2000 tape backup fail
Posted by ay_xu NO[at]SPAM yahoo.com at 9/6/2004 12:59:30 AM
Environment: Win Server 2003 Standard Version, SQL Server 2000, HP
DDS3 Tape(local).
Backup procedure:
1. open SQL Server Enterprise Manager
2. find the database i want to backup
3. right click and select "All Tasks"-"Backup Databse..."
4. Select "destination"-"backup to"-->>"Tape"
5. Click ... more >>
Page vs Row locking...
Posted by Randall Sell at 9/5/2004 1:17:41 PM
Hello all,
Somewhere on these newsgroups I recall reading that SQL Server 6 and prior
(when they were married with Sybase) used page locking and not row level
locking. Hence you could be locking a lot more records then what you think
when doing an UPDATE or INSERT SQL.
Now I notice that ... more >>
select and insert in one sp
Posted by rick NO[at]SPAM abasoftware.com at 9/4/2004 8:22:12 PM
I want to write a single sp where I pass in the column values and if
it finds an exact match it returns the refid of that match else if it
doesn't find it, it adds a new row using the passed in values and
returns the RefID (primary key) of the new row (identity). I only
want one return value, ... more >>
What fields are used?
Posted by azdjedi NO[at]SPAM hotmail.com at 9/4/2004 5:22:26 PM
Hi,
Is there a way in SQL Server, or Access to determine what fields are
being used in reports or joins, etc?
Scenario:
Field A in Table 1 is going to be either deleted or change data types,
and I'd like to know what impact that will have.
Yes...No?
Thanks,
Bodi... more >>
Looking for SQL Databases for
Posted by Beringer at 9/4/2004 4:07:56 PM
Hello,
I am currently looking for databases that contain available prescription
medications and diagnosis codes (i.e. ICD9 medical diagnosis codes) that
have been created using SQL.
Anybody know of companies that have these commerically available?
Thanks,
Eric
... more >>
converting access db to mysql
Posted by chicha at 9/4/2004 3:29:02 PM
Hey people,
I have to convert MS Access 2000 database into mysql database, the whole
thing being part of this project I'm doing for one of my faculty
classes. My professor somehow presumed I knew db's and gave me long list
of things to do with that particular database, first thing being that
... more >>
Write from MS SQL to MySQL
Posted by funkdm1 NO[at]SPAM yahoo.com at 9/4/2004 12:10:29 PM
I have a MS sql 2000 db that needs to sync with a Mysql db.
When a password is changed in the MS SQL table, I need to make sure
that the same value is updated in the Mysql db.
I dont have any control of the gui that is initiating this event. So,
I was thinking a trigger might be an alternate... more >>
Restoring backup from MSSQL6.5 in SQL Server 2000
Posted by Robert Kruk at 9/4/2004 11:32:00 AM
Hello,
Recently I've tried to restore backup made on SQL Server 6.5.
Unfortunately, the only version of SQL Server I currently possess is SQL
Server 2000. I have access only to that backup, because I've made it a
few years ago, and the main db file doesn't exist any more ;( I would be
grate... more >>
ROW LEVEL SECURITY
Posted by elham_gh NO[at]SPAM yahoo.com at 9/4/2004 6:03:47 AM
How can I implement "Row Level Security" in SQL Server 2000?
Thanks alot.... more >>
slow sql update MS SQL 2000
Posted by rcamarda NO[at]SPAM cablespeed.com at 9/3/2004 6:01:40 PM
I have the following statement that takes quite a long time. Longest
of any of my SQL statment updates.
UPDATE F_REGISTRATION_STD_SESSION
SET PREVIOUS_YEAR_SESSION_ID = (
SELECT s.previous_year_session_id
FROM F_REGISTRATION_STD_SESSION R
,DS_V4_TARGET.dbo.D_H_Session_By_Sess... more >>
configuring locks in awe system
Posted by aswinee NO[at]SPAM yahoo.com at 9/3/2004 2:14:36 PM
I am running Microsoft SQL Server 2000 - 8.00.760 Enterprise Edition
on Windows 2003 Enterprise Edition (NT 5.2 Build 3790:) I have 4CPU
and 8GB of RAM. I have AWE enabled, /pae /3gb switch is on in
boot.ini, In my errorlog I have noticed few times error messages as
"The SQL Server cannot obtai... more >>
dropserver
Posted by AHartman at 9/3/2004 2:12:53 PM
We are on Sql2000 on a Win2003 server and we had to rename the machine.
So I did a:
sp_dropserver xxxx
then sp_addserver aaaa
All appears okay execpt when I do a:
select @@servername --- this is null
If I do select * from sysservers the name appears.... more >>
Script to Export SQL Tables to Access
Posted by Mello at 9/3/2004 9:52:11 AM
Mello
I am not sure if this is eaven possible but I need a script to quickly
export selected tables from a SQL database into Access.
The script should preferably run from an ASP page on demand or perhaps
be triggered by an update of one of the selected tables.
Any help will be greatly app... more >>
Special Character
Posted by Santo Santis at 9/3/2004 9:23:51 AM
How can I insert by asp a string containing '
That's the string
Asp code:
SQL = "insert into tablename (columnA) values ('" & variable & "')"
The problem is when variable contains a ' (single quote), it stops the
string definition and get an error.
Can I do something?
Thanks
... more >>
Wildcard doesn't match using LIKE '%' on a varchar field, wierd!
Posted by niallporter NO[at]SPAM yahoo.co.uk at 9/3/2004 3:28:38 AM
Right this has to be a Micro$oft mess-up surely...?
I'm running SQL 2k standard with SP3. I have a table which I'm trying
to query using a LIKE operator on a varchar field as follows
....
WHERE dbo.tbl_pm_projects.SeniorManagerID LIKE '%'
....
In actual fact the % is passed in by the ap... more >>
How to force unique entries in a linking table?
Posted by grist2mill NO[at]SPAM excite.com at 9/3/2004 1:59:05 AM
I have a table 'Group2Operation' that stores many to many relations
between the 'Group' table and the 'Operation' table (each group is has
permission to perform one or more of the available operations)
PROBLEM
=======
I need to prevent duplicate entries being created. e.g. lets say that
in t... more >>
Counting Occurences
Posted by Cam Bevis at 9/2/2004 9:32:19 PM
I'm having trouble getting my head around this, and no one in the groups
has posted exactly the problem.
The table below tracks site traffic across a network. There is 1 row
per pageview and UUID is that user's unique cookie.
CREATE TABLE [dbo].[Stats_Working] (
[inac_stats_id] [int] NOT ... more >>
Unable to create object error in sp_SendSMTPMail
Posted by busrhogan NO[at]SPAM hotmail.com at 9/2/2004 6:53:51 PM
Hello,
I am attempting to send emails using T-SQL (in a SQLServerAgent Job)
using the stored procedure sp_SendSMTPMail. I created the stored proc
using the following script that I got off a post here on google.
CREATE PROCEDURE sp_SendSMTPMail (@From varchar(255),
@To varchar(8000),
... more >>
SQL server notification services : Help
Posted by aj70000 NO[at]SPAM hotmail.com at 9/2/2004 3:26:54 PM
Hi,
I am a newbee to sql server. I know there is a tool called
Notification Services. I want to set up notification for specific
entries in sql server table.
Thanks a lot for your guidance.
AJ... more >>
SQL and XML
Posted by karrys NO[at]SPAM gmail.com at 9/2/2004 3:15:15 PM
Hi gurus of XML and SQL
I am a newbie to this world.
I am trying to retrieve xml from sql server database using asp and
post it to a website.
So the steps that need to be done are
1. Form the XML (not a standard format)
2. Gather it in a variable or something in the ASP form.
3. Find a ... more >>
MS Graph Object (!!!HELP!!!)
Posted by Dave_Burkett NO[at]SPAM SBCGlobal.Net at 9/2/2004 12:23:57 PM
I have an report in Access 2003 that has a chart on it. It works
fine, but I'm trying to change the colors on the chart to match the
content. I've referenced VBAGRP9.CHM to try and figure this out. Can
someone tell me where I can apply the below string so that I can
change the values? Everywhe... more >>
Cumulative weeks
Posted by reggymcreg NO[at]SPAM hotmail.com at 9/2/2004 10:01:12 AM
SQL Server 2000 SP3
Hi,
How can I get the cumulative weeks from a givedate to the current
date. I know I can get the weeknumber by using datepart(wk,getdate())
but this will give
me the week number for this year. What if I want to know the number of
weeks
that have passed since june 1 200... more >>
Empty a table before using DTS to append records?
Posted by Larry Rekow at 9/2/2004 10:00:20 AM
In Access I have a macro that, each night, takes a table with a
primary key defined in it, and deletes all the rows. Then it
imports/appends records from a fixed width text file. In this way,
since the table is not deleted and recreated, the primary key is kept
intact.
What would be the equ... more >>
Disaster - moving databases
Posted by barbara_2003 NO[at]SPAM hotmail.com at 9/2/2004 4:02:12 AM
We've all data and log files located in SAN mount point. In case of
primary server crash, is it possible to unmount the volumes and
remount at secondary server? Do we have any problems with master DB
moving this way. Detach,attach or backup/restore are not our options.
Thanks... more >>
Simple I think
Posted by Houston at 9/1/2004 11:47:40 PM
I have a form that after being filled out has its contents written to a
database and then goes to confirmation .asp page. I want the confirmation
page to be personalized but I am not sure how to pass the "name" parameter
to the confirmation.asp page. I know I am going to kick myself whrn I see
... more >>
How to get String representation of a Hex number?
Posted by supratim NO[at]SPAM sagemetrics.com at 9/1/2004 10:25:31 PM
Hi,
I want to get the string representation of a hex number from a
varBinary column of a table.
For example I want to get the output : 'The Hex value is 0xFF'
but
select 'The Hex value is ' + convert(varchar(10), 0xFF)
retruns the ascii charecter for 0xFF
Any idea how do I get... more >>
help with data transformations with outer join?
Posted by pibble NO[at]SPAM yahoo.com at 9/1/2004 5:56:26 PM
Hello all.
I am trying to write a query that "just" switches some data around so
it is shown in a slightly different format. I am already able to do
what I want in Oracle 8i, but I am having trouble making it work in
SQL Server 2000. I am not a database newbie, but I can't seem to
figure th... more >>
SQL Server Identity Field
Posted by jcelko212 NO[at]SPAM earthlink.net at 9/1/2004 3:50:04 PM
>> I have an identity field [sic] on a table in SQL Server ... If I
remove a record [sic] from this table, the identity sequence is
broken. <<
Your problem is that you still think in terms of files, records, and
fields and do not understand an RDBMS model of the world. A real SQL
programmer ... more >>
Simple/General SQL Question
Posted by justin.torkelson NO[at]SPAM noridian.com at 9/1/2004 1:31:14 PM
I have a table that we use for audit trail purposes and I need to
evaluate the last row that was enetered for a particular case to see
if it meets certain criteria and if it does I need to return all the
rows that pertain to that case. Thanks in advance for the help.... more >>
Stop/Start MSDE Process
Posted by tombat at 9/1/2004 12:53:34 PM
how i can do it?
Under Xp/2000, i write a application that stop/start this serices, but
under Win98, how i do it?
Exists a method via SqlServer or a dos command to stop/start the MSDE
program?
Thanks a lot
Tomas
--
Questa è una firma automatica di MesNews.
Sito: http://mesnews.no-i... more >>
SQL Server Identity Field
Posted by kaylisse NO[at]SPAM yahoo.com at 9/1/2004 11:52:21 AM
I have an identity field on a table in SQL Server. The identity seed
is 1 and the identity increment is 1. If I remove a record from this
table, the identity sequence is broken. For example:
Table contents prior to record delete:
Fname(varchar), Lname (varchar), row_id (identity)
-----------... more >>
DTS - import flat textfile into two separate tables
Posted by Larry Rekow at 9/1/2004 10:43:06 AM
I have a report that's created each day as a flat textfile.
Because I came from the Access world, I created a macro that imports
it with a schema that gives meaningful names to the various columns,
and then uses a query to massage some of the data for me (deletes the
first blank row and does a... more >>
SELECT query help - Zero padding
Posted by Rowland at 9/1/2004 9:41:39 AM
Hi,
I've got a field that stores numeric values, representing a tracking number.
I've also got a stored procedure that will extract this field and return it
to a client. However, I would like to return it slightly differently to the
way in which it is stored. Basically, I want to return it as ... more >>
SQLXML classes deserializing.... nothing....
Posted by gordingin NO[at]SPAM consiliumsoft.com at 9/1/2004 9:08:48 AM
I am using SQLXML to pass data back and forth, well I am trying to. I
try to follow a tutorial but it didn't work completely. Here is my
problem. After everything executes with NO errors, my class has no
data. Here were my steps.
1. In Query Analyzer, I ran my Select statement....
Select *... more >>
Help with Error Message
Posted by ECorriher NO[at]SPAM profit-tech.com at 9/1/2004 8:40:27 AM
Could someone help me out here? I have created a pretty large Stored
Procedure with about 5 different parameters however, when I run the
procedure I get the following error:
"Syntax error converting the varchar value 'select..."
Where do I even start to find this error?
Thanks in advance... more >>
Database and Log maintenance
Posted by serge at 9/1/2004 8:02:58 AM
Running SQL Server 2000 Enterprise Edition SP3. The database is also
used by Microsoft Project Server 2002 and also has OLAP views, so the
database is being used to view/run cubes in the Analysis Manager.
What is the best way of shrinking the database size and its log file too?
Is there an a... more >>
DTS Excel Import, Transform - how do I use "OR" clause in SQL Query
Posted by bourgon NO[at]SPAM gmail.com at 9/1/2004 6:09:59 AM
Howdy. I'm trying to build a query that will take an Excel file and
pull a few rows of data from a particular sheet. I'm having a problem
with my WHERE clause - I can can tell it to import WHERE a field
matches a value, or WHERE the field matches another value, but not
both.
I've tried bunche... more >>
script to spot OS/SFW/HDW changes on my SQL servers?
Posted by emebohw NO[at]SPAM netscape.net at 9/1/2004 6:07:10 AM
Hi all. I am looking for a script that I might use to spot OS,
hardware, registry changes. Also be nice if I could tell when someone
loads new software or unistalls old, by I guess I would see that in
registry changes? I would settle for any of the above...the situation
is we have some network e... more >>
OUTER JOIN with multiple tables and a plus sign?
Posted by TeleTech1212 at 9/1/2004 3:57:54 AM
I am trying to select specific columns from multiple tables based on a
common identifier found in each table.
For example, the three tables:
PUBACC_AC
PUBACC_AM
PUBACC_AN
each have a common column:
PUBACC_AC.unique_system_identifier
PUBACC_AM.unique_system_i... more >>
SQL Server and Clipper/dBase
Posted by level8 NO[at]SPAM freemail.hu at 9/1/2004 3:20:08 AM
I would like to see a Clipper/dbase DBF file as a table in SQL Server
7.0. How can I SELECT rows from DBF file? Should I use OLE DB Provider
or ODBC, and how?... more >>
|