all groups > sql server (alternate) > september 2005 > threads for september 1 - 7, 2005
Filter by week: 1 2 3 4 5
SQLDMO Object
Posted by Verve at 9/7/2005 11:42:51 PM
Hi,
how to create an SQL DMO object in .net and use it to enumerate the
properties of Sql server. Can we use this object to list properties
without logging in to the server?
... more >>
Inserting large amounts of data
Posted by oshanahan at 9/7/2005 8:43:12 PM
Does anyone have ideas on the best way to move large amounts of data
between tables? I am doing several simple insert/select statements
from a staging table to several holding tables, but because of the
volume it is taking an extraordinary amount of time. I considered
using cursors but have re... more >>
bcp utf8 file
Posted by geekboyed NO[at]SPAM gmail.com at 9/7/2005 5:40:51 PM
I'm outputting a file from a mySQL server that contains 1 column that
has input it many languages. The base definition for the column is
UTF8.
I output the data into a flat file and bcp it to a sql2000 server, and
the multi-byte data does not survive the translation.
Any ideas on how to in... more >>
joining one table with itself
Posted by Maarten via SQLMonster.com at 9/7/2005 11:57:02 AM
Hello all
Let's say I have 1 table "contract" containing the following data:
id year sales
45 2005 100
45 2004 95
89 2005 250
89 2004 275
12 2005 42
I want to make a table with one unique row for each id and then a column for
2004 sales and 2005 ... more >>
Multi-table UDF not returning all rows
Posted by nicolec NO[at]SPAM octitle.com at 9/7/2005 11:46:59 AM
I've been tearing my hair out over this UDF. The code works within a
stored procedure and also run ad-hoc against the database, but does not
run properly within my UDF. We've been using the SP, but I do need a
UDF instead now.
All users, including branch office, sub-companies and companies a... more >>
Schedule a T-SQL Script
Posted by rcamarda at 9/7/2005 10:07:38 AM
I have a T-SQL script that creates a SQL Backup using Idera's SQLSafe.
It works great in QA, but I now wish to schedule the backup, and I am
not sure the best approach.
The script contains cleartext accounts and passwords, so I would like
to avoid storing it on a drive.
I thought I could create... more >>
DTS- Add global varible's value to text file
Posted by Marce at 9/7/2005 9:15:42 AM
Hi, I have a DTS which has a connection, 3 destination text files and a
Process execution job which runs a simple batch file to concatenate
this 3 files into a 4th text file "Endeud.txt". I added an activeX
command Job to input a date which is saved in a global variable. I
need to add this dat... more >>
Logshipping
Posted by pardhi a via SQLMonster.com at 9/7/2005 8:28:54 AM
Hi
I have a problem in logshipping any one help would be appreciated.
during logshipping when i am adding data (log.data,transactlog)to the
destination database when i select the destination server name(server2)it
didn't showing any drives present .instead showing local drives.if i select
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
inner joins
Posted by michaelnewport NO[at]SPAM yahoo.com at 9/7/2005 7:55:42 AM
Greetings,
I like to write my inner joins as below,
but someone at work tells me its not as 'performant'
as using the 'inner join' statement.
Is this true ?
Is there a better way to write it ?
thanks
Mike
SELECT count(*)
FROM resources a, assignments b,
timesheets c, timesheetpayr... more >>
Crosstab Query
Posted by burke.david NO[at]SPAM gmail.com at 9/7/2005 4:00:25 AM
I have two tables Bill and Location.
Bill
(
location_id int,
prod_period datetime,
consumption float,
demand float
)
Location
(
location_id int,
location_name varchar(45)
)
I want to create a stored procedure that takes a parameter of @year. I
basically want the procedu... more >>
Problem with uncommited transactions in log-file
Posted by Holyman at 9/7/2005 12:00:00 AM
Hi group
I have an application running on a couple of pc's all connecting to
the same SQL-serve databaser. The other day one of my applications
started a transaction which it never committed (programming error) .
The application continiued running for a couple og hours filling every
insert ... more >>
writing SQL data to XML files
Posted by Piyoosh Rai at 9/7/2005 12:00:00 AM
Hi guys,
I have been trying to write data from a database to XML files and
although i have been successful in doing that, the file(s) that are made
are not of the form that I would want.
I am using:
SQLDataSet.WriteXml(strFileName, XmlWriteMode.WriteSchema);
to generate the files where... more >>
JDBC deadlock on unrelated records
Posted by MikL at 9/6/2005 11:19:37 PM
Hi all,
I'm regularly getting the "deadlocked..you're the victim" message when two
threads work on a table at the same time via JDBC. The two threads don't
update the same records. I suspect the cause is related to index or page
locks, and/or the fact that the UPDATE statements are doing ... more >>
Slow stored procedures
Posted by Cory at 9/6/2005 4:17:04 PM
Hi,
I have a stored procedure that normalizes data from one database to
another that is included in a SQL Agent job. The job is started by a
trigger so that when a table is updated, the job to normalize data
executes.
This happens once a day in the dead of the night when nothing else is ... more >>
Total Newbie - Maintainenance of SQL Database
Posted by TheScullster at 9/6/2005 4:07:22 PM
Hi all
Sorry if this is such a mega dumb question for this group, but what exactly
is involved in maintaining/supporting a SQL database?
My company is looking at accounting software "Great Plains" which they
intend to run on SQL server.
Having only had experience of a split Access databas... more >>
Problem writing XML files.
Posted by Pi at 9/6/2005 2:22:31 PM
Hi guys,
I have a stored procedure that I will subsequently post below this
message. What the stored procedure does is, it reads some specific
tables in a database and created XML off it.
The problem comes in when the data is bigger than a few hundred/
thousand characters. The data is trunc... more >>
Increasing performance by selecting one table
Posted by Matik at 9/6/2005 9:53:37 AM
Hello all,
I've following problem. Please forgive me not posting script, but I
think it won't help anyway.
I've a table, which is quite big (over 5 milions records). Now, this
table contains one field (varchar[100]), which contains some data in
the chain.
Now, there is a view on this tab... more >>
Getting count with multiple fields
Posted by Alex at 9/6/2005 7:23:10 AM
Hi all,
I'm running into a road block, and I know I've done this before. I'm
getting fields from two tables, and I need to do a count of similar
items with it showing some extra info.
Here's my fields:
Log.LogId - Int
Log.LogDispatcherID - Int
Officer.OfficerID - Int
Officer.OfficerFirs... more >>
Replacing SELECT with a value in an OUTER JOIN
Posted by dumbledad NO[at]SPAM gmail.com at 9/6/2005 4:20:03 AM
Hi All,
I'm confused by how to replace a SELECT statement in a SQL statement
with a specific value. The table I'm working on is a list of words (a
column called "word") with an index int pointing to the sentence they
come from (a column called "regret"). I also have a table of stop words
(cal... more >>
Massive delete in DB
Posted by Antar at 9/6/2005 3:29:10 AM
Hello,
I have a huge database (2 GB / month) and after a while it is becoming
non-operational (time-outs, etc.) So I have written an SQL sentence
(delete) that can reduce around 60% of the db size without compromising
the application data needs. The problem is that when I execute it, the
db doe... more >>
Escape characters
Posted by Sathyaish at 9/5/2005 11:40:47 PM
What should one pass as a field value into a table in the insert
statement if the value contained a percentage symbol (%) or the
asterisk symbol (*), since both of these have special wildcard
meanings. What if I want to pass the special meanings and pass them as
literals? Is there any escape cha... more >>
Regular Expression?
Posted by NickName at 9/5/2005 6:38:58 PM
I need to remove all the [ and ] in every sql stmt where they are used
to close encircling numeric value, fyi, all these sql stmt are
converted from an Access db. For instance,
select *
from XYZtbl
where fieldA = [1] or fieldA = [2] or fieldA = [3]
to be
select *
from XYZtbl
where fiel... more >>
select * from table where column = @AllValues?
Posted by saturnius NO[at]SPAM gmx.net at 9/5/2005 2:01:33 PM
Hello,
I am passing a value to a stored procedure in vb.net to get normally a
selection of the table. How could I get the complete table without
writing the code twice? Many thanks in advance ....
... more >>
Problem with case statement
Posted by chudson007 NO[at]SPAM hotmail.com at 9/5/2005 9:42:05 AM
With the syntax below, why is field1a not "A" if field1 does not
contain "_"
SELECT Field1a = CASE WHEN (field1 LIKE '%_%') THEN (charindex('_',
field1)) ELSE 'A' END, field1
FROM [Table1]
... more >>
Reporting Services - Crystal to SSRS
Posted by Madhivanan at 9/5/2005 7:22:31 AM
I have a requirement to convert reports from Crystal Reports to SQL
Server Reports. Is there any tool to do this? or Do I need to redesign
every report in SQL Server Reports?
Madhivanan
... more >>
brain teaser - stagger the order of the results
Posted by mjweiner NO[at]SPAM gmail.com at 9/5/2005 4:15:33 AM
This one has been stumping me for several days. I can run a query that
returns several different items from several different manufacturers,
each with a ranking score. Each manufacturer can have any number of
items:
Item_Name Manufacturer rank
Item 1 Manu_A 82
Item 2 ... more >>
Double quotes replacement
Posted by NickName at 9/4/2005 8:09:18 PM
Hi,
It seems to be simple, however, it stumbles me.
how to replace all the double quotes (") within the following
sentence (or a column) with single quotes ('),
colA = this is a freaking "silly" thing to do
into
colA this is a freaking 'silly' thing to do
Select Replace(colA,'"',''')
>... more >>
How do I find the highest Unique Identifier?
Posted by stacey at 9/4/2005 5:49:10 PM
I'd like to know the current value of my uniqueID column before I
create a new record.
Is there a way to find out this value?
It is numeric in my case, but I can't just look for the MAX value,
since some records may have been deleted, and the value for the
uniqueID still stays at the higher v... more >>
Question about Service Pack
Posted by SQL Server at 9/4/2005 10:07:59 AM
In query analyzer
If I run this
SELECT @@version
I get this result
-------------------------------------------------------
Microsoft SQL Server 2000 - 8.00.2039 (Intel X86)
May 3 2005 23:18:38
Copyright (c) 1988-2003 Microsoft Corporation
Personal Edition on Windows NT 5.1 (Build 2600... more >>
Slow Query Through Cold Fusion
Posted by robboll at 9/3/2005 2:55:05 PM
Whenever I query my database using Enterprise Manager, the response
time is about a second. When I access the same data via a Cold Fusion
webpage, it takes about 15 seconds (or more) to resolve. I created an
index for the fields involved in the query and updated statistics. It
makes no differ... more >>
osql doesn't work - SOLVED
Posted by theintrepidfox NO[at]SPAM hotmail.com at 9/2/2005 12:48:35 PM
Sory for starting a new message, it won't let me reply to the original.
Problem has been solved.
osql -U sa -s localhost\BALTD
Does the trick.
Thanks for everyone who had a look at it anyway!
Enjoy your weekend!
... more >>
Getting Avg to really ignore null values
Posted by manning_news NO[at]SPAM hotmail.com at 9/2/2005 8:26:18 AM
Using SQL2000. According to Books Online, the avg aggregrate function
ignores null values. ((3+3+3+3+Null)/5) predictably returns Null. Is
there a function to ignore the Null entry, adjust the divisor, and
return a value of 3? For example:((3+3+3+3)/4) after ignoring Null
entry.
If there's... more >>
Left Join Problem
Posted by Ryan at 9/2/2005 4:08:22 AM
I'm going daft. I have what should be a simple query and it seems that
the left side of the join is being ignored. The query and DDL are
below. Basically, my RDOData_Extract_Lines table (where LineNum NOT
LIKE 'LAN%') on it's own gives me 959 records. If I look at the
RDOData_Extract table (with... more >>
Update Table Column based on value from another table?
Posted by Bryan at 9/2/2005 4:00:29 AM
Hi, I have two tables. I want to update two columns in my first table,
[ADD_BSL_SALES] and [ADD_BSL_COST] with two values [Sales] and
[Costs] held in my #temp table but based on a RUN_DATE from my first
table.
Can anyone point me in the right direction?
Thanks in Advance =EF=81=8A
Bry... more >>
Incorrect syntax in user-defined function
Posted by teddysnips NO[at]SPAM hotmail.com at 9/2/2005 2:41:10 AM
In the script below is the DDL to create some tables and a UDF.
What I'm interested in is the UDF at the end. Specifically, these few
lines:
--CLOSE OTRate
--DEALLOCATE OTRate
ELSE -- @NumRecords <= 0
If I uncommment CLOSE and DEALLOCATE and check the syntax I get a
message:
... more >>
Problem expanding a Db table (SQL Server 2000)
Posted by Marcello at 9/2/2005 12:00:00 AM
Microsoft SQL-DMO (ODBC SQLState: 42000) Error 1827: CREATE/ALTER DATABASE
failed.
There's more, but it's in italian and I wouldn't know how to translate it
properly.
It basically says that the requested size is exceeding some 2048mb limit.
I can't see any limitation of this kind in the licen... more >>
3rd party Backup Software and MSSQL 2000
Posted by Stephanie at 9/1/2005 2:19:45 PM
Can SQL 2000 initiate backups to 3rd party applications (like LiteSpeed
and BrightStor's SQL Backup Agent)? My goal is to be able to manage
backup and restores completely through SQL Enterprise Manager and Query
Analyzer without having to logon to the Server and using the 3rd party
backup appli... more >>
COUNT() Idiot
Posted by gregfocker NO[at]SPAM earthlink.net at 9/1/2005 12:48:17 PM
I have three tables: table1 has a one-to-many relationship with both
table2 and table3. When I do a left join to get a count from table2,
it works:
SELECT table1.field1, COUNT(table2.field1) as MyCount
FROM table1 LEFT JOIN table2 ON table1.field1 = table2.field1
WHERE...
GROUP BY table1.fi... more >>
((cdate("1/1/2001")+30) as task_due_date (Not working)
Posted by stoppal NO[at]SPAM hotmail.com at 9/1/2005 12:20:02 PM
I have the below function written in VB, and everything works fine
EXCEPT that the sql code is not executing correctly. The date field is
in the table always shows "12/1/1899 11:59:17 PM" no other date. I'm
should have the date of the input into the function + or - the integer
in the task_due_... more >>
Export Schema in SqlServer 2005
Posted by lbolognini NO[at]SPAM gmail.com at 9/1/2005 1:26:13 AM
Hi all,
sorry for the rather trivial question but I couldn't figure this out by
myself.
How do you export a db schema either from the commandline or from the
GUI (if I remember correctly it's called Management Studio in the new
version).
Thanks in advance,
Lorenzo
... more >>
View field content update when "real" table fields change
Posted by Silas at 9/1/2005 12:00:00 AM
Hi,
I use view to join difference table together for some function. However,
when the "real" table fields changed (e.g. add/delete/change field). The
view table still use the "old fields".
Therefore everytimes when I change the real table, I also needed open the
view table and save it b... more >>
|