all groups > sql server programming > december 2004 > threads for wednesday december 22
Filter by Day: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31
SQL 7.0 sp4
Posted by Martin at 12/22/2004 10:34:27 PM
Hi,
I am attempting to install SQL SERVER 7 sp4.
The installation starts ok, I choose windows authentication as the
connection mode and then the installation displays a dialog box saying
"validating user"
This screen just stays there and there is no activity beyond this point.
when I bri... more >>
Interesting Filter Query
Posted by babz at 12/22/2004 10:29:02 PM
Hi
I have table with the values 'true', 'false', '0', '1' ,'' and other
numeric values.
I want to exclude 'False', '0' and '' and return all the rows. How to get it.
Declare @T Table (Idy Int Identity(1,1), FieldValue Varchar(100))
Insert into @T (FieldValue) Values ('True')
Insert ... more >>
Check Constraints using a subquery - SSrvr 2000
Posted by L Mehl at 12/22/2004 7:08:29 PM
Hello --
I am new to using contstraints.
I need to add a requirement that the ID for a piece of equipment included in
a quote for a site must exist in the PriceList.
My two tables and their PK columns are
SiteEquipment AS s
-------------
CaseID
RegionID
SiteID
EqTypeID
Priceli... more >>
select case use in 'order' ?
Posted by Agnes at 12/22/2004 7:01:00 PM
In SP, I want to pass a the "order" parameter , e.g (order by number, order
by date)
and then I can use one SQL statment
SELECT * from myTable order by @sortingorder
I understand the above statment got error, Can someone tell me how can I
correct it ?
Thanks
--
..
... more >>
Lookup Parameters
Posted by Janaka at 12/22/2004 5:59:39 PM
I am trying to determine the parameters in a stored procedure dynamically by
looking them up through the syscolumns table. This works quite well at
finding the input and output parameters in the stored procedure. However it
doesn't store the RETURN_VALUE parameter that a procedure might have... more >>
Aggregate strings in SQL?
Posted by Paul W at 12/22/2004 4:52:42 PM
Hi - Imagine the table:
TypeID integer
Tag varchar(20)
I want to see for a given TypeID the 'sum' of all the 'Tag' values. eg. if
data is
1 aaa
2 bbb
3 ccc
1 ddd
1 eee
So if the query requests "Where TypeID=1", I want to return
aaadddeee
Any thoughts?
Thanks,... more >>
Non-existant Trigger Problem
Posted by Wayne Wengert at 12/22/2004 4:52:38 PM
I am using SQL Server 2000. I try to modify a filed in a table definition
(from int to bit) and when I save it I get a popup saying that the update
trigger could not be read and the process aborts. There are no triggers on
the table. If I right click on the table and open the triggers it offers a... more >>
local uniqueness of a column
Posted by Zeng at 12/22/2004 4:49:02 PM
Hi,
I'm dealing with a database that is used to contain files for multiple
client companies, in one table I would like to enforce the uniqueness of the
file name column within a broker (that is file name must be unique within
each company). Currently I reinforce this with a trigger on update ... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
How to read specific outlook email attachments from SQL
Posted by Karen Grube at 12/22/2004 4:17:02 PM
Hi!
I hate to bother you all with this, but I don't know how best to approach
a particular task.
Here's the deal:
Once a month I personally (that is, in my own personal inbox on my company's
email server) receive an email from one of our vendors to which is attached a
text file (a ... more >>
A view make the server slowing down
Posted by Ellis Yu at 12/22/2004 3:47:36 PM
Dear all,
I wrote a view which get information from a large table (gltrxdet)
in 3 different databases with same table structures. These tables' size are
quite large about 100000 records individually. The problem is everytime when
I select data from this view, it may affect all the othe... more >>
Select * where 1 = 1
Posted by CJM at 12/22/2004 3:25:47 PM
I'm building a search function for one of my applications. The user has the
option to enter a number criteria of criteria, but none are compulsary. I
need to be able to build up a query string that includes only the right
criteria. The simplest way I have found is something like this:
sSQL ... more >>
Connection performance issue
Posted by Mark Goldin at 12/22/2004 3:06:42 PM
From a front-end application point of view what is a more efficient way:
Create a connection to SQL and keep alive reusing every time it needs to get
data from the server
or create the connection, get data and then destroy connection?
Any resources online that will support either?\
Thanks
... more >>
DateAdd function and passing form contents into it
Posted by Jeff G at 12/22/2004 2:59:03 PM
I have a simple query where I want to use a form to post an input value
(dir_Months) to this page and use that form variable in the DATEADD function.
SELECT * FROM dbo.directives
WHERE Dir_Expiration <= DATEADD(month,::dir_Months::, { fn CURDATE() })
How come I can't use the ::dir_Months:: ... more >>
confusing transactions with sqldmo
Posted by Neil W. at 12/22/2004 1:51:42 PM
I am having the devil of a time trying to get transactions to run
asynchronously from an sqldmo application. Things work as expected using
Query Analyzer, but not from sqldmo.
I have populated northwind.employees with 1M rows. I am then running the
following update in a loop:
begin tra... more >>
SQL Server 2000 / Dual CPU
Posted by Mike Labosh at 12/22/2004 1:18:36 PM
Someone in our group raised the question of whether or not SQL Server 2000
Standard Edition can make use of dual CPU's. Please tell me that it does?
--
Peace & happy computing,
Mike Labosh, MCSD
"Mr. McKittrick, after very careful consideration, I have
come to the conclusion that this ... more >>
SELECT statement assistance
Posted by MrMike at 12/22/2004 1:11:05 PM
Hi. I have 3 tables as follows...
TABLE PURPOSE
---- -------
lkup_Customer Customer Records
tblOrder Order Records
tblOrderDetail Order Detail Records
I'm trying to run a SELECT statement that displays the total amount of sales
for each customer. However, this se... more >>
top n percent of a group
Posted by caj at 12/22/2004 1:07:07 PM
I am trying to write a query against data similar to:
CREATE TABLE #t
(person_id int
,week_ending datetime
,Credit decimal(18,4)
,rating int
)
insert into #t values (1,'1/6/2004',.23,0)
insert into #t values (2,'1/6/2004',.33,0)
insert into #t values (3,'1/6/2004',.43,0)
insert into ... more >>
Will Microsoft kill Sql Server third party with SQL2005 ?
Posted by M.Sauve at 12/22/2004 12:39:53 PM
Hi,
In last week and during one of the webcast about SQL2005, one asks this
question:
Is There any comparison feature included in SQL2005, like comparing objects,
data ....
And the answer was:
This is something we are considering for later release
Is this mean that Micro... more >>
tracking EXE inside the insert trigger using the process ID & SP_W
Posted by Jose at 12/22/2004 12:17:03 PM
Hola!
I am trying to track inside the insert trigger, what EXE is creating the
insert using the process ID.
1) If I call from an EXE done using VB6 (lastest patch), I do an SP_WHO2, I
can see in the ProgramName field the exe name.
2) If I call from an EXE done using .NET C# (2003), I do... more >>
CHECK Constraints
Posted by VNN at 12/22/2004 11:36:29 AM
Hi all,
I have TableA and TableB.
TableA:
ID int
Name varchar
UploadOnly bit
TableB
TableAID int ' this link to ID column in Table A
Description varchar
IsUpload bit
I want to put a check constraint in tableB so i... more >>
Replacing a pipe with a crlf
Posted by Scott McNair at 12/22/2004 11:23:22 AM
Hi all,
I'm importing data from an Excel doc, in which the pipe character ("|")
shows up. Once I import the data into my SQL table, I would like to
replace all instances of the pipe with a CRLF. What would be the easiest
way to do this?
Regards,
Scott... more >>
how to refer to a field when defining default constraint.
Posted by David at 12/22/2004 11:23:05 AM
Hi,
I want to refer to a field value when I am defining a default constraint.
Can I do that? Please tell me how if I can.
Thanks
David
... more >>
combining rows and deleting those that match leaving one
Posted by Bernie Yaeger at 12/22/2004 11:17:28 AM
Hi,
I'm trying to combine data and then delete rows when given rows have a
certain match - eg, storenum = storenum, title = title, city = city and
combine the qty column into one - so, if
st11 'yellow moon' boston 26
st11 'yellow moon' boston 14
st14 'yellow moon' ... more >>
Overuse of WITH RECOMPILE
Posted by Brandon Lilly at 12/22/2004 11:11:03 AM
I just started working with a company that uses WITH RECOMPILE on every
single stored procedure they write. They claimed that when a procedure ran
against a large table that it would run ok, but when it later ran against a
much smaller table it was either taking just as long, if not longer, t... more >>
which grid supports serverside cursor?
Posted by SÁRINGER Zoltán at 12/22/2004 10:55:32 AM
hi,
do you know a grid for VB6 which supports serverside cursor, not only
client?
I need this because I dont want to limit the size of returned recordset,
just order on server side (SQL2000), and let the user to browse as they
want. Then the grid will fetch the required rows on demand..., I... more >>
DB Maintenance Plan Problems
Posted by Re Fo at 12/22/2004 10:50:58 AM
Hi NG,
I created a new maintenance plan with the Maintenance Plan wizard. Verifying
this maintenance plan showed me that it was ok and executed successfully.
Then I generated the scripts for this maintenance plan and tried to apply it
to another SQL-Server. The job was created but executing se... more >>
Passing comma seperated values to a stored proc
Posted by M Smith at 12/22/2004 10:39:06 AM
I have an application where the user will type in ID numbers into a single
field in an ASP page. They can type in multiple IDs if they are seperated
by a comma. I want to pass this string into a Stored Proc and just use an
"in" command in the where clause to return a recordset back to the ASP p... more >>
Sum Function returning wrong number
Posted by Calvin X at 12/22/2004 10:30:56 AM
Hi All,
I was doing some investigation of a calcultion problem in my app and came
accross the following line of T-SQL code that is returning the wrong number
and con't figure out how to correct it. The problem is the code is
returning an integer value when I really need a floating point nu... more >>
If statement in View?
Posted by Drew at 12/22/2004 9:47:47 AM
Is it possible to use If statements in a View? I am trying to get a list of
Client names using the following query,
SELECT RegNo, CliFName + ' ' + CliMM + '. ' + CliLName AS CliName
FROM CliCore.dbo.tblClients
WHERE (CliActive = 1)
The problem is that if CliMM is NULL (Whi... more >>
SQL Server, Table Joins and Plus notation
Posted by Arthur Dent at 12/22/2004 9:26:54 AM
Hi all,
I was just wondering, is there any kind of config setting or something
somewhere that can be turned on to make SQL Server capable of understanding
the "(+)" notation for joining tables? I am generally a quick learner, but
those "inner join/left join/right join" things confuse the he... more >>
MySQL autorestart when crash or stop
Posted by se NO[at]SPAM friend.fr at 12/22/2004 9:13:56 AM
Hi,
Trying to restart MySQL when it is down from a crontab event.
Placed the following script kindly provided by a Gentleman in a file :
checksql --->
#!/bin/sh
/etc/rc.d/init.d/mysqld status >/dev/null 2>&1
if [ $? -ne 0 ]; then /etc/rc.d/init.d/mysqld restart >/dev/null 2>&1;
fi
... more >>
HELP Please with this update query
Posted by MChrist at 12/22/2004 9:09:06 AM
I'm trying to write an update query in SQL and I keep getting a syntax error
'near RL' in the 1st line. Does SQL not allow you to join two tables to make
an update? Would I have to do four queries, or is there a faster way to
write it?
UPDATE tReceived_Loans RL INNER JOIN tFunded_Loans A... more >>
[OT] How do you pronounce "varchar"?
Posted by Miroo_news at 12/22/2004 8:55:16 AM
In my country almost all programmers read
"varchar", "char" etc as "vartschar" ("ch"
is pronounced like in "chair").
As I suppose "varchar" comes from "variable
character" and so that it should be pronounced
"varkar".
How do you pronounce this and similar words?
Please note if you are native ... more >>
Porting of Oracle cursor structure in T-SQL
Posted by zambetti NO[at]SPAM inwind.it at 12/22/2004 8:35:24 AM
Hi,
I have a problem with a porting of a cursor structure in Oracle in SQL
Server 2000.
I need the same implementation of the functionalities.
The Oracle cursor structure is:
CURSOR SELECTOR_PHY_DISK IS
SELECT *
FROM DBS_PHYSICAL_DISKS
WHERE DBS_PHYSICAL_DISKS.PHYSICAL_DISK_ID = DISK... more >>
Query: Assign Group By Time Differential
Posted by C TO at 12/22/2004 8:17:01 AM
I have a table which contain the started time as below. I need to assign a
BatchID to the log, of which started time has a gap of more than 5 minutes.
In other words, if the next started time of a log is greater than 5 minutes,
it is not a continuous process of the last log and therefore a new... more >>
Query Question
Posted by tarheels4025 at 12/22/2004 7:47:04 AM
I have this query below that returns all credit sales that have a credit
reversal more than 5 min. after that credit sale.
Is there a way to add into the query a statement(s) that will return the
above only if a credit sale doesn't occur within 5 min. after the reversal.
So if it goes... more >>
set datetime from 2 strings
Posted by Sean at 12/22/2004 7:43:13 AM
I have 2 varchar fields, OrigTrxDate and OrigTrxTime. The value is 031027 and
103520. I want to get a combined datetime field with the value 2003-10-27
10:35:20.000 if they are both valid value. How can I do in SQL?
Thanks.... more >>
Temp tables and (NOLOCK)
Posted by Brandon Lilly at 12/22/2004 6:51:03 AM
I am going through someone else's stored procedures and I am continually
seeing queries against local temporary tables using the WITH (NOLOCK) hint.
This doesn't make any sense to me, since only the local session can access
this temp table, who on earth is going to have locking issues trying ... more >>
openxml inexperience
Posted by Kely Ward at 12/22/2004 6:07:13 AM
please tell me why this returns only one row.
declare @idoc int
declare @doc varchar(8000)
set @doc = '<?xml version="1.0" encoding="utf-8" ?>
<Customers>
<CustNum>9841257489015091</CustNum>
<CustNum>1326589719026163</CustNum>
<CustNum>9819185189531352</CustNum>
</Customers>'
exec ... more >>
SP that will insert multiple rows
Posted by Jon at 12/22/2004 5:13:04 AM
Hello,
Does anyone have an example of a SP that will take a comma separated list of
parameters and for each one insert into a table?
Basically I need to pass in multiple users and the item they need to be
associated with.
Thanks,
Jon... more >>
TSQL Query Count Columns
Posted by mike_matthys NO[at]SPAM hotmail.com at 12/22/2004 3:45:20 AM
For my application, the user can build queries which are stored in a
table. For example, the user builds the following query:
select sum(li.litVP * li.litNumber)
from datBusinessUnit bu
inner join datCustomer cu on cu.bunID = bu.bunID
inner join datOrder od on od.cusID = cu.cusID
inner join ... more >>
Help in Computed Columns
Posted by Sharad at 12/22/2004 3:41:11 AM
Dear Friends
( Sorry i have wrongly posted the same in replicaiton )
I want to create the following query.
This query is for the statement of the customers.The
query is based on the grouping of Cust and CTP.
I want to create following calculative Columns.
1. Tran : SUM (TranAmt) wh... more >>
How to export a table into .xml and .xsd
Posted by karenmiddleol NO[at]SPAM yahoo.com at 12/22/2004 3:35:48 AM
Hello All
I want to create a export of a given table as a .xml file with a .xsd
Can somebody please point me in the right direction how I can do it.
Also, once I have created a .xml and .xsd how do I import the table
structure and contents after having dropped the table to recreate it
fro... more >>
|