all groups > sql server new users > october 2007
UPDATE OR INSERT in one statement?
Posted by Ralf Kaiser at 10/31/2007 12:00:00 AM
Hello,
is it possible to create one statement that updates a table if a record is
already present and inserts new data if the record does not exist before?
Something like (Pseudo-Code!!!):
UPDATE_OR_INSERT MyTable
SET NAME = 'Bill', USERID=5
WHERE USERID=5
That should update the fi... more >>
dump and import data?
Posted by Jim at 10/30/2007 1:33:37 PM
Using SQL Server 2005 Dev and SQL Server Manager, how do I dump a table and
it's data to a file then import it into another table?
I see the options "Script Table as" and then the Create To, Drop To, etc.
options, but all of those only put the structure in the file. What am I
missing?
Th... more >>
Table joins and views nesting; maximum
Posted by Barry Burke at 10/28/2007 12:00:00 PM
Whats the 'normal' maximum count of tables in a join and what if there are
views involved.
What about nesting views... more >>
Exporting email archive from SQL 2005
Posted by tdstr at 10/26/2007 11:34:10 AM
Total SQL newbie here. Hope I'm posting in the correct group.
I have a Exchange 2003 server that archives all email to a large(55GB)
SQL database. I have a situation where I have to export several emails
from that database. However at this point I am clueless on how to
accomplish this.
A... more >>
grouping query, concatenate records?
Posted by HX at 10/26/2007 9:39:49 AM
How can I concatenate specific fields across records in a query?
Here is the layout of my table:
CREATE TABLE [rdb].[image_use](
[RecordID] [int] IDENTITY(1,1) NOT NULL,
[ImageID] [int] NULL,
[ModuleID] [int] NULL,
[LessonID] [int] NULL,
[TopicID] [int] NULL,
[PageID] [varchar](50)... more >>
How to: find the last time a procedure was compiled and why
Posted by Edmund at 10/26/2007 12:00:00 AM
Hello,
Does anyone know how to select the last time a stored procedure was compile
and which recompile condition caused it?
Thanks,
E
... more >>
How to shrink/truncate transaction log file in SQK2K
Posted by Mehbs at 10/25/2007 11:46:55 AM
My transaction log file is pretty big and am trying to run maintenance plan
which is setup to clear the unused space etc. But it does not run. It keep
erroring out saying administrator has no rights to run.
Is there any other way of running or shirinking log file?
... more >>
create table and specify numbers in ID field
Posted by PolarBear at 10/23/2007 9:42:00 AM
I need to create a table and generate numbers for the ID field ranging from
100001 thru 300000. In the next column, I will generate random numbers. the
resulting table will then serve as a key for mapping purposes.
I am OK on the random number aspect - however, what script is required to
ge... more >>
Don't see what you're looking for? Search DevelopmentNow.com.
Easiest way to dump data in an .mdf file
Posted by Anon E. Mouse at 10/21/2007 7:14:48 PM
I have old mdf/ldf files. I just want to dump them to plain text. I do
not have a copy of sql server, and would prefer not to go through some
large installation process just to convert these files.
Is there an easy way to do it? Maybe SQL Server Express?... more >>
Looking for Northwind and Pubs
Posted by Middletree at 10/19/2007 1:09:03 PM
I'm going through a book to learn Reporting Services, and it assumes the
reader has Northwind and Pubs databases. I went to the MS site to download
the sample databases, and it simply contained a link to another site called
codeplex.com. That site only has the new sample database, Adventure Wo... more >>
Understanding MSSQL Trigger
Posted by Jan K. van Dalen at 10/19/2007 11:06:32 AM
Ok, I'm new to MSSQL but have been using Sybase forever :)
I'm finding that moving my knowledge of ASA Triggers to MSSQL 2005 is
useless ... maybe ... I have been doing some reading but want to make sure.
Here are some questions:
1) Can I execute a trigger BEFORE a record is insert/delete... more >>
how create a instance MSSQL.2
Posted by Hernandezz at 10/17/2007 3:27:01 PM
Hi.
I have Ms project server 2007 and SQL Enterprise 2005. I want to create a
OLAP cubes. I follow the installation guides but I don't have MSSQL.2
directory.
How i create this? I read it is necessary to create an instance, but how i
do that? I'm not a expert in SQL.
Thanks
--
He... more >>
Attach error: cannot be upgraded because it is read-only or has read-only files
Posted by AlexW at 10/15/2007 9:08:53 PM
I'm installing SQLExpress SP2 as part of an application installation.
One requirement for this installation is to make the installing and
configuration of SQLExpress, the target database and the application
that uses it as easy button as possible. The installation of
SQLExpress, my database an... more >>
New User Questions
Posted by John W at 10/15/2007 12:00:00 AM
I'm brand new to SQL and just looking for some advice. Basically I am
teaching my self through the use of books and online video's. I'm starting
with SQL Express and I'm using Management Studio Express. I have some basic
programming experience but not in SQL. What I'm working on is a proje... more >>
Install problems with enterprise edition and vista
Posted by lstandridge NO[at]SPAM cnitucson.com at 10/12/2007 10:06:33 AM
I have been trying to install SQL Server 2005 Enterprise Edition on a
Vista OS and am having a problem. After the install and the sp2
install, there is no instance of SQL Server running. I am new to SQL
Server (most of my experence is with Oracle) but I believe this to be
an incomplete install... more >>
Query help finding empty or null columns
Posted by Jamie at 10/11/2007 12:00:00 AM
I need someway of locating all the columns in a table where the entire
column is either NULL or ''.
Does anyone know an easy way to do this against a table with about 30
columns? Or any suggestions???
Column 1 Column 2 Column 3
-------- -------- -... more >>
query difficulty with datetime
Posted by Jim in Arizona at 10/10/2007 12:23:45 PM
Perhaps I just didn't get enough sleep last night or something .. BUT,
I'm having some trouble with this line of my SQL:
AND [date] < DATEADD(DAY, 2007-09-10 11:39:10.053, GETDATE())
This returns this error:
Msg 170, Level 15, State 1, Line 8
Line 8: Incorrect syntax near '11'.
I tried... more >>
Enterprise Manager and SQL Server registration
Posted by cpu at 10/6/2007 1:48:37 AM
I noticed in SQL Server 2000 Enterprise Manager one of the server logins
is Domain User
My understanding is:
As long as I have a valid SQL server login account I'd be able to connect
to the server but not access databases until my server login account is
associated with a database user ... more >>
Transaction Log
Posted by Allan M. Grafil at 10/5/2007 12:00:00 AM
Hi guys,
I dont know if im in the right group. My scenario is like this.
Transaction logs are eating up my server's hard drive. Almost 60% of my
space is transaction log. What are these? Can I simply delete it? Can I
compress this? Can someone explain this log file.
Thank you in advan... more >>
How to list user table names of a database
Posted by cpu at 10/4/2007 8:11:33 PM
I am stumped. Given a database, I need to list all the (user) table names
in that database (no system tables)
I have tried:
use northwind
go
exec sp_help;
but that gives me all the tables of the database but I only want the user
tables
Can someone point me in the right direct... more >>
log scan number error
Posted by camarkco NO[at]SPAM hotmail.com at 10/4/2007 12:20:49 AM
Hi,
I am getting the error "The log scan number (27:294:259) passed to
log scan in database 'jcl' is not valid. This error may indicate data
corruption or that the log file (.ldf) does not match the data file
(.mdf). If this error occurred during replication, re-create the
publication. Otherw... more >>
(local) problem
Posted by Andrew Kennard at 10/3/2007 8:33:51 PM
Hi All
I have one machine that has the SQL Dev edition on and another that uses SQL
Express
On the SQL Dev machine using a server name of (local) works fine
On the machine that uses SQL Express this does not work and I have to use
COMPUTERNAME\SQLEXPRESS
Any idea on why this might be... more >>
Using SQLMaint or other methods to backup data
Posted by Steve Freides at 10/3/2007 10:47:10 AM
Another computer has an add-on to QuickBooks that stores its data in an
instance of SQL Server I'm trying to figure out how to backup. (I have
an instance of SQL server on my own computer that I don't use - again, I
think it was installed by software I don't use or maybe even never
used.)
... more >>
Complex Join
Posted by Roger Whitehead at 10/3/2007 12:00:00 AM
(Well, it's complex to me...)
I have two tables;
1) People - which has a many-to-one relationship with
2) Family
[People] has a PK[peo_personid] and a Foreign Key [peo_familyid] from the
[family] table
I'm trying to get a query output of one record per family, roughly as
follows
--... more >>
sql 2000 file export
Posted by Aaron at 10/1/2007 1:12:50 PM
Good afternoon, folks. Here's one for anyone. . .
How can I export the results of a query into a csv file so as to include
a text qualifier (" ") for all text data. I am using SQL 2000.
Thanks,
Aaron... more >>
|