all groups > sql server (alternate) > june 2004
Filter by week: 1 2 3 4 5
Aborting CALL to stored procedure
Posted by browna NO[at]SPAM beer.com at 6/30/2004 9:59:25 PM
Hello
I am calling a stored procedure in a MSDE/SQLServer DB form within my
Visual C++ 6.0 program along the lines
CCommand<CAccessor<CdboMyAccessor>>::Open(m_session, NULL);
With
DEFINE_COMMAND(CdboMyAccessor, _T("{ CALL dbo.MyProc; 1(?,?) }"))
It all works sweet as, but it can take a while... more >>
Help: MS-Word apostrophes in Query Analyzer
Posted by Poster at 6/30/2004 6:26:52 PM
After creating an IN clause from a bunch of character strings created by a
Word macro, Query Analyzer complains about a syntax error. The macro takes a
column full of character strings and wraps apostrophes (single-quotes)
around each string and adds a comma to the end of each line, ready to past... more >>
Selecting Unique Record
Posted by Larry at 6/30/2004 6:12:10 PM
I have a stored procedure (below), that is suppose
to get a Reg Number from a table, (Reg_Number), in
such a way that every time the stored procedure is called,
it will get a different reg number, even if the stored
procedure is called simultaneously from two different
places,
However it is ... more >>
SQL Server to Oracel
Posted by fitzjarrell NO[at]SPAM cox.net at 6/30/2004 5:57:28 PM
omlet@omlet.org wrote in message news:<dc6c1ff0.0406300739.5001ae2a@posting.google.com>...
> fitzjarrell@cox.net (David Fitzjarrell) wrote in message news:<9711ade0.0406292055.4bfaa4fe@posting.google.com>...
> > omlet@omlet.org wrote in message news:<dc6c1ff0.0406291431.ef3d9f8@posting.google.com>... more >>
SQL Syntax problem
Posted by Cristian Martinello at 6/30/2004 3:05:00 PM
Hi all,
I have a SELECT with a varchar field and a number field.
I need to order by the text field (a,b,c...) for number < 2000, and
another order by for number>0.
The result may look like this:
Aaa 200
bbb 89
ccc 100
aa 2005
bb 2900
cc 2100
....
Is this possible with a single ... more >>
howto: calling sp_executesql from a function ?
Posted by Clausmeyer at 6/30/2004 3:03:41 PM
I want to execute a dynamically generated sql-statement
from inside an user-defined-function. Calling functions and
extended stored-procs is allowed so I tried sp_executesql
as well as sp_prepare/sp_execute ....
but both fail with an error 'only functions and extended stored-procs
may be call... more >>
Eliminating Combinatorial Relationship Multiplication
Posted by jlanfield2003 NO[at]SPAM yahoo.com at 6/30/2004 1:20:07 PM
Suppose I have users that can belong to organizations. Organizations
are arranged in a tree. Each organization has only one parent
organization but a user maybe a member of multiple organizations.
The problem that I'm facing that both organizations and individual
users may have relationships w... more >>
HELP with TIME Calculations
Posted by Joe User at 6/30/2004 11:45:17 AM
I am looking to calculate the difference between and event time and a sample
time of Now. This is the query that I thought would do it, however I'm
returning DIFFERENCE values that look the same when the calcuation is being
made on different EVENT_TIME values....
I thought I knew how DateDiff... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Fundamental help required with SQL connection
Posted by David at 6/30/2004 9:33:44 AM
I am writing SQL data apps using VB.NET 2003, MSDE is being used as the
server.
When I create and instance of the server, it has a the format
machinename/instancename
This is fine for the developement machine but how does my code connect to
the server when it is on another machine ? Wh... more >>
SQL Data Compare Error
Posted by cam_1485 NO[at]SPAM yahoo.co.uk at 6/30/2004 3:39:38 AM
Using SQL data compare i get the following error message:
Could not allocate space for object '(SYSTEM table id: -701903460)' in
database 'TEMPDB' because the 'DEFAULT' filegroup is full.
The comparison is being run on one server between to databases. It has
been run several times but each t... more >>
Converting MS query to SQL Server 2000
Posted by wiredog NO[at]SPAM comcast.net at 6/29/2004 5:33:03 PM
I am struggling rewriting my query from MS Access' IIF, Then to SQL
Servers TSQL language. I am hoping some one can give me some
guidance. I believe I have the first portion of the query correct but
do believe this requires a "NESTED" argument. This is where I am
lost.
My Original MS ACCES... more >>
Linked Server request...
Posted by russell NO[at]SPAM oncontact.com at 6/29/2004 3:30:14 PM
I have two server defined (S1 and S2) S1 has a link defined to S2. If
I open Query Analyzer and run a query referencing S2 server. My
statement returns data (lets say I am using MSSQL standard
authenitcation). Now I have a ASP.NET application that connects to S1
server using ODBC. The exact s... more >>
I need BETWEEN on speed
Posted by Rizyak at 6/29/2004 10:36:51 AM
This is x-posted in:
alt.php.sql
comp.databases.ms-sqlserver
microsoft.public.sqlserver.programming
I have events that occur during the day. I want to be able to search those
by a form with checkboxes (multiple select).
Let's say for instance an event is happening from 3-10pm. When someone... more >>
Multiple many to many
Posted by MRG at 6/29/2004 9:32:44 AM
I have a geographic points table containing point records with latitude and
longitude points. I also have several other tables containing entities that
will relate to points in the points table, ie. individuals, organizations.
In every case, there will be a many to many relationship between an ... more >>
MS SQL 6.5 Procedure to Send Query results via Email
Posted by serendipity at 6/29/2004 7:43:23 AM
Hi,
I'm not sure if this is possible as i've googled everywhere, but i have a
select query that returns a customer record with their associated sales
orders. I would like to automate a process which sends an email reminder to
each customer in the database, that has outstanding orders. This ema... more >>
Why the transaction log file full
Posted by Daniel Xiao at 6/29/2004 3:50:26 AM
I have set the initial size of the log file for a database to 1M, the
maximum size is unrestricted, and the increase rate is 10%.
However, when I attempt to delete thousands of rows, the error is still
reported that the transaction log file is full. Why can't the log file
increase automatical... more >>
Parameter value from empty text box - null or 0 length?
Posted by Not Me at 6/28/2004 1:27:42 PM
Hi,
I run a stored procedure with a parameter given from a text box in an access
adp. If the text box is empty then what is passed to the parameter? I can't
seem to get it to flag up as either null, or 0 length.
Any tips?
Cheers,
Chris
... more >>
EMC Clarion Performance Issue
Posted by ssaindon NO[at]SPAM connecticare.com at 6/28/2004 12:57:19 PM
I am in the process of testing an EMC Clarion install with our Data
Warehouse. Performance is fast and consistent for queries using a
clustered index but very poor for queries using non-clustered indexes.
Performance on non-clustered indexes is very slow and inconsistent
compared to our curren... more >>
checklist for moving a database from one server to another?
Posted by emebohw NO[at]SPAM netscape.net at 6/28/2004 7:59:54 AM
Hi all. I know that since you know nothing about my database it will
be a stretch to answer this - but does anyone have a boiler plate
checklist for moving a database, dts packages, agent jobs, etc...from
one server to another? Maybe something that just says I should at
least do x,y,z.
Also i... more >>
How do I loop thru a result set?
Posted by atyoung75 NO[at]SPAM yahoo.com at 6/28/2004 6:44:05 AM
How do I loop thru a result set Without using a curosr?... more >>
XML Output
Posted by sgoyal NO[at]SPAM agline.on.ca at 6/28/2004 5:50:46 AM
I've Proc1 and Proc2, the output of Proc2 can be in XML or thru a
normal Select statement, depending upon the input parameter specified
(@xmflag). The default of @xmflag = 0 which means non-XML output. Now
Proc1 is calling Proc2 and inserting the output of Proc2 in a temp
table without specifing... more >>
SQL update on multiple tables
Posted by fvermeer NO[at]SPAM chello.nl at 6/28/2004 3:26:44 AM
Hi,
I tried to use the following query to update a value in one table with
a value from another table:
UPDATE tbl1
SET col1 = tbl2.col2
FROM tbl1, tbl2
WHERE tbl1.[id] = tbl2.[id]
but it won't work. I also tried this with a subquery using "TOP 1",
but that wouldn't work either. SQL Ser... more >>
PRINT only takes effect after T-SQL completion ?
Posted by ehchn1 NO[at]SPAM hotmail.com at 6/27/2004 11:01:05 PM
Hello All,
I have a stored procedure which will act like a main/controller script
which will then invoke more stored procedures (~20). Basically, it
looks something like below:
-- start script
create procedure ...
print 'process started'
exec sp_1
exec sp_2
exec sp_3
....
print 'proc... more >>
Invalid character value for cast specification: SQL Server 2000
Posted by saengpole NO[at]SPAM lycosasia.com at 6/27/2004 10:42:55 PM
Hi,
I used SQL Server 2000 Personal Edition. I created a stored procedure
having input parameters as smallint,tinyint,char,varchar and
smalldatetime. When I executed it by Query Analyzer, it's ok. But when
I executed it by ASP code that used ADODB.command, it showed error:
Invalid character v... more >>
Data Processing Script Justs Stops
Posted by atyoung75 NO[at]SPAM yahoo.com at 6/27/2004 5:47:48 PM
I have a problem with a stored procdure I wrote. This proc will
process 80 to 100 million every night, it aggregates, inserts into a
different table, and then deletes the original data. The process will
hang after processing 20 to 40 million records. I must stop the proc
and then restart it befo... more >>
sqlserver7 connect
Posted by mirko at 6/27/2004 12:41:39 AM
i have installated on my computer ms sqlserver 7 .I want to try some
transactions.Is it possible to connect as 2 or tree users just to simulate
working with many users?
... more >>
Guid vs Identity
Posted by Ilija_G at 6/26/2004 1:43:49 PM
Hi,
Is there any replace for "Select @@identity" that could return "just
inserted" GUID as a primary key?
Has anyone tested what's faster, working with Guid or Autonumber ?
... more >>
View performance, linked servers, query specifiying uniqueidentifier
Posted by velivis NO[at]SPAM ix.netcom.com at 6/26/2004 8:53:58 AM
Greetings,
I have 3 servers all running SQL Server 2000 - 8.00.818. Lets call
them parent, child1, and child 2.
On parent, I create a view called item as follows:
CREATE view Item as
select * from child1.dbchild1.dbo.Item union all
select * from child2.DBChild2.dbo.Item
On child1... more >>
parameterized queries running slower than non-parameterized queries
Posted by bogachkov NO[at]SPAM hotmail.com at 6/25/2004 3:43:58 PM
Hello
When I use a PreparedStatement (in jdbc) with the following query:
SELECT store_groups_id
FROM store_groups
WHERE store_groups_id IS NOT NULL
AND type = ?
ORDER BY group_name
It takes a significantly longer time to run (the time it takes for
executeQuery() to return ) than ... more >>
Converting numeric data type to text data type
Posted by gsegal NO[at]SPAM mps.com at 6/25/2004 3:37:35 PM
Hi,
I would like to convert a dollar amount ($1,500) to represent Fifteen
hundred dollars and 00/100 cents only for SQL reporting purposes. Is
this possible and can I incorporate the statement into an existing
left outer join query.
Thanks in advance,
Gavin... more >>
PERC RAID Controller settings?
Posted by abefuzzleduser2 NO[at]SPAM yahoo.com at 6/25/2004 1:04:14 PM
We have a Dell 6450 quad 1.6MHz, 4GB RAM running SQL 2000 on Win 2000
server with 2 PERC3/QC cards. Server has 4 internal drives configured
as two raid-1 drives (OS and SQL logs). Server has 7 more drives in
external drive rack for RAID-5 SQL data. We did not have a UPS
available for server at ... more >>
get current table name in stored procedure
Posted by mspiegel NO[at]SPAM sccs.swarthmore.edu at 6/25/2004 1:01:27 PM
Hi,
I have a stored procedure that needs to know the name of the table
from which it is called. If you are familiar with a "this" pointer in
Java or C++, that's very similar to what I need. I know I can use
db_name() to retrieve the database name, but how do retrieve the table
name?
Than... more >>
Using MS SQL server to copy files
Posted by Eirik Oppen at 6/25/2004 12:19:24 PM
Hi,
I'm having some trouble finding any information on this topic - can MS SQL
server 2000 copy/delete files on the host computers disk.
Any info on this would be great.
Thanks,
Eirik
... more >>
sp_prepexec and compatiblity mode 7: float variables comparing to string field fails
Posted by scheurer NO[at]SPAM gmx.com at 6/25/2004 7:38:10 AM
I have a statement that works in compatibility mode 8 of SQL Server
2000 while it fails in 7:
declare @P3 int
exec sp_prepexec @P3 output, N'@P1 float', N'select custname from
customer where custnr = @P1', 12600034
custnr is a varchar(15). As long as the float p1 is less than
1,000,000 the... more >>
Beginner's Question on SQL-DISTINCT
Posted by kackson NO[at]SPAM yahoo.com at 6/25/2004 6:53:54 AM
Hi.
I did this
SELECT BOTTLEA, BOTTLEB, BOTTLEC FROM MYPRODUCTS
But, I would like to have the result returned only for distinct
BOTTLEB. BOTTLEA and C can be anything. But the result that I get from
the statement must have BOTTLEB as distinct. How do I do that?
I tried
SELECT DISTINCT... more >>
Database field length problem
Posted by peter NO[at]SPAM iib.ws at 6/25/2004 6:28:42 AM
Hi everyone
I had an access database running as the source for a website but it
has become too large to run correctly so it has been ported to MS-SQL
the problem is that 4 of the fields were Memo fields in access and as
such are 5000+ characters long each this overflows the allowed size on
the ... more >>
xp_cmdshell missing
Posted by jromano NO[at]SPAM phs-us.com at 6/25/2004 5:55:17 AM
We have a series of stored procedures that utilize some of the master
extended SPs such as xp_cmdshell. We migrated to SQL 2000 in April and
everything has worked great for over 3 months. However, this week we
discovered that the xp_cmdshell SP was missing from the master
database. Here is the e... more >>
Running DTS through Access VBA
Posted by miles.bennett NO[at]SPAM abbey.com at 6/25/2004 5:26:39 AM
Does anyone know how to run a DTS package through a normal MS Access?
I've got some code from the web and it doesn't seem to work - perhaps
it is because I'm connecting to an instance on a particular sql server
"servername\instance"
Function SimpleExecutePackage()
Dim oPKG As New DTS.Pa... more >>
Age Old Question about GROUP BY clause (i think) - Probably easy answer
Posted by chakachimp NO[at]SPAM yahoo.com at 6/24/2004 5:24:45 PM
How does one get the primary key of the row that is joined in via a
group by aggregate clause when the aggregate is not performed on the
primary key?
For example,
Person table
(
PersonID int,
FirstName varchar(50)
LastName varchar(50)
)
Visit table
(
VisitID int,
... more >>
Help with 2 queries / Join problem
Posted by dwightrau NO[at]SPAM yahoo.com at 6/24/2004 2:59:48 PM
I am having a problem with a query,
I am not sure if i would use a join or a subquery to complete this
problem.
I have two queries, and i need to divide one by the other, but i cant
seem to get any
type of join to work with them.
Here is the situation.
I have a projectDB table that has a lis... more >>
Sccheduled packages don't run
Posted by TruckeeBill NO[at]SPAM ltol.com at 6/24/2004 1:52:51 PM
In SQL Server 2000, developer edition (on my desktop), I created a
complex DTS package that truncates several tables and imports fresh
data into them (from Oracle 9i). This package was scheduled and
executed by the SQL Agent with no problem. When I moved the database
to a server, the scheduled... more >>
SQL Server to Oracel
Posted by Oracle Newbie at 6/24/2004 10:48:39 AM
I got a new Job where I have to handle Oracle databases on Linux. My
previous experience is with Sql Server on Windows NT. I want to know how
difficult will this shift be and what do I need to learn first and quickly.
How different is Oracle on Linux then Oracle on windows. What are the major
di... more >>
Help with returning a certain # of records from a view.
Posted by mrea NO[at]SPAM ohiotravelbag.com at 6/24/2004 8:43:30 AM
I have a view that will return say 5000 records when I do a simple
select query on that view like.
select *
from vw_test_view
How can I set up my query to only return a certain # of records, say
the first 300?
Here is what is going on, we have a large amount of data that returns
in ... more >>
The size of the image data type
Posted by svennes NO[at]SPAM datec.no at 6/24/2004 6:01:58 AM
I'm using ODBC to interface a Microsoft SQL Server 2000. One of the
operations involves placing files within BLOBs. I'm using the image
data type for this purpose. Most of the time this works okey, but when
trying to add a 21,3 MB file I get an error. The error code is 22001,
which means "String... more >>
SQLAgent crash
Posted by Maurizio Camurati at 6/23/2004 11:10:53 PM
Hi all, I have some trouble with SQLAgent...when I try to schedule a job
that invokes a script (vbs, java, cmdshell,...), SQLAgent crashes at the
moment of scheduled execution. If I try to execute it manually, all works
fine. This installation runs on a cluster Win2003 and the node initiate a
fa... more >>
Very puzzling count
Posted by fn at 6/23/2004 9:30:39 PM
Does anyone have possible explanations for the following results?
select count(*) from tablename
>>> 2,500,000
select count(*) from tablename where fieldname is null
>>> 2,400,000
select count(*) from tablename where fieldname is not null
>>> 900,000
Just my luck, I was showing som... more >>
help how to create a row progressive..
Posted by Pecos Bill at 6/23/2004 8:28:50 PM
Hi to everybody, I'd like to know how to extract a progressive number in a
select.
Example..
Select * from employers
Name Surname Position Age Hire Date Progressive
Mario Rossi Consultant 25 26/07/2003 1 (this
field doeas not exists in ... more >>
Installing SQL Server 2000
Posted by mwheat NO[at]SPAM hatch.com.au at 6/23/2004 7:17:56 PM
Hi
I am trying to find out best practices for SQL Server 2000 installs
for corporate servers. We currently have someone doing it 'in their
spare time!' (I kid you not). When installing SQL server 2000 out of
the box on a freshly formatted machine, I would like to get some
feedback on the fol... more >>
Big problem with triggers
Posted by BUSHII at 6/23/2004 9:54:55 AM
I have little problem and I dont have any idea how to make my trigger.
I have table MyTable where I have many column with almost same name and same
type (Grp1,Grp2,Grp3,Grp4...Grp50 char(1)).
I`d like to make some trigger on UPDATE this table. I must to check which
column was changed.
For e... more >>
SQL Server ASP Syntax error
Posted by no_ssh NO[at]SPAM yahoo.co.uk at 6/23/2004 4:45:47 AM
Hi,
I'm new to ASP and have stumbled across what appears to be a common
problem, but after trying several solutions from other posts I've had
no luck. My SQL SELECT statement is fine elsewhere (e.g. in ACCESS),
but when executed from ASP I get this syntax error:
Error Type:
Microsoft OLE ... more >>
|