Viewing 15 posts - 61 through 75 (of 78 total)
I believe you can create a new table for each file to be loaded. As long as you are running as the dbo, the table should be owned by the...
September 4, 2004 at 9:36 am
1. If you are using an ADO Connection and Recordset from the web side, you can use the PageSize and AbsolutePage properties. Refer to MSDN Library at:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/ado270/htm/mdpropagesize.asp
Here's the description...
September 4, 2004 at 8:17 am
If your db column name is a date-field named: birth_dt, then this should work:
SELECT birth_dt,
DATEADD('yyyy',21,birth_dt) AS birthday_21,
CASE WHEN getdate() >= DATEADD('yyyy',21,birth_dt)
THEN '21 or over'
ELSE 'Under 21'
...
September 4, 2004 at 7:47 am
This is a very interesting question. In order to access a text file directly from SQL Server, you first need to create a schema.ini file that describes the data in...
August 23, 2004 at 9:22 am
1. When you say "table is empty", I think you mean that the WHERE condition returns 0 rows. If so, then this is an easy way to do that logic:
...
August 23, 2004 at 7:31 am
Hello Paul,
1. Referencing the Date Conversion documention from MSDN:
Style Number / Standard / Input/Output
20 or 120 (*) / ODBC canonical / yyyy-mm-dd hh:mi:ss(24h)
(*) The default values (including...
August 19, 2004 at 9:55 am
Try this. Note that there are two levels of parentheses. Working outward from the inner-most pair:
- First you union the days to get the table [all_shifts].
-Then you cartesian-join table...
August 17, 2004 at 9:39 am
This might do it for you:
1. Create a master list of order-number-type-lines:
CREATE TABLE orderLines (
order_number INT
order_type VARCHAR(10)
line_number INT
all_refs VARCHAR(255) )
INSERT INTO orderLines
SELECT DISTINCT order_number, order_type, line_number, ""
FROM acknowledgements
2. Append all the references:
UPDATE orderLines
SET...
August 13, 2004 at 12:16 pm
First: Do you have a table of all trucks? That will make one of the steps below much more efficient.
Table tripinformation:
- shift_date
- shift_num
- truck
- km
- time
Table alldays
- date
- datetype
Table trucks...
August 11, 2004 at 9:46 am
Hello williamhoos,
A quite good generic stored procedure is at this URL:
http://www.johnmacintyre.ca/%5Ccodespct.asp
Here is the complete code, with a slight annotation on my part:
/************************************************************
sp_JRMCrossTab - Dynamically creates a crosstab / pivot...
July 23, 2004 at 8:44 am
Here are two ideas for you -- neither one uses a NOT IN subquery:
IDEA #1:
Select P.PariticipantID from
tblParticipant P
WHERE P.PariticipantID IN (
SELECT D.ParticipantID FROM tblDonorMailFlag D
WHER ((D.MailPeriodCode = 'AUG' and...
July 19, 2004 at 3:09 pm
It sounds like your Access MDB has tables only in it. If so, you can use the Upsize Wizard to convert the data tables from ACCESS 2000 to MSDE 2000. ...
July 19, 2004 at 2:45 pm
It sounds like your Access MDB has tables only in it. If so, you can use the Upsize Wizard to convert the data tables from ACCESS 2000 to MSDE 2000. Then,...
July 15, 2004 at 12:03 pm
If the flag/value fields could change, then add the flag/value condition to the UPDATE statement:
declare @batchno int, @detailno int
SELECT TOP 1 @batchno = d.batchno, @detailno = detailno
FROM detail AS d
INNER JOIN...
July 15, 2004 at 7:38 am
Assuming your table is named: table_reports, this SQL should insert into each other user_id the report_names in A's list that are not already in the other user_id's list:
INSERT INTO table_reports
SELECT...
July 13, 2004 at 8:45 am
Viewing 15 posts - 61 through 75 (of 78 total)