all groups > sql server (alternate) > november 2003 > threads for november 15 - 21, 2003
Filter by week: 1 2 3 4 5
Migrating from Excel to sql-server
Posted by Helmut Blass at 11/21/2003 8:37:06 PM
Hello,
I have got the job to migrate data from an Excel-sheet to a
sql-server-database. I have a lot of experience with Access but
Sql-Server is not in my line.
So who can give me some advice about how to do this job?
thanx for your help, Helmut
... more >>
trouble using the CONTAINS() function in sql server
Posted by jfreets2 NO[at]SPAM yahoo.com at 11/21/2003 3:59:47 PM
I am having trouble using the CONTAINS function in sql
server(enterprise manager). I am typing the following:
Select *
FROM mytable
WHERE CONTAINS(myfield,'mystring')
This returns the error:
Query Designer encountered a MS Design Tools error:
ODBC error:[Microsoft][ODBC SQL Server Dri... more >>
Help With Stored Proceedure Please
Posted by John Webb at 11/21/2003 2:57:13 PM
Hope someone can help.
I am trying to write a stored proceedure to display sales activity by month
and then sum all the columbs.
The problem is that our sales year starts in April and end in March.
So far I have been able to get the sales info my using to sp's, one that say
month >3 and the o... more >>
increase Ram?
Posted by Mtcc at 11/21/2003 1:04:44 PM
i have DB 2GB on disk.
if i increase tha ram up to 4GB, the sql sever use with the
ram to his temporary table while process quiry?
... more >>
Update query with sub-queries to find the values
Posted by jim_geissman NO[at]SPAM countrywide.com at 11/21/2003 12:58:25 PM
Help, please. I am trying to update a
table with this structre:
CREATE TABLE Queue (PropID int, EffDate smalldatetime,
TxnAmt int)
INSERT Queue (PropID) SELECT 1
INSERT Queue (PropID) SELECT 2
INSERT Queue (PropID) SELECT 3
....from this table...
CREATE TABLE Txns (PropID int, TxnD... more >>
Help with search results query
Posted by Thumper NO[at]SPAM kqrsrocks.com at 11/21/2003 12:01:33 PM
I need some help with a query. I have a table with inventory that I
need to allow customer searches on. Based on their search criteria, a
preference level is calculated; the higher the preference level, the
higher on the order on the search results.
The hard part is when the results are supp... more >>
Dynamic create table, create index based upon a given database
Posted by A.M. de Jong at 11/21/2003 11:34:38 AM
Can I dynamically (from a stored procedure) generate
a create table script of all tables in a given database (with defaults etc)
a create view script of all views
a create function script of all functions
a create index script of all indexes.
(The result will be 4 scripts)
Arno de Jong,
The... more >>
altering data
Posted by Gunnar Kleive at 11/21/2003 11:24:25 AM
Hello!
I have a problem that I really could use some help to solve. I have a table
which looks like this:
id1, id2, id3, rate, ratenr
Examples of a select * from this table would be:
1047336399 21000 1 617 1
1047336399 21000 1 624B 1
1047336399 21000 1 ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Chinese chars through stored procedures...
Posted by Etienne M. St-Georges at 11/21/2003 11:10:24 AM
Hi,
I have a problem with my Stored Procedures...
Recently we decided to change the type of our column in our databse from
varchar to nvarchar because of new customers (chinese).
Everything works fine EXCEPT the stored procedures... When i try to pass
chinese characters for a simple SP that th... more >>
Active Directory Implementation
Posted by etypejag at 11/21/2003 10:26:12 AM
We are implementing Active Directory. I need to know if this will present
any issues/changes for our SQL Server 2000 servers.
TIA
Dave Edwards
... more >>
How to avoid Reference problems
Posted by raghuraman_ace NO[at]SPAM rediffmail.com at 11/21/2003 6:09:54 AM
Hi,
I have some tables which have references between them.
If i delete the reors in the child tables , since it references the
column of the parent , i get error msg in my front end (quite
natural).
do u tell me how to delete the child table records with out affecting
the relation ships or... more >>
Working Linked Servers
Posted by raghuraman_ace NO[at]SPAM rediffmail.com at 11/21/2003 6:00:48 AM
Hi,
I was thinking abt linked servers deals only with multiple servers
physically inter-connected.
Now i come accross that we can link our non-sqlserver databases also.
It is thru the E.manager by
Security->linked servers -> Other databases -> access(jet 7.0).mdb
if it is ok , all t... more >>
How to store .wav or .mp3 file in SQL Server 2000
Posted by pratik.kothari NO[at]SPAM dadomain.com at 11/21/2003 3:30:35 AM
Hi,
I have a problem to store .wav and .mp3 file to store in SQL Server
2000.
How can I store this?
Can any one give me code regarding this. I have little bit idea. But
I need some technical help in Code.
Thanks in advance,
Pratik... more >>
retrieving long texts from msqql
Posted by obscurr NO[at]SPAM hotmail.com at 11/21/2003 1:37:04 AM
When I SELECT text FROM mytable, I don't retrieve all the data in that
column. When I take a look directly inside the database, I can see
that there exists more data than I get when running the select query.
How can I get all the data retrieved?
obscurr... more >>
Adding Calculated Fields
Posted by Scrappy at 11/20/2003 7:51:20 PM
I have a table with some fields. break_mon, lunch_mon, dinner_mon, ent_mon,
break_tue, lunch_tue, dinner_tue, ent_tue, .....etc
I want to output the sum of the four monday columns as well as the sum of
the four tuesday columns.
I did this with
SELECT break_mon+lunch_mon+dinner_mon+ent_mo... more >>
TImeStamp or not
Posted by laurenquantrell NO[at]SPAM hotmail.com at 11/20/2003 7:35:30 PM
Is there any reason to have a TimeStamp column onto a table that has a
PrimaryKey when using SQL Server and an Access front end?
I read that doing so will always eliminate that write conflict error.
But I notice that when pulling a recordset of 10K records, it takes 3X
less time if I delete the ... more >>
SQL Full-Text Search in VB code
Posted by Trevor Fairchild at 11/20/2003 6:50:36 PM
I'm trying to execute a full-text query from a vb.net web application.
The problem I have is that in SQL Server, the syntax for a full-text
search is
SELECT *
FROM table
WHERE CONTAINS( *, ' "searchstring" ')
For whatever reason, VB won't run that search string unless I eliminate
the do... more >>
Script out objects
Posted by second714 NO[at]SPAM hotmail.com at 11/20/2003 3:26:12 PM
Is there any command to script out tables/stored procedures?
I want to make a process to script out tables every night.
thanks,... more >>
Query help
Posted by sgtembe NO[at]SPAM hotmail.com at 11/20/2003 1:06:33 PM
Hello Everyone,
I have a query that looks something like this:
DEFINE @VAR_A VARCHAR(6)
DECLARE trsite_cursor CURSOR FOR
SELECT DISTINCT AppField
FROM TABLE_1
ORDER BY 1
OPEN trsite_cursor
FETCH NEXT FROM trsite_cursor INTO @VAR_A
WHILE @@FETCH_STATUS = 0
BEGIN
SET @SELCMD ='S... more >>
Substring'ing a Number-field
Posted by Mirador at 11/20/2003 12:30:48 PM
Hi :) and thanx for reading my post.
I have to create a view based on a character in a number-field (fnr)
which is 11 char's long. I have to get character nr "7".
The problem is that i cannot use :
--> SELECT fnr FROM table WHERE substring(fnr,7,1)
since it's not a string.
Any other wa... more >>
Why isn't this variable updating?
Posted by stevesusenet NO[at]SPAM yahoo.com at 11/20/2003 11:49:02 AM
Hi;
I have a sqlserver database with a field that is of TEXT datatype (
not my decision) that is used to store comments from users on one of
our websites.
For various reasons I need to make code that will clean the text in
this field
( for example purposes mytable.comment ) so that there a... more >>
BULK INSERT FROM UTF-8 FILE
Posted by Tobes (Breath) at 11/20/2003 11:37:29 AM
Hi there,
I have some text files saved using a UTF-8 encoding. The "BULK INSERT"
statment in Sql Server 2000 is failing with a column length error. Saving
the file as ASCII removes the problem. However, I would like to import files
in UTF-8 format. I understand that the BCP tool, when used fro... more >>
copying a table from one database to another "last" doesn't appear the same
Posted by jfreets2 NO[at]SPAM yahoo.com at 11/20/2003 10:51:15 AM
In enterprise manager I am copying a table from one database to
another. I am using the dts wizard to import the data. After I
successfully import the data, I open both tables to compare the
records to make sure they are the same. I right click on a field and
click "last" for both tables. How... more >>
Query Analyzer - not printing output
Posted by mjb5123 NO[at]SPAM yahoo.com at 11/20/2003 10:22:43 AM
Is there something that can be set in SQL to not print output to the
screen? Something like SET NOCOUNT ON, only in this case, I don't
want it to print any output except what my script specifies in PRINT
statements. Any ideas? Thank you.... more >>
connecting jdbc type 4 with ms sql server.
Posted by vishnu_mahendra NO[at]SPAM yahoo.com at 11/20/2003 9:31:15 AM
Hello to all,
I am using windows 2000 and i want to connect to ms sql server with
jdbc type 4 driver.
can you give me sample code and few tips to get me through this.,
thank you in advance,
vishnu.... more >>
What shrinks when shrinking
Posted by jmosey NO[at]SPAM cayen.net at 11/20/2003 9:00:36 AM
A huge (and never used) database log was taking up about 4 GB of HD
space. We want the data for historical capacity, however, don't care
about the transactions log.
After a bit of research I ran the script on:
http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/suppo... more >>
View or Stored Proceedure?
Posted by johnmartinwebb NO[at]SPAM hotmail.com at 11/20/2003 8:58:53 AM
Hope you can give me some advise.
I am wanting to build a databse driven website. I am using Access to
connect to an SQL 2000 server to create tables etc.
I am using ASP/ASP.Net to build my site.
The question I have is on best method to retrive data. Lets say I have
a Table of Products, a... more >>
SQl debugger ! how
Posted by raghuraman_ace NO[at]SPAM rediffmail.com at 11/20/2003 7:23:07 AM
Hi,
Could u tell me how to use the debug tool to debug out t-sql statements .
With Thanks... more >>
Important !!!!!
Posted by elfouraq NO[at]SPAM ifrance.com at 11/20/2003 6:28:01 AM
Hi,
Why Have i an error with sql server :
Exception 0xc0000005 EXCEPTION_ACCESS_VIOLATION at 0x69B53F85
11/20/03 14:05:04 spid 52 Exception 0xc0000005
EXCEPTION_ACCESS_VIOLATION at 0x69B53F85
I use this procedure, called by trigger :
exec @hr = master.dbo.sp_OACreate 'MSXML2.ServerXMLHT... more >>
pivoting query on t-sql
Posted by bhetong22 NO[at]SPAM yahoo.com at 11/20/2003 6:03:14 AM
gud day.
please help me. im working right now on a case study that will
retrieve/produce a simple report on sql. my problem is I dont know how
to pivot queries like in access. please help me. thanks... more >>
Query Time Outs
Posted by budgie NO[at]SPAM doormat.za.org at 11/20/2003 3:22:49 AM
Hi All.
I have some rather large SQL Server 2000 databases (around 60GB).
I have set up jobs to re-index the tables and update statistics every
sunday. This worked will for a few months. Now after a day or two of
using it the connections to it keep timing out. If i start the jobs
manually... more >>
Query Help....
Posted by arijitchatterjee123 NO[at]SPAM yahoo.co.in at 11/20/2003 2:52:30 AM
Dear All,
I need a help in writing a query.I am explaining the details.
Tables1 containing
EmployeeNo Status
========== ======
00001 A
00001 P
00001 L
00001 A
00001 P
00001 L
00002 A
00002... more >>
Help with Select - into
Posted by bilaribilari NO[at]SPAM yahoo.com at 11/20/2003 1:53:50 AM
Hi everybody,
I have two tables 'tab1' and 'tab2'. 'tab2' contains the same columns
as 'tab1'. 'tab2' does NOT contain any of the constraints of 'tab1',
just the fields. When I create this 'tab2' table using CREATE TABLE,
it gets created fine. Then I use a stored procedure which has a SELECT
... more >>
Information on Installing 'QMF' In SQL Server on Win2000?
Posted by basis_consultant NO[at]SPAM hotmail.com at 11/19/2003 7:47:24 PM
Hello,
I am installing SAP R/3 on Win2000/SQL Server. There is a CD with the
SQL Server RDBMS, as well as another one with SP 3A (Both are from
SAP). According to the SAP installation manual, after installing those
I have to install 'QMF' for SQL Server. It indicates to check
Microsoft's docu... more >>
Help with a stored procedure/query?
Posted by newsgroper NO[at]SPAM yahoo.com at 11/19/2003 5:36:23 PM
I did a join on two tables to get the following results. I saved the
results in a #temptable.
id table2id table2descrip dateinserted
====================================================
1 3 descrip1 11/3/2002
2 4 descrip2 11/2/2002
3 3 descrip1 11/4/2001
4 3 descrip1 10/5/2003
5 4 ... more >>
How to know what schema was modified
Posted by forlist2001 NO[at]SPAM yahoo.com at 11/19/2003 1:20:39 PM
Hello,
Is there a way in MSSQL server to find all the objects in the database
based on the modified date rather than the created date.
Thanks in advance
Kumu... more >>
Database Alias
Posted by Ben at 11/19/2003 12:17:44 PM
Hi,
Is there any way to set up an alias for a database within an SQL script?
What I'm trying to acheive is... instead of having -
<DatabaseName>.dbo.table, <DatabaseName2>.dbo.table, etc. - throughout the
script, I just set up an alias at the top of the script and reference them.
TIA
Ben
... more >>
>= in Case Statement - Stuck
Posted by ryanofford NO[at]SPAM hotmail.com at 11/19/2003 6:28:37 AM
I'm struggling with a Case statement. The problem I has is with doing
>= I can use any value in there, but need to check if it's greater or
equal to 1. I'm sure I'm missing something but can't figure out what.
I've put the line below in case anyone has any suggestions. I've
limited it to the o... more >>
TEXT data type column: Replacing chars : why isn't this routine working?
Posted by stevesusenet NO[at]SPAM yahoo.com at 11/19/2003 2:45:59 AM
Hi;
I am trying to write a rountine ( below ) that will go into a colum of
text data type ( fae.pmcommnt ) locate the word "to" and replace it.
I have the routine below. I get no error messages, but it also seems
to do nothing :).
Any clues would be greatly appreciated.
Thanks
Stev... more >>
Error while Creating table using Select Command
Posted by shane_blr NO[at]SPAM hotmail.com at 11/18/2003 9:42:02 PM
Hi All,
I am new to MS SQL Server.I am using MS SQL 2000.I have a problem in
creating a table by using Select command.I have table called "test"
and i want to create another table with the same structure and rows.I
tried with the following command
create Table test1 as select * from test;
... more >>
Date Comparison Issue
Posted by Icarus at 11/18/2003 10:28:14 AM
Hi all,
I am trying to create a stored procedure that will check a date field.
I want to check for records that are equal to or greater then 90 days
from the current date. I am trying to check this against a field
called LastUpdate. Is there an easy way in SQL to do this?
TIA... more >>
Query optimization question...
Posted by ticars NO[at]SPAM yahoo.com at 11/18/2003 10:17:55 AM
I'm trying to optimize some queries on an existing system, and I'm
noticing some odd behavior. I'm performing a join between several
tables, the final table being joined by the optimizer has a clustered
index on the field that it is using to join to the rest of the query,
but for some reason SQ... more >>
Parellism not working
Posted by gclarke NO[at]SPAM euro.banta.com at 11/18/2003 9:34:33 AM
We have migrated databases from SQL7 to SQL2000 Standard Edition. Now,
when we run queries against the newer hardware running SQL2000 we
notice that the execution plan shows no parallelism taking place. The
SQL2000 config. has 2 processors and both procs are enabled in the
Processor tab.(use all... more >>
acess I/O File
Posted by bego_colomer NO[at]SPAM yahoo.es at 11/18/2003 4:09:07 AM
Is it possible to access a file (for example, to write in a text file)
with transact-sql?.
I've create a stored procedure and I'd like to write in a log file
some traces depends on the result of the statements executed in this
stored procedure.
Thanks... more >>
SQL Reports.
Posted by kothari_pratik NO[at]SPAM hotmail.com at 11/18/2003 3:21:28 AM
Hi,
I have some queries regarding SQL Reports.
1. What is SQL Reporting Services?
2. What is it's Architechture?
3. When it gonna release?
It is urgent.
If somebody can give me answers quickly.....
Thanks in advance,
Pratik... more >>
good SQL book?
Posted by michael nieuwenhuizen at 11/17/2003 10:13:06 PM
hello, for a new job i might have to learn SQL. i've never
worked with databases or SQL, so i'll need to learn. can
anybody advice me on what would be a good book to learn
from? i'm quite an experienced programmer, so it doesn't
have to be a dummies guide, and preferably not a bulky book
lik... more >>
How to get values from queries, and then using in another query?
Posted by Iain at 11/17/2003 8:43:57 PM
Hi
I have the following tables and stored procedure. I need to pass a value to
the stored procedure and have it use the value in a query. After running
that query it will return an ID which is then used in an insert statement.
At present the values in @MovieId int, @UserID int are left empty... more >>
SQL 2000 Database files become read-only after reboot
Posted by chunman NO[at]SPAM iloveilove.com at 11/17/2003 8:20:56 PM
When I restart the machine, the sql 2000 database files become
"Read-Only".
In the Enterprise Manager this DB is marked as "suspect". After I
remove "read only" attribute form the files, and restart the server,
it works just fine until next reboot. Who knows the reason of this
problem? And How ... more >>
READ_UNCOMMITTED problem with SQL 2000 and i-net Opta 2000 JDBC
Posted by second714 NO[at]SPAM hotmail.com at 11/17/2003 5:47:52 PM
Hi,
I have a problem to set a JDBC connection as READ UNCOMMITED.
setTransactionIsolation(Connection.TRANSACTION_READ_UNCOMMITTED)
This is causing lots of blocking on tables
and update or insert doesn't work properly.
Does anyone have any idea what I'm missing here?
I asked i-net suppo... more >>
ANN: SQL Converter (Oracle -> MS SQLServer)
Posted by pr NO[at]SPAM joyjoin.com at 11/17/2003 3:05:33 PM
Hi all,
I have developed a SQL conversion tool named 'JoyJoin'.
It converts Oracle SQL to ANSI SQL.
eg. This tool converts:
select a.f1,b.f2 from table1 a , table2 b where a.f1 = b.f1(+)
to
select a.f1,b.f2 from table1 a left join table2 b on a.f1 = b.f1
select decode(a.f1,'-1','Tru... more >>
Select where not exists
Posted by lumiya NO[at]SPAM yahoo.com at 11/17/2003 11:24:44 AM
I have a table that has the following fields:
tblECHECK
ID (autonumber identity column)
PTID
Batchnum
Page
DataPoint
DPValue
There are many other tables on which I run a script that tests to make
sure the data meets certain entry requirements (I don't want to put
restrictions on the fo... more >>
Profiler TextData truncation
Posted by hughanderson4 NO[at]SPAM yahoo.com at 11/17/2003 10:32:43 AM
I'm running SQL Profiler to analyze the queries being run against my
SQL server. The problem is, that in the Profiler results, the
TextData column, which contains the SQL statements executed, is
truncated so I don't get to see the entire SQL statements. I've gone
through all the documentation ... more >>
Help with UPDATE
Posted by Guinness Mann at 11/17/2003 9:41:19 AM
I have a column in one of my tables that needs to have about half of its
values updated.
The data looks like this:
A\B0andSomeVaryingStuff.mp3
I'd like to update it to:
A\C-B0andSomeVaryingStuff.mp3
The A, \-sign, B, C, .mp3 and - are literals. The
"andSomeVaryingStuff" changes. ... more >>
To find any text in all Stored Procedures
Posted by hqureshi1103 NO[at]SPAM rogers.com at 11/17/2003 6:27:55 AM
Hi Guys,
I want to find any specific text in all SQL server stored procedure.
How can I do this. Please let me know
Thanks in Advance... more >>
Error executing xp_cmdshell from within a SQL task in a DTS package...
Posted by jags_32 NO[at]SPAM yahoo.com at 11/17/2003 3:07:16 AM
Hello
I am trying to execute ‘xp_cmdshell' from within a DTS package that
was created by another person. When I try to execute that ‘SQL Task'
selectively from within the package, I get the following error
message:
Error Title: Package Error
Error Details:
Error Source: Microsoft OLE DB... more >>
Loading backed-up user database in SQL Server 2k
Posted by arijitm NO[at]SPAM catsglobal.co.in at 11/17/2003 12:30:23 AM
Hi ,
I have a file presumably backup of a User database from a SQL
Server(2k) database. I want to load/restore that in a local SQL Server
to be able to see the table , views , etc present in the database.
How do I do that ?
Thanks,
Arijit... more >>
SQL 2000 backup on DLT tape
Posted by chirath NO[at]SPAM flashmail.com at 11/16/2003 11:14:58 PM
Hi
We are running SQL 2000 Enterprice version with SP3a on a Dell
Poweedge 5600 server running Advance Server. It has Tape drive
PowerVault 110T (DLT VS80 Tape Drive) & uses DLT tapeIV tapes. A DB
maintenance job had been specified to backup on to tape daily. I have
following issues;
1.The... more >>
Is it possible to return last row out of multiple based on row index?
Posted by Ted at 11/16/2003 2:01:13 PM
Here's what I'm trying to do:
I have a table, which I don't have administration over, with 4 interesting=
fields:
RecordCount - an auto incrementing primary key
CardNumber - integer
CompanyID - integer
AccessPriv - an string that varies constantly
There could be identical CardNumber's, b... more >>
Clearness needed in Sp_attach_db
Posted by raghuraman_ace NO[at]SPAM rediffmail.com at 11/16/2003 4:58:52 AM
Hi
With the sql server on line help , The syntax for the sp_attach_db has
the file name .It is aslo given that max of 16 files can be geven. I
attached a db with a single d.mdf .
could u pls tell what r the 16 file types or how a db can be attached
with 16 files.
With thanks... more >>
Best way to import ASCII tab delimited file every week (5,000 records)...
Posted by JFOREMAN10 NO[at]SPAM houston.rr.com at 11/15/2003 4:19:03 PM
I need to import an ASCII tab delimited file that has roughly 5,000 records
once a week into a SQL Server table. I have researched BCP and it seems
like the way to go. Am I headed in the right direction?
Thanks in advance,
James
... more >>
Running SQL 7.0+SP4 on XP Pro...
Posted by David L. Rice at 11/15/2003 12:37:14 PM
Is anyone doing this successfully? Were there any problems getting up and
running? Any software patches needing to be downloaded to make this happen?
We have been using Access. I know, it's cheesy, but for the simplistic data
model we've used up until now it worked. However, we've outgrown the ... more >>
'joining' results of 2 queries
Posted by odonnell_matthew NO[at]SPAM hotmail.com at 11/15/2003 5:27:30 AM
Does anyone know how I can 'join' the results of
one SQL query to the bottom of another?
Eg. I have two queries:
1. SELECT Name, Surname FROM People WHERE Surname = Smith
NAME SURNAME
Adam Smith
John Smith
Michael Smith
Steve Smith
2... more >>
|