all groups > sql server (alternate) > march 2007
Filter by week: 1 2 3 4 5
SQL Datatypes
Posted by pinney.colton NO[at]SPAM gmail.com at 3/31/2007 7:41:18 PM
I have a SQL 2005 database that's created by a survey data collection
system. Users of this system are fairly non-technical and have little
to no conscious control over the datatypes. As a result, the data is
mostly stored quite inefficiently as varchars. For example, there is
data that could... more >>
The old inability to toggle/change/switch between ALTER PROCEDURE <---> CREATE PROCEDURE bug (or is it a feature?)
Posted by raylopez99 at 3/31/2007 3:26:37 PM
Keep in mind this is my first compiled SQL program Stored Procedure
(SP), copied from a book by Frasier Visual C++.NET in Visual Studio
2005 (Chap12). So far, so theory, except for one bug (feature?)
below. At some point I'm sure I'll be able to laugh about this, akin
to forgeting a semi-colon... more >>
Converting a date field to the month
Posted by lisa.moffitt NO[at]SPAM gmail.com at 3/30/2007 1:51:13 PM
How can I create a field in a view that takes a date field and
converts it to a month?
For instance, if I have a field called "CreatedOn" with a date of
'2/22/2007', how can I create another field called "Month" that will
say "February"? Is there a built-in SQL function that does this (like
us... more >>
how could I ???
Posted by any_Girl at 3/30/2007 1:46:30 PM
how could I start learning SQL SERVER
Im just student
... more >>
Allowing users to truncate log file
Posted by hedgracer at 3/30/2007 8:56:54 AM
I would like to allow a particular user to truncate a log file in a
stored procedure that the user runs every day. At this moment the only
personnel that can truncate the log file are personnel with sysadmin
rights. Is there any way to do this in sql server 2005 without
granting this user sysadm... more >>
After Sql 2005 Install, Sql 2000 Still There
Posted by pbd22 at 3/30/2007 7:21:21 AM
Hi.
I just downloaded and installed Sql 2005 from the MS site.
I see that my instance of Sql 2000 is still on the same computer.
I assumed that Sql 2005 would upgrade but it didnt. Should I
simply delete my instance of 2000 or will this cause complications?
Sorry - newbie question.
... more >>
I have a database on a network drive that I use for archiving purposes, but when the server is rebooted the database becomes suspect.
Posted by war_wheelan NO[at]SPAM yahoo.com at 3/30/2007 7:08:51 AM
I created the db with the attached script and I am able to access it
until I reboot the server. I've tried enabling flag 1807 via the SQL
server service and the startup parameters of the instance. In all
cases the database always come up suspect after a reboot. There was
one instance where I ... more >>
Data type in audit record
Posted by WombatDeath NO[at]SPAM gmail.com at 3/30/2007 3:59:21 AM
Hi,
I want my application to audit any data changes (update, insert,
delete) made by the users. Rather than have an audit table mirroring
each user table, I'd prefer to have a generic structure which can log
anything. This is what I've come up with:
TABLE: audit_record
*audit_record_id (... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Combine multiple records into single row
Posted by franzey at 3/29/2007 9:43:08 AM
This is how the data is organized:
vID Answer
12 Satisfied
12 Marketing
12 Yes
15 Dissatisfied
15 Technology
15 No
32 Strongly Dissatisfied
32 Marketing
32 Yes
What I need to do is pull a recordset which each vID is a single row
and ... more >>
pivot table without aggregation?
Posted by Mike at 3/29/2007 9:04:24 AM
Hello, I have a resultset as follows:
fields: Name, RankID
values:
Prorduct A, 4
Product B, 33
Product C, 221
(etc)
Name is always unique. RankID may not be.
I want to take that result set and basically pivot it to have the Name
values as columns, and the RankID of each one as the ... more >>
Run query based on values in another table
Posted by bubbles at 3/28/2007 11:52:48 PM
Newbie transiting from VBA to TSQL, using SQL Server 2005 Enterprise:
Need help to do this:
Open Table_A
WITH TableA
DO UNTIL .EOF
Read value from TableA.ColumnA
Run SQL Statement on TableB based on value
Move to the next record
LOOP
END
... more >>
Restoring backup from SQL 2000 to SQL 2005 but login name is missing
Posted by Gerd at 3/28/2007 11:25:58 PM
Hi all,
I'm having a problem restoring backup from 2000 to 2005. The actual
restore process went ok. However, the database user of the restored
database is missing a Login Name. I've made sure that the Login Name
is created in 2005. Also tried deleting the user, but couldn't the
user is d... more >>
data length more than ...
Posted by AJA at 3/28/2007 1:05:37 PM
Hello
I have problem with reading from XML when XML is to large.
Program delare 1-n variables where is declaration but can no make more
delarations than length 8000 :((
drop table tblBooksEx
CREATE TABLE [tblBooksEx] (
[Row_ID] [int] IDENTITY (1, 1) NOT NULL ,
[BooksData] [text] COLL... more >>
connections
Posted by DaveP at 3/28/2007 12:03:17 PM
im writing a service that will be on a app server
this is one of many service's to process Recordsets from Sql Server...
1 service may have 20 Processes to Complete
example
main class PreProcess()
method CleanNames();
method updateNames();
methodr ValidateContracts();
Various things must... more >>
Newbie on permissions: ADO.NET, C++.NET, SQL SERVER 2005 EXPRESS, Visual Studio 2005
Posted by raylopez99 at 3/28/2007 9:54:54 AM
This is a very basic question, perhaps more of a Windows XP
Professional OS permissions question than a dB or programming
question: how to create and access SQL SERVER databases from an
account other than "Administrator"; for example, from a "Power User"
account?
As anything other than an "Ad... more >>
SQL Server Problem
Posted by MacRae at 3/26/2007 11:28:33 PM
Please bare with me here:
I have been running an SQL Express backend for a small project i've
been working on. We've recently added a "small business server R2" and
I would like to migrate my existing SQL Server database/tables etc.
onto this server.
Now there is an sql server instance runn... more >>
Update Status Field after Expiry Date
Posted by shane.taylor81 NO[at]SPAM gmail.com at 3/26/2007 3:44:48 PM
Consider the following table
Customer
custId char(10)
accountExpiryDate datetime
accountStatus bit
Now, I want to update the accountStatus to False as soon as the
current date becomes accountExpiryDate.
I think it can be done using "SQL Agent" but my webhost doesnt provide
me access to... more >>
SQL 2005 automatically partitioning?
Posted by Erik G at 3/26/2007 10:22:01 AM
Once I've added Files for a database across mulitple SAN drives will
SQL 2005 automatically partition data across the Files automatically?
Will it atleast grow across files automatically? Or do I have to do
Scheme Functions, Partitions, and assign the Scheme Partition to each
table in the databa... more >>
SQLAgent 2005 SP1 failed to run .bat file.
Posted by Amber at 3/26/2007 5:53:19 AM
Following is our test steps.
1. Create directory E:\firefly in E:.
2. Create a test file a.txt in E:\firefly.
3. Create E:\firefly\test.bat file with the following commands:
cd E:\firefly
copy a.txt b.txt
4. Create a new job in SQL Server Management Studio with only one
step, this only ste... more >>
Converting string to unicode string in T-SQL
Posted by yashgt NO[at]SPAM gmail.com at 3/26/2007 1:08:28 AM
Hi,
We have stored proc name proc_test(str nvarchar(30)). So far this proc
has been invoked from a .NET application assuming that only English
character strings will be passed to it. The calls are like
proc_test('XYZ')
We now have a requirement for passing Chinese strings as well. Rather
tha... more >>
How can I join your Group
Posted by magedsql NO[at]SPAM gmail.com at 3/25/2007 12:59:44 AM
I am MCDBA, I like your group, and i need to join it as a member
but i do NOT know How .
Please help
Thank You
maged.
... more >>
DB Maintenance Plan SQL 2005 on 6300+ Database
Posted by Icemokka at 3/24/2007 8:38:25 AM
Hi,
We have a SQL-cluster with over 6300 databases, most of them pretty
small in size and usage.
For this reason all these databases are on auto-close ( Otherwise SQL
would need many many gigabytes ).
We've recently upgraded to SQL 2005 because of the Management Studio,
because the EM is u... more >>
newb - mutiple-column join
Posted by dave at 3/23/2007 11:58:40 AM
Hi,
very new to SQL queries, and strugling with join concept
I had to do a join based on a single field:
select
*
from
tableA, tableB
where
tableA.value = tableB.value(+)
;
this works fine
but how can i do the same thing while comparing multiple col... more >>
Group SQL Select Statement
Posted by Andreas at 3/23/2007 11:13:30 AM
Hi,
I am bloody amateure and I was wondering if someone could help me edit
the statement below so it groups the field SCDMASTER.SCTY_CLASS_CODE
and creates one field called "total balance" equalling
CUSTODY_BALANCE.OPENING_BALANCE + CUSTODY_BALANCE.DEPOSIT_AMOUNT -
CUSTODY_BALANCE.WITHDRAWAL_... more >>
Service Broker with offline application
Posted by fireball at 3/23/2007 10:38:16 AM
Some of my receiving service side applications usually work offline, and
they only are supposed to get connected to the network once/few times a day,
to send/receive Service Broker messages.
Will my sending service side application (permanent connected to the
network) keep retrying repeated... more >>
Indexes on SQL Server 7.0
Posted by Zamdrist at 3/23/2007 10:08:25 AM
I am tasked with maintaining a large database still on SQL Server 7.0.
Performance is an issue not surprisingly and I've targeted two rather
large tables to see what I can do with the indexes.
The 2 tables are described as follows:
MatterConflicts:
Fields: MatterConflicts varchar(16), Matte... more >>
views not updateable
Posted by othellomy NO[at]SPAM yahoo.com at 3/23/2007 3:06:01 AM
How do I make a view non updateable? I want to create a view so that I
will not be able to update, insert or delete the view so that base
table is not affected (except dropping the view itself). Thanks.
... more >>
Online Connection between Access and SQL Server
Posted by Michael at 3/22/2007 11:35:59 PM
Hello,
I am trying to develop a database solution for an organisation in
Indonesia.
This organization has a number of offices and users throughout the
country. They all need to maintain their own data, but I also need to
create a central database, to store all of the data, and share data
bet... more >>
SQL stored procedure returns duplicates
Posted by yin_n_yang74 NO[at]SPAM yahoo.com at 3/22/2007 3:59:59 PM
I am new to SQL and SQL Server world. There must be a simple solution
to this, but I'm not seeing it. I am trying to create a crystal
report (v8.5) using a stored procedure from SQL Server (v2000) in
order to report from two databases and to enable parameters.
When I create the stored proced... more >>
xml into mssql 2000
Posted by AJA at 3/22/2007 8:26:38 AM
Hello
I watchet some posts but did not find answer to my question : how to
import data from xml into mssql 2000 using t-sql?
i tried:
USE Northwind
if(object_id('dbo.test_xml') is not null)
drop table dbo.test_xml
go
create table dbo.test_xml (Id int identity(1,1), col1 text)
... more >>
Database table data modifications with PK/FK relationship
Posted by ebade2000 NO[at]SPAM gmail.com at 3/21/2007 2:48:11 PM
I have two tables (T1 and T2). In T1 I have a field FT1 that is a
primary key in T2 I have a field FT2 that is a foreign key linked to
FT1. These fields have been populated with data. Lets say that in one
row of data I have in T1 under FT1 "my cell" as the data entry,
similarly with T2 under FT2... more >>
help with parameter in WHERE
Posted by knowzero at 3/21/2007 12:22:38 PM
my query:
select Product_List.*, Product_Sales.*
from Product_List
left outer join Product_Sales on Product_List.ID = Product_Sales.ID
this works fine. its simple. I have this in a report and I would like
to add a parameter @p1 to add to the query
where Product_Sales.Order_Amount >= @p1
... more >>
Sub-Query / Cross Join / or something else?
Posted by Henrik Juul at 3/21/2007 10:02:09 AM
I have the following 2 tables:
(BATCHES)
BatchID [int] KEY
ID [int]
OrderID [int]
Action1DateTime [datetime]
Action2DateTime [datetime]
Action3DateTime [datetime]
Action4DateTime [datetime]
Action5DateTime [datetime]
Action6DateTime [datetime]
Action7DateTime [datetime]
Action8DateTime... more >>
Table name starting with prefix tbl
Posted by plmanikandan NO[at]SPAM gmail.com at 3/21/2007 9:39:01 AM
Hi,
I would like to know details about the table name starts with prefix
in sql server 2000.
Actually i'm working on existing code.
The existing code insert a record into a table, but the table name in
the code and table name in database are different
Table name in database : tbl_mmm_ox
In c... more >>
install SS 2005 on win2k3 ENT or STD, which is better??
Posted by tlyczko at 3/21/2007 8:29:19 AM
We are planning a SQL Server 2005 install on VMware ESX, as the
backend to a Sharepoint Services 3.0 web front end..
Do I gain anything at all by installing SS 2005 on Win2k3 ENTERPRISE
as the OS instead of Standard??
Thank you, Tom
... more >>
Accessing external data from SQL Server
Posted by arshad.tanveer NO[at]SPAM gmail.com at 3/21/2007 7:56:18 AM
Hi,
I have a Sybase dataserver containing lots of (huge) tables that I
would like to access from SQL Server (two different applications,
using two different datasources, now want to talk to each other). MS
Access has a feature for 'linking' external data. Can I do similar
stuff in SQL Server?
... more >>
Comparing two databases
Posted by plmanikandan NO[at]SPAM gmail.com at 3/21/2007 7:15:17 AM
Hi,
I would like to compare two sql server databases.
I need to find the difference in the two database(i.e table, colums,
data type)
Is there any free utility available to compare sql server database
I'm using sql server 2000.
Help me out to compare databases
Thanks & Regards,
Mani
... more >>
Mentored Learning
Posted by whosesocks at 3/21/2007 6:10:02 AM
I discovered that many of my very busy colleagues are having an
extremely difficult time pulling themselves away to take vital
training when it requires being away for consecutive days. I just
completed training for .NET in Chicago through a mentored learning
program that personally helped me t... more >>
Multiple db query call from within different context into #temp table
Posted by santaferubber NO[at]SPAM gmail.com at 3/20/2007 11:57:26 PM
The first query returns me the results from multiple databases, the
second does the same thing except it puts the result into a #temp
table? Could someone please show me an example of this using the first
query? The first query uses the @exec_context and I am having a
challenge trying to figure ... more >>
Help needed creating select statement
Posted by Mintyman at 3/20/2007 3:02:06 PM
Hi,
I have a need to create a table detailing the ID of all contacts and the
last time they were contacted. This information is stored in 2 tables,
'contact' and 'activity' (ID in the 'contact' table links to 'main_contact'
in the 'activity' table).
I guess I need some sort if iteration ... more >>
Quick SQL Select Statement ?
Posted by t8ntboy at 3/20/2007 1:10:09 PM
I am using SQL Server Express and ASP.
I have a table that contains news articles, headlines, start and end
dates. I am trying to create a recordset that shows all of the
articles that are greater than or equal to the start date and less
than or equal to the end date. For some reason I canno... more >>
Data Feed / Make / Model Catalog
Posted by vilasack.phothisan NO[at]SPAM gmail.com at 3/20/2007 12:23:57 PM
Does anyone know where to start if I want an exported copy of home
appliances, cars, cell phones etc.
I just need to populate my database and I want to get some data feed
from all the different types of manufactures.
I think there are services out there. But I have not seen one.
I want a ... more >>
nulls
Posted by othellomy NO[at]SPAM yahoo.com at 3/19/2007 11:28:22 PM
create table t1(c1 int, c2 varchar(10))
insert t1 values(1,'Hello')
insert t1 values(2,'')
insert t1 values(3,NULL)
select *
from t1
c1 c2
1 Hello
2
3 NULL
select *
from t1
where c2 = ' '
c1 c2
2
select *
from t1
where ltrim(rtrim(c2)) is null
c1 c2
3 NULL
T... more >>
Invitation - MrBool.com
Posted by Eduardo_Sp=EDnola at 3/19/2007 8:51:20 PM
Hi friends,
First I would like present me. My name is Eduardo, I am publisher of
the Mr.Bool Portal (that can be accessed through the address www.mrbool.com=
)=2E
There is short time was given beginning to this new challenge, and now
I am finding columnists that have interest in write artic... more >>
Access 2k adp
Posted by JA at 3/19/2007 6:36:54 PM
Hi,
I posted this in an access adp newsgroup, but there don't seem to be any
messages there since 9-06.
I am accessing an online SQL Server (2k) database with an Access adp (also
2k). I'm new to doing this.
Does anyone know if I can append records to a SQL Server table thru access?
Wi... more >>
Easy newbie question
Posted by jrpfinch at 3/19/2007 11:26:36 AM
Sorry if this seems too easy to be interesting - I have yet to find an
elegant solution, as I am completely new at this so don't really know
what to look for. I have the following table:
Id Cat
1 A
2 B
3 C
4 A
5 B
6 B
7 C
.... more >>
Date query help
Posted by Giorgio at 3/19/2007 10:14:33 AM
I have a table with a date_created and date_expired and I want to look
at the 15th of each month and every month since the system started and
count up how many accounts were active at each of those points in
time.
Will have to assume that if there's an expiry date bigger than today
then that ac... more >>
Help with Select and IN
Posted by Giorgio at 3/19/2007 5:39:37 AM
Can someone tell me options to do this statment because this one does
not work!
SELECT Name FROM tbl_J
WHERE J_ID IN
(SELECT J1, J2, J3, J4, J5, J6
FROM tbl_CJ
WHERE CJ_ID =23515) ORDER BY Name
... more >>
I cannot view table content in MS SQL Server Express
Posted by antonyliu2002 NO[at]SPAM yahoo.com at 3/18/2007 8:58:13 PM
I was able to view table content easily before, but after I
reinstalled everything, I cannot find the option to view table content
in MS SQL Server Express. I can define table with no problem. Check
out the screen snapshot below, from which you'll see that the popup
menu frrom right-clicking on... more >>
Transaction not rolling back
Posted by cricketweb NO[at]SPAM gmail.com at 3/18/2007 2:49:25 AM
I have a stored procedure that calls another stored procedure with the
first stored procedure opening a transaction:
BEGIN
SET XACT_ABORT ON
BEGIN TRANSACTION
does various updates/inserts
calls 2nd stored procedure to proccess updates/inserts common to many
other stored procedures... more >>
|