Viewing 15 posts - 46 through 60 (of 84 total)
This is an example of what you are trying to do:
DECLARE @start_num int
DECLARE @end_num int
SET @start_num = 1
SET @end_num = 10000
SET NOCOUNT ON
INSERT INTO OrderItems
( OrderID
...
December 12, 2007 at 8:12 am
Try this:
CREATE TABLE [dbo].[tblTest_a](
[aID] [int] NOT NULL,
[aServerName] [nvarchar](50) NULL,
[aDateFrom] [smalldatetime] NULL,
[aDateTo] [smalldatetime] NULL,
CONSTRAINT [PK_tblTest_a] PRIMARY KEY CLUSTERED
(
[aID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY =...
November 21, 2007 at 8:06 am
Just to clarify the assumptions I made prior to posting my solution above:
Your original post said,"...need a script that looks for NULL start and end dates at the bottom level...
November 20, 2007 at 12:26 pm
This example will:
* Take each record where the ProjStartDt is NULL,
* Trim off the last '.' + whatever follows,
* And, try to match that result with...
November 20, 2007 at 11:12 am
Christian,
I think what you may be looking for is as follows:
In SQL Server 2000 you can create a view that includes an ORDER BY in the view's definition.
Ex. "SELECT TOP...
October 8, 2007 at 7:53 am
Adding a comment to Jack Corbett's post, you can use MS Access' ADP (project) file type to connect directly to SQL Server. You won't need to use ODBC.
September 13, 2007 at 8:08 am
You could use CASE statements to include/exclude JOINs as in the example below:
SELECT @sql =
'SELECT a.[FirstName] + '' '' + a.[LastName] AS FullName,
s.[Phone] AS Phone,
s.[HomePhone]...
April 17, 2007 at 8:01 am
If you are using Enterprise Manager:
> Right-click the WFSA_dev database
> Select "Restore Database" (the Restore database dialog box will display)
> Using the combo-box: "Show backups of database:" select WFSA
> The...
March 27, 2007 at 7:36 am
You can use a CROSS JOIN to include all rows from both tables. For example:
Assuming the following:
1. Model office table: tblMO with column MOnum.
2. Condition table: tblCondition with column Condnum.
3....
February 22, 2007 at 7:47 am
This will also work:
Declare @Path as nvarchar(1000)
Update aTableRecordCount
Set @Path = Replace( Path,' \', '\'),
@Path = Replace(@Path,' \', '\'),
@Path = Replace(@Path,' \', '\'),
@Path = Replace(@Path,' \', '\'),
@Path...
January 18, 2007 at 7:24 am
Paul,
Access .mdb's and .adp's can get bloated over time when objects are being modified. One thing worth doing from time to time is "Decompile" the database file. Start MS Access...
December 22, 2006 at 7:34 am
/*
This is a simple example of dynamically building a script and dynamically executing it against multiple databases.
Notice the square brackets [ ] around the @DBName. This would be required for...
November 29, 2006 at 2:12 pm
Just an idea:
If you have a large table, with a Clustered index on anything but an identity column, performance can really suffer. This is especially true when INSERT statements are...
September 15, 2006 at 8:38 am
Just an idea:
I have to retrieve data from tables on an AS400, and use a...
August 31, 2006 at 8:45 am
We refresh our test databases weekly with a scheduled SQL Agent Job.
The following is example code, similar to one of our Job steps.
I hope this helps.
--This solution requires you to...
June 21, 2006 at 10:32 am
Viewing 15 posts - 46 through 60 (of 84 total)