all groups > sql server (alternate) > june 2006
Filter by week: 1 2 3 4 5
OR in the WHERE Clause?
Posted by Alex at 6/30/2006 2:45:20 PM
I am trying to create a system that will select candidates for a job
based on certain criteria (i.e. Supperted States)
The candidates are allowed to choose up to 5 supported states. The
problem comes when creating the query to pull the candidates out.
I can get it to work with only one supp... more >>
memory usage/allocation/paging question
Posted by tlyczko at 6/30/2006 8:43:19 AM
Are there any *negative* consequences to SQL Server 2000 Standard
paging to disk more often if one reduces the amount of available RAM
from 2.0 GB to 1.5 GB to give the OS and other apps enough RAM, other
than things possibly being "slower" and whatever wear and tear could
happen to the disk dri... more >>
Returning the newest rows
Posted by pltaylor3 NO[at]SPAM gmail.com at 6/30/2006 5:17:34 AM
I have a query set up that returns the data that I would like, but I
would only like the latest data for each vehicle number. The query I
have set up is
SELECT TOP 100 PERCENT dbo.vwEvents.EventName,
dbo.luSessionAll.SessionName, dbo.luOuting.OutingNumber,
dbo.luVehicle.VehicleName, dbo.... more >>
SPROC won't execute - insufficient permissions
Posted by teddysnips NO[at]SPAM hotmail.com at 6/30/2006 2:08:50 AM
I'm trying to use the SPROC below (courtesy of Erland!) to capture the
error message but it fails owing to insufficient permissions (I can't
reproduce it just now, but I think it's because it can't get access to
the DBCC OUTPUTBUFFER).
How do I give the SPROC permission to execute?
Many tha... more >>
Does anyone know of a tool that allows a SQL Server database to be
Posted by kesarr NO[at]SPAM gmail.com at 6/30/2006 1:35:43 AM
Does anyone know of a web based tool that allows a SQL Server database
to be
adminstered from the Internet? (in php)
... more >>
inserting into two tables and transaction problem
Posted by Habib at 6/30/2006 12:14:54 AM
CREATE PROCEDURE SimpleInsert (
@custname custname_type,
@carname carname_type)
AS
BEGIN TRANSACTION
INSERT Customers (CustName) VALUES (@custname)
IF @@error <> 0 BEGIN ROLLBACK TRANSACTION RETURN 1 END
DECLARE @custid int
SELECT @custid = scope_identity(... more >>
Sending email (recipients)
Posted by B at 6/29/2006 6:46:27 PM
Follow-up to my original post.
Is it possible for the "objEmail.To" to lookup the values from a sqlserver
table?
At the moment, I type the email address separated by a semi-colon.
TIA~
Set objEmail = CreateObject("CDO.Message")
objEmail.From = "send@test.com"
objEmail.To = "rece... more >>
SQL Server 2005 Express
Posted by Birdman at 6/29/2006 6:35:49 PM
I previously had the beta installed on my PC. I unistalled it to install
SQL Server 2005 Express Advanced, and it is telling me I still have the beta
version installed. It is not listed in add/remove programs. I am lost.
Please help.
... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Export Image Data Types to Local PC from SQL Database
Posted by manmit.walia NO[at]SPAM gmail.com at 6/29/2006 1:48:58 PM
Hello All,
I am stuck on a task that I need to complete. What I have is a SQL 2005
DB running with a Table called Docs. The table structure consists of
the following:
Table Structure for Docs
------------------------------------
DocID int - Primary Key
ClientID int - CustomerID
Creat... more >>
Update statement, then insert what wasn't available to be updated.
Posted by rhaazy at 6/29/2006 11:52:12 AM
Using MS SQL 2000
I have a stored procedure that processes an XML file generated from an
Audit program. The XML looks somewhat like this:
<ComputerScan>
<scanheader>
<ScanDate>somedate&time</ScanDate>
<UniqueID>MAC address</UniqueID>
</scanheader>
<computer>
<ComputerName... more >>
left() and right() function in MS SQL vs MS ACCESS
Posted by sql guy123 at 6/29/2006 11:40:22 AM
I normally use MS ACCESS vs MS SQL,, which has a left() and right()
function. I need to use MS SQL for this project but I am not familiar
with it. I have read a few books, but can not figure out how to do
this. Please help.
If I need to compare the first 4 letters of a field, with the first... more >>
Calling a SP inside a cursor loop..
Posted by satishchandra999 NO[at]SPAM gmail.com at 6/29/2006 9:57:49 AM
I have SP, which has a cursor iterations. Need to call another SP for
every loop iteration of the cursor. The pseudo code is as follows..
Create proc1 as
Begin
Variable declrations...
declare EffectiveDate_Cursor cursor for
select field1,fld2 from tab1,tab2 where tab1.effectivedate<Getda... more >>
Differences between SQL2000 Dev. Edition & SQL2005 Dev. Edition
Posted by x-rays at 6/29/2006 6:34:17 AM
Hello all,
Can anyone tell me or suggest links about differences of SQL Server
2000 Developer Edition & SQL Server 2005 Developer Edition?
Specifically, I need to know about the licencing policy.
So far I know that SQL Server 2005 Developer Edition is licenced for
develpoment (what else), t... more >>
mysql database session management with cj tracking
Posted by Nospam at 6/29/2006 2:08:56 AM
Does anyone know of any session management with mysql scripts that uses cj
tracking?
... more >>
SQLserver on SBS2003 returns old data
Posted by Poul Petersen at 6/28/2006 8:41:01 PM
SQLserver on Small Business Server for Win 2003.
Client application updates records in DB. i.e. the content of a field is
updated from "First" to "Second"
Client application closed and opend again. DB returns value "Second".
Next morning _SOME_ - not all - of the updates seems missing. DB ret... more >>
Insert trigger
Posted by jazpar at 6/28/2006 1:58:41 PM
Hi
I have a table - DebtorTurnover - consisting of 5 fields (ID, Date,
Turnover, VAT, Netturnover). I get a file which I have to import every
know and then, with new data. In this file I only get values for (ID,
Date, Turnover and VAT). The import is working fine with the import
wizard.
Th... more >>
Need help with this select statement
Posted by rhaazy at 6/28/2006 12:08:54 PM
using mssql 2000...
Table Def...
CREATE TABLE [dbo].[tblEmployee] (
[EmpID] [int] IDENTITY (1, 1) NOT FOR REPLICATION NOT NULL ,
[EmployeeID] [nvarchar] (50) COLLATE
SQL_Latin1_General_CP1_CI_AS NULL
,
[DateCreated] [datetime] NULL ,
[LastModified] [dat... more >>
How to get rank?
Posted by jim_geissman NO[at]SPAM countrywide.com at 6/28/2006 11:43:40 AM
I would like to write a query that gives me the values of a set of
observations, and their rank.
CREATE TABLE #Values(val int)
INSERT #Values SELECT 1
INSERT #Values SELECT 5
INSERT #Values SELECT 10
I would like to select this:
1 10 -- rank 1, value 10
2 5
3 1
I can put them into ... more >>
constraint expression for unique keys
Posted by HandersonVA at 6/28/2006 9:29:48 AM
if i have a table which defines a rule as "combination of two field
must be unique", how can I write this in a constraint expression
section?
i started learning more about ms sql side to handle all the necessary
rules in back-end instead of front-end.
also any good learning links, references, o... more >>
how/what should be the query for this result
Posted by choudharymv NO[at]SPAM gmail.com at 6/28/2006 7:28:28 AM
I have 1 table "Progress"
P_no b_no status build_date
----------------------------------------------------------------
25 1 First_slab 2006/4/5
25 1 second slab 2006/5/6
25 2 ... more >>
right padding equivalent
Posted by lossed at 6/27/2006 2:56:51 PM
Hi everyone,
Please excuse me if this has been asked before or sounds a bit dim.
This is a question asked on another forum but the solutions being
offered are focussing on programming rather than letting the DB server
do the work, which I'm not sure is the most efficient solution.
However, my... more >>
Help With Syntax
Posted by PeterA at 6/27/2006 8:34:03 AM
I have two tables.
The first table (a) has a list of all my clients.
The second table (b) contains all of the clients who have placed
orders.
How do I get a list of all of the clients from table "a"
who have NOT placed an order based on table "b?"
Keeping in mind, that if they have not placed ... more >>
sorting twice?!
Posted by Tim at 6/27/2006 2:42:35 AM
here's a good one for you...
I want to return the last 20 records I have modified. I have a
datemodified field - excellent.
So I run a query to select the top 20 when ordered by datemodified
desc.
But now I have these results I want them sorted by companyname.
Is this possible?
Yes I co... more >>
dbcc reindex issue - - I don't understand!!
Posted by Raziq Shekha at 6/26/2006 8:59:44 PM
Hi Folks,
SQL Server 2000 SP3 on Windows 2000. I have a database on which I ran
the command :
dbcc dbreindex ('tablename')
go
for all tables in the database. Then I compared the dbcc showcontig
with all_index output from before and after the reindex and on the
largest table in the dat... more >>
Combining 2 tables with date ranges
Posted by Frank at 6/26/2006 5:53:32 PM
Hi there, I'm trying to generate a report for an old database and I'm
having trouble coming up with an elegant way of going about it. Using
cursors and other 'ugly' tools I could get the job done but 1) I don't
want the report to take ages to run, 2) I'm not a big fan of cursors!
Basically th... more >>
Have Insert statement, need equivalent Update.
Posted by rhaazy at 6/26/2006 1:54:57 PM
Using ms sql 2000
I have 2 tables.
I have a table which has information regarding a computer scan. Each
record in this table has a column called MAC which is the unique ID for
each Scan. The table in question holds the various scan results of
every scan from different computers. I have an ... more >>
SELECT statement help
Posted by schoultzy at 6/26/2006 12:39:04 PM
Hello everyone,
I am working with the following code:
select section_master.trm_cde, section_master.crs_cde, crs_title,
crs_capacity,
crs_enrollment, section_master.udef_3a_1, monday, tuesday, wednesday,
thursday, friday, begin_time, end_time, bldg_cde, room_cde,
name_master.last_name
f... more >>
Developer Edition having issues connecting to server via TCP/IP
Posted by Chris at 6/26/2006 12:20:20 PM
Don't know if there is a simple solution for this one or not. When
running SQL server on a machine with 2000 loaded and the complete SQL
package I don't have any issues. Now I'm trying to login using my XP
machine with MSSQL developer edition, and I can not connect to my
remote servers via TCP/I... more >>
need tool for managing database object ownership
Posted by batman at 6/26/2006 8:01:36 AM
we have a group of developers which have created and asked us (DBAs) to
create many objects in the databases including tables / stored
procedures / functions / etc.
since our company is growing, however we have an increasing amount of
objects that have either been abandoned or have several ver... more >>
pulling progress data
Posted by mattcushing NO[at]SPAM gmail.com at 6/26/2006 6:16:31 AM
I'm trying to pull data from about 30 progress databases using DTS and
scheduling the jobs to run monthly. I'd like to pull data between
specific dates, but for some reason, I can't figure out how to filter
the data on the progress side.
I want to run a query that will pull all data from
pri... more >>
Enumerate databases
Posted by ab at 6/26/2006 3:02:09 AM
This shouldn't be too hard but I can't find the right answer: How can I
enumerate all databases in my SQL Server (V7)?
... more >>
trigger question
Posted by Zvonko at 6/26/2006 12:00:00 AM
Hi!
I have a interesting problem. I need to write a trigger that wil go off
after every sixth row is inserted/updated.
CREATE TABLE [dbo].[PODACI] (
[sifrob] varchar(13) COLLATE Croatian_CI_AS NOT NULL,
[sifoj] varchar(2) COLLATE Croatian_CI_AS DEFAULT '',
[katbroj] varchar(15) ... more >>
"Ghost" primary key column
Posted by chrisek NO[at]SPAM poczta.neostrada.pl at 6/25/2006 12:02:22 PM
Hello,
I have a table 'customers', with 2 records:
SELECT * FROM customers;
customerID | customerName
------------------+-------------------------
myFriend | myFriend's Name
test | testing user
(2 rows)
but when I'm asking about customerID column, I get the answer:
S... more >>
I have a question With Related to performence
Posted by bhushanvinay NO[at]SPAM gmail.com at 6/24/2006 7:13:58 PM
i have a single souce table , Table a With contiains records for two
different entries for the same vendor by different accounting
instructions,
BidId = 10,Person Name=ABC,PersonBidAmt=$100
BidId = 11,Person Name=ABC,PersonBidAmt=$110
now the recors are to be shown as
Original Rcds Vs In... more >>
The single OS nature of MS SQL
Posted by metaperl at 6/24/2006 5:39:10 AM
Pros
-------
* Can optimize the hell out of the database because it does not have to
accomodate different OSes
* Code is probably cleaner - not littered with 80 million #ifdefs
* No need to write the code to deal with various filesystem conventions
Cons
--------
* Most cheap webhosts are... more >>
EXcel sheet into database with stored procedure
Posted by A.M. de Jong at 6/24/2006 12:00:00 AM
Hi,
What is the syntax of storing the content of an Excelsheet in a predefined
table
with a stored prcedure.
Arno de Jong, The Netherlands.
... more >>
Help.... This doesn't make sense...
Posted by Anns via SQLMonster.com at 6/23/2006 4:58:56 PM
I need any one's advice/imput on this...PLEASE!
My computer will now begin the process of taking all the MS Access (Native
Jet Engines - x30 total departmetns) and put the tbles/BE on SQL Server 2005
and the Ms Access FE on MS Sharepoint.
This is the kicker, say 20 out of the 30 (ball park) ... more >>
Insertion and Updates on 20.000.000 tuples table.
Posted by Andrix at 6/23/2006 1:50:12 PM
Hi,
I have a table with 20.000.000 of tuples.
I have been monitoring the performance of the insertion and updates,
but not convince me at all.
The table have 30 columns, what and 12 of it, are calcultated column.
The test that i do was this:
1 Insertion with all the columns and calcul... more >>
Deleted "old" transaction logs = (no items) in EM. How to recover?
Posted by optimistck NO[at]SPAM gmail.com at 6/23/2006 12:35:41 PM
A mistake was made and "old" transaction logs (and old backups) were
deleted. It appears that a long living transaction was living in one of
those logs. Now the EP shows (no items). The DBs themselves are still
functioning OK, just the EP shell that's not working.
What's the proper resolution?... more >>
Access Query against SQL Server works only without criteria
Posted by ShastriX at 6/23/2006 5:48:31 AM
Getting a weird error while trying out a query from Access 2003 on a
SQL Server 2005 table.
Want to compute the amount of leave taken by an emp during the year.
Since an emp might be off for half a day (forenoon or afternoon), have
the following computed field:
SessionOff: ([ForenoonFlag] A... more >>
The identifier that starts with...is too long. Maximum length is 128
Posted by Pedro at 6/23/2006 3:38:21 AM
Hi, i'm trying to run a stored procedure:
"EXECUTE dbname.dbo.spGid 'KFT', '0000000011,0000000012', 'merch,DSMT',
'2006-02-01 00:00:00', '2006-02-28 00:00:00'"
and gives me this error:
The identifier that starts with
"EXECUTE dbname.dbo.spGid 'KFT', '0000000011,0000000012', 'merch,DSMT',
... more >>
2 foreign keys to the same table - multitable selection query problem
Posted by chrisek NO[at]SPAM poczta.neostrada.pl at 6/23/2006 2:42:59 AM
Hello,
I have 2 tables:
- Customers with columns:
customerID(prim_key),
customerName(with customer's names)
- Deliveries with columns:
deliveryID(primKey),
sender(ref_key to CustomerID from Customers),
receiver(also ref_key to CustomerID fr... more >>
SQL Server Error "Missing end comment mark"
Posted by Maricel Espejo at 6/23/2006 12:00:00 AM
Hi,
Is there anyone encountered this error before & how it is being resolved?
[Microsoft][ODBC SQL Server Driver][SQL Server]Missing end comment mark '*/'
The error pops-up when I was running a DTS Import/Export from a SQL server
(source) to another SQL server (destination) residing on a d... more >>
Help sending email
Posted by B at 6/22/2006 9:41:16 PM
My code below works fine when run from my pc (changed all the values for
obvious reasons). The code is placed inside a DTS task via VBS scripting.
But when I try to run directly from the server where sqlserver is installed,
the script fails.
I have SMTP running, but there is no outlook instal... more >>
Separate databases for high/low transaction volumes?
Posted by peterc at 6/22/2006 4:56:46 PM
I have an existing database with approx 500,000 rows and accessed by a
few hundred users per day creating approx 1,000 new records per day
plus typical reporting - relatively low volume stuff for SQL Server.
I'm about to add a process that will be importing data daily from
legacy databases and... more >>
Extremely Poor Query Performance - Identical DBs Different Performance
Posted by Brian Tabios at 6/22/2006 4:26:16 PM
Hello Everyone,
I have a very complex performance issue with our production database.
Here's the scenario. We have a production webserver server and a
development web server. Both are running SQL Server 2000.
I encounted various performance issues with the production server with a
particu... more >>
Speed up UDF
Posted by ujjc001 at 6/22/2006 3:01:55 PM
Hello all-
Given the following UDF, in sql 2000 can it be sped up, complied or
anything of the like. A query returning 300,000 + rows times out when
ran through the udf, inline case statements returns the rows in 5
seconds.
Thanks!
Jeff
CREATE FUNCTION dbo.TimeFormat
(
@input datetime... more >>
What is Your Strategy for Upgrade an Access db to SQL Server 2000?
Posted by NickName at 6/22/2006 11:04:40 AM
This question probably has been asked many a time. And yet I feel it
is still relevant for one thing a search on this NG does not produce a
desirable answer.
It is kind of disappointing that MS would not be able to transfer ER
relationship from an Access db to a SQL Server 7/2000-based one, t... more >>
Very Poor Performance - Identical DBs but Different Performance
Posted by BTabios NO[at]SPAM gmail.com at 6/22/2006 9:44:47 AM
Hello Everyone,
I have a very complex performance issue with our production database.
Here's the scenario. We have a production webserver server and a
development web server. Both are running SQL Server 2000.
I encounted various performance issues with the production server with
a particula... more >>
Query with Joins problem
Posted by wilhelm.kleu NO[at]SPAM gmail.com at 6/22/2006 9:41:37 AM
Hello
Let me explain the problem I am having:
I have two tables, data_t and a_data_t
a_data_t is the archive table of data_t
The two tables are exactly the same.
In the table values are stored:
Value (A numeric value)
Code (A text code to identify a report with data)
Line (The line num... more >>
|