Viewing 15 posts - 166 through 180 (of 1,347 total)
If the table is already created, the syntax is:
INSERT INTO t_Table2
SELECT col1,col2,col3
FROM t_Table1
WHERE id > 23 and active = 1
January 23, 2007 at 3:10 pm
You will save yourself a career-full of problems if you indent your code:
IF @header_id = -1
BEGIN
-- Insert the into headers --
INSERT INTO [headers]
(
[header_file]
,[fk_admin_menu_id]
,[fk_admin_submenu_id]
)
...
January 23, 2007 at 2:26 pm
Because of the issues with ties, I resorted to solving this with a temp table and an absolute ranking for each record. The absolute ranking allows easy retrieval of the...
January 19, 2007 at 2:42 pm
>>No column was specified for column 1 of 't1'.
t1 is a derived table. All columns in a derived table must be explicitly named. The expression max(date_start) has not been assigned...
January 19, 2007 at 12:09 pm
This is on SQL2K, right, and not SQL 2005 ? (Asking because there is a simpler solution in 2005 using the new ranking functionality in T-SQL).
January 19, 2007 at 11:37 am
If the join is essentially the same in both cases, but with more constraints on the count, you can solve it with just one join, by moving the expression into...
January 18, 2007 at 4:44 pm
Don't forget, inserted & deleted tables are not available inside the stored proc.
If the @parameters you're passing into the stored proc are somehow derived from a query on the inserted/deleted...
January 18, 2007 at 3:58 pm
You're trigger is written to only support 1 record at a time inserts to the table. Can you ever have scenarios where the number of records inserted in a batch...
January 18, 2007 at 2:30 pm
Best, you've been working on these GE Policy tables for over 6 weeks. All your 90+ postings to date are about these same tables & queries.
http://www.sqlservercentral.com/forums/shwmessage.aspx?forumid=8&messageid=328266
You've had 'invalid column...
January 18, 2007 at 1:11 pm
Does thsi:
JOIN vwEventHistoryWithInterpolatedAndOutlierAdjusted eh ON eh.[year] = nh.[year]
AND eh.netSquareFeet > n.nsfCategoryMin
AND eh.netSquareFeet <= n.nsfCategoryMax
AND eh.HasTwoYearsContinuousData = 1
AND eh.HasEnoughDataPoints = 1
AND eh.isConsumerEvent = 0
AND eh.netSquareFeet IS NOT NULL
.....
January 18, 2007 at 12:56 pm
What are the datatypes of the 2 columns ?
Are they true date/time types (datetime or smalldatetime) or are the char/varchars containing date & time formatted into a string ?
January 12, 2007 at 2:02 pm
ROWTERMINATOR = '\r' - carriage return only
ROWTERMINATOR = '\n' - CR/LF pair
January 12, 2007 at 12:05 pm
Typically I don't use a data pump unless I absolutely have to. It's good for some types of data movement, but if it's just a simple field-to-field import with no...
January 12, 2007 at 11:51 am
Work through it in steps.
How do you find the other employees of the same company ? Need to join tblEmployee to itself:
Select e1.EmpID, e2.EmpID As OtherEmployeeID
From tblEmployee As e1
Inner...
January 12, 2007 at 11:25 am
If it's just simple text file import, do you even need DTS ?
Have you tried T-SQL BULK INSERT ? Or BCP from the command line ?
January 12, 2007 at 10:29 am
Viewing 15 posts - 166 through 180 (of 1,347 total)