all groups > sql server (microsoft) > november 2004
Using Not Equal in VIEW
Posted by mbmccoy at 11/30/2004 11:43:27 AM
I am trying to build a VIEW. I have a situation where I want to exclude
certain records from this view. Using a combination of criteria. I want to
show all orders expect when CO_Code = 'ATLN' AND Service_Code = 'PL'
So I wrote my where statement as:
where (Co_Code != 'ATLN' and Service_Co... more >>
User Guest
Posted by audrey2 NO[at]SPAM email.it at 11/30/2004 2:00:16 AM
Nel database "master" ho mappato, per errore, l'utente "guest" su un
utente sql "XXX" creato in SQLServer.
Questo tipo di impostazione non permette più di aver accesso con
l'utente anonimo "guest" (mappato su null) al db (con autorizzazioni
limitate al ruolo public).
Ho provato sia da EM che ... more >>
Reporting Services
Posted by alex at 11/30/2004 1:35:03 AM
I recently order Reporting Services for SQL STD Edition from MS's website.
The server installation (on SBS2000) went fine. I am trying to install the
client component (i.e. report designer) on my Windows XP client (with VS.Net
2003 installed). During installation it's prompting me for a CD k... more >>
Order By Clause
Posted by WJH at 11/29/2004 1:17:52 PM
The command "ORDER BY ItemID" returns the even numbered ItemID's first and
then the odd numbered ID's. Thus instead of returning in the order
1,2,3,4.5, 6, it returns in the order 2,4,6,1,3,5.
Who knows what this may be due to and how to correct it?
... more >>
common UPDATE syntax for SqlServer and Oracle
Posted by Jan van Veldhuizen at 11/25/2004 11:44:54 PM
The UPDATE table FROM syntax is not supported by Oracle.
I am looking for a syntax that is understood by both Oracle and SqlServer.
Example:
Table1:
id name city city_id
1 john newyork null
2 peter london null
3 hans newyo... more >>
Query output is always in UNICODE... need ANSI ... Help?
Posted by junque NO[at]SPAM oqs.com at 11/25/2004 9:27:16 AM
I'm using XP_Sendmail stored procedure to run a query and mail the
results as an attachment in the resulting email. The process works
fine except that the attachment (whatever.xyz) is apparently in
UNICODE and the application that subsequently consumes the attachment
(when double-clicked in the... more >>
how to pass an 'sort by' parameter to a stored proc
Posted by Nancy Drew at 11/18/2004 10:51:51 AM
hi all
i'm getting an error when trying to pass in a 'sort by' parameter:
CREATE PROCEDURE spListUsers
@sSortBy varChar(30)
AS
SELECT dbo.users.firstName, dbo.users.lastName FROM users
order by @sSortBy
GO
anybody know a fix?
... more >>
still trying to compare dates
Posted by cagdasozgenc NO[at]SPAM hotmail.com at 11/18/2004 4:58:36 AM
Hi,
I read all newsgroup postings about comparing only the date values of
datetime data type. There has been several alternatives, most of them
causes the SQLserver not access an index defined on a datetime column.
suggestions such as
CONVERT(varchar, GetDate(), 101)
may end up causing l... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Access .adp :How to INSERT all but KEY violations
Posted by JimJimJimJim at 11/17/2004 5:16:29 PM
I am trying to append records from one table to another in a db running on
MSDE, knowing fullwell that some of the data in the source will be
duplicates of that in the destination table's pk.
What I would like to happen is to have the stored procedure plunk in all
records that don't violate the ... more >>
SQL statement for report...
Posted by The Eeediot at 11/17/2004 5:12:18 PM
Hello, SQL gurus!
This message use HTML tables (in case you see a bunch of gobbledy-gook).
I need to modify an SQL statement:
SELECT DISTINCT Trim(InvtID)+', '+Trim(Descr) AS Item, month, =
Sum(QtyShip) AS Qty
FROM Sales_View=20
GROUP BY Trim(InvtID)+', '+Trim(Descr), month, CustID=20
H... more >>
SQL novice missing something here_
Posted by spam dump at 11/16/2004 9:39:49 PM
Okay_ sql(2000) wizards_ here's a question for you...
I have two tables. One is used to update the other. I'm looking for
null or changed values in the existing route number field to replace
from table a to table b.
(actually the real query is looking at changed values for a bunch of other
f... more >>
RADiest Client for SQL Server
Posted by Mike MacSween at 11/16/2004 9:03:05 PM
I've got a SQL Server database. Nearly finished. It's going to go on a
single non networked machine. One day somebody might get access to it over
ADSL (probably TS), but for now it's a single user no lan.
The machine will actually be running the MSDE. Windows XP Home.
I'm quite happy, for ... more >>
How to raise error from a user defined function?
Posted by James at 11/16/2004 4:13:54 PM
Hi,
I have a user defined function that returns a decimal value. NULL is a =
valid value.=20
I want to raise an exception if there is no valid value to return.=20
How can I do that?=20
Change to a stored procedure?
Thanks.
James
http://www.poovathummoottil.com=20... more >>
SQL Server Authentication Timeout when not connected to a domain
Posted by Pat at 11/16/2004 3:05:20 PM
Hey everyone. This has been causing problems for a few days now. I can't
figure it out. Maybe someone has a hint.
First the background information. I've got a laptop with SQL Server 2000
Standard on it. It allows both NT and SQL authentication. I have another
laptop hooked up to the sql se... more >>
how can i set a column's default value to today's date?
Posted by Nancy Drew at 11/16/2004 1:53:40 PM
if there a way to set a column's default value to today's date within
enterprise manager?
tks
... more >>
How to catch stored procedure result in VBS?
Posted by mifisailka NO[at]SPAM hotmail.com at 11/15/2004 11:32:03 AM
Hi, there!
I have a VB script. It works as I need.
[..skip..]
sSQLQuery = "Select Size From sysfiles Where Name='EEA_DATA'"
objCommand.commandtext=sSQLQuery
Set oSQLQueryResultSet = objCommand.Execute
WScript.Echo oSQLQueryResultSet.fields("Size")
[..skip..]
My SQL Server has stored pro... more >>
Problem:MS-Access.adp with MSDE link to csv file
Posted by JimJimJimJim at 11/13/2004 3:42:31 PM
Hi. I'm coming from a background of developing mdbs and am trying to migrate
our databases to adps running atop MSDE 2000. However, I've encountered a
problem while trying to do analogous things to what I've done before with
mdbs...for example:
-Linking to a csv file on another machine: I am ... more >>
GetDate -15 days?
Posted by Smitty at 11/13/2004 12:46:52 PM
I need to alter a stored procedure so that it just pulls the records
of items revised in the last 15 days. This iswhat I have to work
with...
SELECT Companies.CompanyName AS Company,
ProgramsListing.Manager AS [Account Mgr],
CONVERT(char(10), ProgramsListing.RevisedDate... more >>
Sql Question - Searching for unused numbers in table.
Posted by Robbmann NO[at]SPAM nospamhotmail.com at 11/11/2004 11:26:37 PM
I would like to search a table that contains a column with a 5 digit number.
These numbers correspond to a number assigned to a user. Currently the
application increments this number each time a new user is added. It
accomplishes this using a stored proceedure to increment a seed number sto... more >>
Where does SQL Server store authentication type?
Posted by mifisailka NO[at]SPAM hotmail.com at 11/11/2004 7:07:03 AM
We can have 'SQL Server and Windows' or 'Windows only' authentication.
I'd like to write script and check this setting automatically.
Where will I find these settings? What table?
Thanks a lot!
-------
Kindest personal regards,
kosta... more >>
SmallBusinessServer2000 version
Posted by Johnny McKeon at 11/10/2004 2:38:22 PM
Hi all,
Have a client who purchased SmallBusinessServer2000 which comes with SQL
server. Installed fine on the server but would like a couple of
workstations to have at least Query analyzer installed but the installation
doesnt want to, fails saying the server software couldnt be found....
... more >>
can i auto generate sql to re-create my tables?
Posted by Nancy Drew at 11/10/2004 9:15:01 AM
hi all
i've written about 10 tables in sql server. i now need to ask another
developer to set up these same tables on his system. due to security
issues, neither of us have dts access to the other's server. is there a way
to automatically generate the sql necessary to create these tables from... more >>
Which version do I need
Posted by Dave at 11/7/2004 6:37:43 PM
I have a dedicated web server running windows server 2003.
I run 4 web sites on it.
I have been using several Access databases, but due to the amount of data
stored and number of visitors the sites tends to slow down.
Which SQL server do I need to purchase, as I don't wish to spend more that I
... more >>
Decimal(3,1) - is 999 a valid value????
Posted by Alec Waters at 11/5/2004 11:19:13 AM
Hi all,
If I have a column of type decimal(3,1), valid values might include 9,
9.9, 99, and 99.9.
Is 999 a valid value? Books online says it is, since I'm only storing
three digits:
=======================
p (precision)
Specifies the maximum total number of decimal digits that can b... more >>
Stored Procedure returns integer not float
Posted by milney_boy NO[at]SPAM hotmail.com at 11/5/2004 3:49:49 AM
Hello,
I have the following SP:
CREATE PROCEDURE round_value
@inpt float
AS
declare @tmp float
if @inpt is null
begin
set @tmp=999
end
else
begin
set @tmp=round(@inpt,2)
end
print 'OPT'
print @tmp
return @tmp
Go
I call it in another SP as:
declare ... more >>
Linked Server (Oracle 9i)
Posted by David Gray at 11/2/2004 2:17:08 PM
Hello all,
Having problems connecting to an Oracle 9i database from within
SQL/Server 2000 using the Security/Linked Servers feature.
Server1 (SQL/Server)
-----------
Windows Server 2003, Standard edition
MS SQL/Server 2000
Oracle 9i Client kit (OLEDB & ODBC) & Enterprise manag... more >>
CONVERT help
Posted by junkmail801 NO[at]SPAM hotmail.com at 11/1/2004 9:11:56 AM
Hello,
I am having trouble converting to a time format like so: 3:00PM. I
keep getting 24 hr time formats. Here is the query:
---
SELECT sections.sec_id, classes.class_code,
CONVERT(varchar, sections.sec_date_start, 101) + '-' +
CONVERT(varchar, sections.sec_date_end, 101) + ', ' + CONVERT... more >>
|