all groups > sql server (alternate) > july 2003
Filter by week: 1 2 3 4 5
Sub query message
Posted by S G at 7/31/2003 3:53:11 PM
Hi all,
I have a query as follows:
update stage.FinanceVehicleSummary
set vin = (select VIN from stage.ChasisLookup where
stage.chasislookup.chasis = stage.FinanceVehicleSummary.ChasisNo
and stage.chasislookup.sr_registration_number =
stage.FinanceVehicleSummary.srregno)
and ... more >>
Restoring Database From External Application
Posted by Tom Loach at 7/31/2003 1:59:29 PM
I have the need to restore a database to a user's laptop on a daily
basis. This has been no problem using Enterprise Manager. I found a
stored procedure to run the restore and tried to call it from a visual
basic program. While I can connect to the database, I get an error
telling me "exclusi... more >>
Finding the filegroups associatted with a table in T-SQL
Posted by sgoyal NO[at]SPAM triversity.com at 7/31/2003 1:14:49 PM
Hi,
I want to find out in my SP the filegroup associated with a particular
table? I was not able to establish the relationship between sysobjects
and sysfilegroups table. Is there any other way to find filegroup of a
table in T_SQL?
Also lets say there are 3 dtatfiles in a filegroup 'FG1' and... more >>
UDF starting with fn_...
Posted by John P. Marshall at 7/31/2003 12:59:45 PM
I've read frequently how stored procedures we create shouldn't be named with
sp_ since SQL Server will first check the master db before the current db
when trying to find the sp to execute. I always nodded and thought how I
was glad I hadn't done that. For some reason it never clicked that UDF
... more >>
exporting from SQL to an Outlook group or Dist List?
Posted by francesco NO[at]SPAM neurodesign.com at 7/31/2003 10:28:56 AM
I need to export a list of name and email address fields from a SQL
table, in some format so that a user can take the file I generate and
Import it into Outlook and it will keep all the names together in a
Group or Distribution List rather than dumping them into the user's
main address book. An... more >>
Deleteing duplicate records from my table
Posted by billzimmerman NO[at]SPAM gospellight.com at 7/31/2003 9:56:45 AM
I just discovered that all my records appear twice inside my table, in
other words, they repeat on the row below. How can I delete all of the
duplicates? I'm sure there must be a tidy line of sql to do that.
Thanks,
Bill... more >>
how to query this table into the result like this?
Posted by per at 7/31/2003 6:52:45 AM
im not very good at sql but need to query the database to use in my
programming script.
if the database is just like this
id name parent_id
1 A null <----- root
2 B 1
3 ... more >>
QUERY Exceeding variable max length
Posted by tilak.negi NO[at]SPAM mind-infotech.com at 7/31/2003 4:14:02 AM
Hi,
A query is exceeding the length of varchar and nvarchar variable.
Because I'm picking the data from each record from table and giving it
to the query.
suggest me some way to do it.
sample query:
SELECT P1.*, (P1.Q1 + P1.Q2 + P1.Q3 + P1.Q4) AS YearTotal
FROM (SELECT Year,
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
ntext field from profiler
Posted by wukie at 7/30/2003 10:48:26 PM
I am trying to view all the ntext from a profiler trace. The data is
truncated at 256 and I am not sure why... The max length is 1820 via
this command:select max(datalength(textdata)) from "monitor forms usage"
where textdata like '%gforms%' .
I then issue
set textsize 8000
select (textda... more >>
Update trigger on Linked Server View
Posted by simonfunston at 7/30/2003 2:17:29 PM
Hi there,
I'm pretty new to SQL and am having some porblems with a linked server.
I have a table on a SQL server which stores employee information.
I also have a view on a linked server which stores the same information.
What I would like to happen is, whenever the view changes on the link... more >>
How can I insert a column using a script (instead of appending)?
Posted by warren.wright NO[at]SPAM us.scorex.com at 7/30/2003 11:44:30 AM
Hi,
I recently had to add a new column to a table that resides off-site,
in a customer's environment. Previously, the table had around 300
columns, all of which were in alphabetical order.
I found that the ALTER TABLE command appeared to be only capable of
appending a new column, but wasn'... more >>
Optional values in a Stored Proc
Posted by bwillyerd NO[at]SPAM dshs.wa.gov at 7/30/2003 10:20:51 AM
The following SP gives an error of:
Server: Msg 245, Level 16, State 1, Procedure spSelectSEICData, Line
26
Syntax error converting the varchar value '@' to a column of data type
int.
In the Procedure I am using the Select * for testing purposes.
Here is the proc.
CREATE PROCEDURE spSelectS... more >>
When I compare two string in Unicode format.
Posted by Laurent Liegeois at 7/30/2003 9:43:12 AM
Hi,
I have a funny Error in our sql server 7 & 2000. When I compare two
string in Unicode format. I receive that it is the same when I add new
nchar.
I don’t understand why?
Could you help me ?
declare @str nvarchar(128), @str2 nvarchar(128)
Set @str =
nchar(21121)+ncha... more >>
Accessing SQL Server 2000 via UNIX
Posted by amy_p_tseng NO[at]SPAM yahoo.com at 7/30/2003 9:12:05 AM
Hi,
I am having a problem accessing SQL Server 2000 via UNIX. I am
accessing SQL Server 2000 from Solaris using Sybase Open Client
(CT-Lib). Here is the error message:
CT-LIBRARY error:
ct_connect(): network packet layer: internal net library
error: Net-Library operation terminat... more >>
mssql server
Posted by udo polder at 7/30/2003 7:33:15 AM
hello
can anyone tell me if it is possible to use activeX components (com/dcom) in
MS-sql stored procedures?
tia
... more >>
Job skips certain queries?
Posted by go2toa NO[at]SPAM hotmail.com at 7/30/2003 7:27:33 AM
Has this happened to anyone else?
I have a large job and all the queries run fine when used
individually, but in the job, SQL says completed with success but in
two cases the queries did not run. One of them is even ridiculously
simple: DROP TABLE tblMyTable, etc.... more >>
proc hangs on web but executes in query analyzer
Posted by bob NO[at]SPAM rwhelan.com at 7/30/2003 4:26:56 AM
I'm currently updating one of our web sites and have encountered a
strange problem. The page that is giving me the problem is written in
ASP and hits a SQL 2K DB. When I click submit I have 4 procs that
need to be executed. I always get a sql server timeout error. I
opened up Profiler and tr... more >>
How to Installing MSDE in win2K pro
Posted by Arthur Cheung at 7/29/2003 3:23:19 PM
I am new to MSDE and want to deploy it in my company (because it is free).
However, when I install it in a W2K professional machine, there is a message
box saying that a "strong SA password is required". How can I solve the
problem?
Arthur Cheung
(The MSDE engine was downloaded from the... more >>
Performance mystery -- freestanding vs in SP
Posted by jim_geissman NO[at]SPAM countrywide.com at 7/29/2003 3:19:50 PM
I'm trying to test and tune two functions that retrieve records from a
property database (housing characteristics & transactions).
One returns information about a subject property, the other about properties
near the subject. They both return tables, with identical structures. The
first wil... more >>
semaphore timeout
Posted by spy_234432 NO[at]SPAM yahoo.com at 7/29/2003 1:39:42 PM
Hi, has anyone gotten the error "semaphore timeout" when trying to do
a backup to disk? The disk is a logical partition. There are two
drives, c: and d:. Backing up to c: is fine. However, backing up to
d: produces the error below. Thanks in advance for any help.
Here is the command : ba... more >>
Can a DTS package be scripted or transferred to another server?
Posted by warren.wright NO[at]SPAM us.scorex.com at 7/29/2003 1:00:40 PM
I have production SQL Server database that must be moved to a new
machine. There is a fairly complex DTS package on the original server
that is used to handle the weekly updates to the database.
Is there a way to export this DTS package in order to set it up on the
new machine as well?
Bes... more >>
Copy of SQLServer software
Posted by Curt at 7/29/2003 12:47:25 PM
Does anybody know where a copy of the MS-SQLServer software is posted?... more >>
SQL Aggregation Poser
Posted by tony.hodgson NO[at]SPAM t-mobile.co.uk at 7/29/2003 5:22:06 AM
Can anyone help me with an problem I have come across in my database
design.
I have a primary table and a related table with 3 child records (each
with a numeric field). I require a query to return the primary key
from the main table and the PRODUCT (i.e. all numeric values
multiplied togeth... more >>
Query In Error?
Posted by wan_fui_chan NO[at]SPAM hotmail.com at 7/29/2003 2:52:17 AM
Hi There,
I can't seem to see what's wrong with the query below
DELETE
FROM Users_Details UD1
WHERE UD1.UserID = (
SELECT TOP 1 UD2.UserID
FROM Users_Details UD2
WHERE UD1.useremail = UD2.useremail
)
Keeps giving me incorrect syntax on Line 1 near UD1.
Can you not alias tables when u... more >>
Need help with SQL statement!
Posted by Alex at 7/29/2003 2:37:46 AM
I am having difficulty writing a SQL statement and I was wondering if one of
you gurus could help me. I have a table that has three fields: InvoiceID,
Item, ItemPrice. Each InvoiceID is associated with one or more Items. I am
trying to write a SQL statement that returns the record (all three fiel... more >>
How can I administer SQL Database on remote Web Server
Posted by babu_nir NO[at]SPAM hotmail.com at 7/29/2003 1:10:50 AM
Hello Everybody
Please tell me which is the best method to adminster SQL Server
database in remote web server.
Eg. I am storing all the information of SQL database in my work place
and after that have to upload the modified table to remote web server.
Please tell me what is the easiest way ... more >>
Howto use joins instead of subqueries?
Posted by TH at 7/29/2003 1:09:33 AM
Hi,
Trying to get a grip on the "join" thing :)
Up until now, I allways used this kinda method:
"(select t1.a from t1 where t1.b in (select t2.ab from t2 where t2.b=0))"
How can this be accomplished using joins? And if you have the time please
explain the "bits" :)
Thank you.
--
T... more >>
What's the equivalen function of StrConv ([FirstName] , 3 ) in ACCESS in Sql Server 2000?
Posted by sohelcsc NO[at]SPAM yahoo.com at 7/28/2003 11:18:53 PM
HI,
i got a problem while using StrConv function in sql server.
My requirement is:-
suppose in a name field i have "jhon smith" Now i want to run a sql
which will give me the result like "Jhon Smith"--which means upper
case first.
Now i am running a query like below which is giving me "Jhon... more >>
Microsoft Course 2073?
Posted by dnvs4 NO[at]SPAM aol.com at 7/28/2003 11:13:10 PM
Hi all,
Does someone have the material(PDF or PPT) of this course: Microsoft Course
2073?
Thanks,... more >>
query/read database size?
Posted by Rob Wahmann at 7/28/2003 6:27:19 PM
I have a web-based admin section for a site and I would like to be able to
query the SQL Server database size and display it within my admin area. Is
there a function or method of doing this? My database is hosted by a third
party...
I appreciate any tips or advice you can provide!
Rob
... more >>
Problems with JDBC
Posted by okai at 7/28/2003 4:51:50 PM
I downloaded the latest version on JDBC from Microsoft and I got problems.
Indeed, when fetching a smallint from SQL Server i got instead an Integer.
How can i do to avoid such a problem?
Some hints?
many tanks, gaetano
... more >>
Temp Tables Vs Temp variables
Posted by rhein NO[at]SPAM mutualofenumclaw.com at 7/28/2003 3:53:03 PM
I have an application that I am working on that uses some small temp
tables. I am considering moving them to Table Variables - Would this
be a performance enhancement?
Some background information: The system I am working on has numerous
tables but for this exercise there are only three that re... more >>
Query on 2 bases
Posted by TNR at 7/28/2003 3:31:42 PM
How to make a query which contains fields from two different bases ?
Thanks in advance.
ReN
... more >>
Delete a file from the Server
Posted by rvanarnam NO[at]SPAM aol.com at 7/28/2003 11:12:32 AM
I have a table in my database on SQL Server which holds a file name
that refers to a file that is stored on the server. I would like to
create a trigger to delete this file from the server if the row in the
table is deleted. I have been trying to use this command in a trigger
(<filename> is th... more >>
Inter-Database References
Posted by Thierry Marneffe at 7/26/2003 11:55:38 AM
Hello
Suppose a database Db1 with tables tl1 and tl2 and a second database db2
with tables tl3 et tl4.
Is it possible to make a join between tables of the two databases ?
As for example, Select * from tl1 INNER JOIN tl3 where tl1.Field1 =
tl3.Field3
Thank for any help
Thierry
... more >>
SQL-2000 GUI
Posted by Dagwood at 7/26/2003 10:25:21 AM
Good morning:
At least it's morning where I am. :)
I have a rather newbie question I'm afraid. I have VisualStudio.NET, and
have installed it along with SQL server. However I can't seem to find an
administration front-end to SQL, other than the VisualStudio, which is
ok for creating databas... more >>
dts copy text to table only
Posted by trintsmith NO[at]SPAM hotmail.com at 7/26/2003 9:02:47 AM
how do i specify the table destination only not the whole database
from a text.txt source?
thanks,
trint... more >>
How to create Cube
Posted by biswajitbarik NO[at]SPAM rediffmail.com at 7/25/2003 11:40:13 PM
Hi All,
I want to create a cube using MSSQL2000 i dont know any thing how to
create and what is parameter required so if any body help me i will be
thankfull to him/her.For information : i have 4 tables
custdetailtable which contain all about a customer as per example
customer ID,name,add,CUS... more >>
Comparing queries for flagging conflicts
Posted by Alpay Eno at 7/25/2003 10:24:49 PM
Hello all... I'm stuck, I cannot figure out how I should go about flagging
conflicts on a sheduling app. I currently have 8 columns (school grades)
that have class over the course of 9 periods. I am populating the asp page
fine, and making changes to the database with forms lists. I need to compa... more >>
sql size vs. access size
Posted by Rob Wahmann at 7/25/2003 4:56:11 PM
I have a SQL Server database that is showing 2853.44 mb in size but when I
export the data into MS Access the size is less than 1 mb. Can anyone tell
me how to reduce the size of my SQL Server database so that it's less than
15 mb?
Thanks in advance! Rob
... more >>
Index Tuning Wizard
Posted by Chloe Crowder at 7/25/2003 2:41:50 PM
Hi
I tried running ITW against one of our databases, and it came up with a
number of suggestions, but also filled the Application Log with messages
like:-
The description for Event ID ( 4 ) in Source ( ITW ) could not be found. It
contains the following insertion string(s):
Error in Parsi... more >>
ALTER Table query
Posted by advertiseallyouwant NO[at]SPAM hotmail.com at 7/25/2003 1:52:24 PM
Hi, I just want to know to turn this:
CREATE TABLE [dbo].[tblTierCs] (
[idTierC] [int] NOT NULL ,
[txtNoEmploye] [varchar] (50) COLLATE French_CI_AS NULL ,
[noSubDomain] [int] NOT NULL ,
[txtNameTierC] [varchar] (50) COLLATE French_CI_AS NOT NULL ,
[noOldTierC] [int] NULL ,
[noRSDTierC]... more >>
Merge the results of two queries
Posted by Philippe Bouffaut at 7/25/2003 11:32:17 AM
Hi all,
Here is my problem, I have 3 tables :
People
-------------
IDPeople
Firstname
Lastname
Cars
------------
IDPeople
Carname
Boats
------------
IDPeople
Boatname
1 person can have 0 or n car/boat
I want to a result set displaying : Firstname, Lastname, NumberOfCars,
N... more >>
NOT problem. this should be easy
Posted by andy NO[at]SPAM pepperell.net at 7/25/2003 11:11:05 AM
Should be easy, but I've been trying to figure this out for about half
an hour with no luck. There is a table 'Cybex' which has all the Cybex
products we sell, and a table 'Datasheets' which contains a list of
the datasheets available for products. Both tables have a PartNumber
column.
On wit... more >>
speeding up SQL query time
Posted by davidsheets NO[at]SPAM wdsrc.com at 7/25/2003 10:42:09 AM
Consider this SQL Query:
-----------------------------------------------------------------
SELECT c.CASE_NBR, DATEDIFF(d, c.CREATE_DT, GETDATE()) AS Age,
c.AFFD_RCVD, c.PRV_CRD_ISS, x.RegE, x.Type, x.Fraud,
c.CUST_FN + ' ' + c.CUST_LN AS CustFullName,
c.ATM_CKCD_NBR, x.T... more >>
DTS execution from client machine fails connecting to Oracle
Posted by holysmokes99 NO[at]SPAM hotmail.com at 7/25/2003 9:38:15 AM
I have created a DTS package that pulls data in from Oracle into SQL
Server. When I run it directly on the server (from Enterprise
Manager), it works fine. When I run it from Enterprise Manager on a
client machine that does not have the Oracle client software, it does
not run, giving me the erro... more >>
YYYY-MM-DD not working in UK
Posted by t.google NO[at]SPAM wjohnson1.com at 7/25/2003 8:26:34 AM
The following query works fine against SQL Server 2000 here in the US:
SELECT * from TNEWSARTICLES where CreatedOn < '2003-04-25 14:22'
But in the UK, it returns this error:
80040e07: The conversion of a char data type to a datetime data type
resulted in an out-of-range datetime value
I... more >>
Total spaceused and total allocated
Posted by kydongau NO[at]SPAM yahoo.com.au at 7/24/2003 10:54:34 PM
Anyone has a "one sql statement" to get the total spaceused and total
space allocated of an instance ? ie same as sum of relevance fields
from sp_spaceused for each database in an instance, that works accross
version of mssql from 6 onward.
Thanks
KD... more >>
Restore Database daily without SP's
Posted by masri NO[at]SPAM vsnl.com at 7/24/2003 10:25:02 PM
Hello all,
I have the following requirement (SQL 2000, SP2)
1. Need to restore production database(A) to another database (B) on
another server (No direct connection)
2. In the restored back-up(B) SP codes should not be visible (even to
sa) or all SP's can be deleted .
3. This nee... more >>
How to design "product kits"
Posted by poec NO[at]SPAM yahoo.com at 7/24/2003 6:34:48 PM
Hi,
I've run into a bit of a sticky design issue. We have products in
three categories which I will call 'A', 'B' and 'C'. We have "kits"
which contain three products, one from each category.
Below is some sample SQL to set things up, but I need to ensure that
each kit gets three products... more >>
|