Click here to Skip to main content
15,920,110 members
Home / Discussions / Database
   

Database

 
AnswerRe: How Can I Join more than two tables in SQL Pin
Colin Angus Mackay24-Jun-04 22:03
Colin Angus Mackay24-Jun-04 22:03 
AnswerRe: How Can I Join more than two tables in SQL Pin
wgdesigner25-Jun-04 1:38
wgdesigner25-Jun-04 1:38 
GeneralConcurrency Pin
IamADotNetGuy24-Jun-04 10:04
IamADotNetGuy24-Jun-04 10:04 
GeneralRe: Concurrency Pin
Rein Hillmann26-Jun-04 22:13
Rein Hillmann26-Jun-04 22:13 
GeneralRe: Concurrency Pin
Grimolfr28-Jun-04 7:56
Grimolfr28-Jun-04 7:56 
GeneralRe: Concurrency Pin
IamADotNetGuy28-Jun-04 8:07
IamADotNetGuy28-Jun-04 8:07 
GeneralSQL Query Pin
Guinness4Strength24-Jun-04 9:39
Guinness4Strength24-Jun-04 9:39 
GeneralRe: SQL Query Pin
Michael Potter25-Jun-04 3:32
Michael Potter25-Jun-04 3:32 
Couple of Answers:
1) Create a stored proc and debug it. You debug buy r-clicking on the stored proc in anaylzer and chosing debug. Just destroy the SP if you don't need it.

2) I believe that creating dates from strings is dependent upon SQL Server localization settings. What I answer here may not work exactly the same on your setup.

I have created a UDF to handle the removal (set to 12am) of time information from a DATETIME. \

CREATE FUNCTION DateOnly
(
     @Test_DT DATETIME
)
RETURNS DATETIME
AS
BEGIN
     DECLARE @tmp DATETIME
     SET @tmp = CAST(CONVERT(VARCHAR(20),@Test_DT,101) AS DATETIME)
     RETURN @tmp
END

Given this function installed in your database, your query would look like this:
DECLARE @Yesterday DATETIME
SET @Yesterday = DATEADD(d,-1,dbo.DateOnly(GETDATE()))
SELECT * FROM Document WHERE ProcessDate = @Yeseterday

My SQL installation is set for American style dates. This may not work unchanged in your system. Check out the options in the CONVERT() function in Books-On-Line for what will work best in your locality.
Generalproblem: records appear twice in dataset Pin
sharonz24-Jun-04 6:30
sharonz24-Jun-04 6:30 
GeneralRe: problem: records appear twice in dataset Pin
IamADotNetGuy28-Jun-04 10:43
IamADotNetGuy28-Jun-04 10:43 
GeneralVery easy question Pin
Guinness4Strength24-Jun-04 5:57
Guinness4Strength24-Jun-04 5:57 
GeneralRe: Very easy question Pin
Colin Angus Mackay24-Jun-04 6:14
Colin Angus Mackay24-Jun-04 6:14 
GeneralRe: Very easy question Pin
Guinness4Strength24-Jun-04 6:29
Guinness4Strength24-Jun-04 6:29 
GeneralRe: Very easy question Pin
Steven Campbell24-Jun-04 7:23
Steven Campbell24-Jun-04 7:23 
GeneralRe: Very easy question Pin
Snorri Kristjansson27-Jun-04 22:46
professionalSnorri Kristjansson27-Jun-04 22:46 
GeneralRe: Very easy question Pin
Grimolfr28-Jun-04 8:10
Grimolfr28-Jun-04 8:10 
Generaldatabase Error Pin
Anonymous24-Jun-04 0:50
Anonymous24-Jun-04 0:50 
Generaldouble click on the row of datagrid and retrieve the data from the SQL server Pin
viviansm23-Jun-04 20:47
viviansm23-Jun-04 20:47 
GeneralACCESS please Pin
Anonymous23-Jun-04 15:59
Anonymous23-Jun-04 15:59 
GeneralAdd a semi-colon (;) to the end of my select statement Pin
inyoursadachine23-Jun-04 11:17
inyoursadachine23-Jun-04 11:17 
GeneralRe: Add a semi-colon (;) to the end of my select statement Pin
VenkatFor.NET24-Jun-04 3:48
VenkatFor.NET24-Jun-04 3:48 
GeneralRe: tell me some idea Pin
Christian Graus23-Jun-04 16:50
protectorChristian Graus23-Jun-04 16:50 
GeneralRe: tell me some idea Pin
Christian Graus24-Jun-04 12:43
protectorChristian Graus24-Jun-04 12:43 
GeneralRe: tell me some idea Pin
Dave Kreskowiak25-Jun-04 7:43
mveDave Kreskowiak25-Jun-04 7:43 
GeneralRe: tell me some idea Pin
Dave Kreskowiak25-Jun-04 7:45
mveDave Kreskowiak25-Jun-04 7:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.