Viewing 15 posts - 18,751 through 18,765 (of 18,926 total)
Here's an emxemple :
Select col1, col2
FROM dbo.[Bon de travail] INNER JOIN
...
December 16, 2004 at 12:22 pm
This is the part that does it :
(SELECT TOP 1 [Start Date] FROM dbo.YourTable P2
WHERE P2.Equipment_No = PMain.Equipment_No AND P2.[Start Date] > PMain.[Start Date] ORDER BY [Start Date])
This...
December 16, 2004 at 8:10 am
Use master
GO
CREATE TABLE [NullsPourcentage] (
[PkNullPourcentage] [int] IDENTITY (1, 1) NOT NULL ,
[DBName] [varchar] (128) COLLATE French_CI_AS NOT NULL ,
[TableName] [varchar] (258) COLLATE French_CI_AS NOT NULL ,
[ColName] [varchar] (256) COLLATE French_CI_AS...
December 16, 2004 at 8:05 am
Here's an example from my Punch table
SELECT FkEmploye, DateDebut, DATEDIFF(hh, DateDebut,
...
December 15, 2004 at 2:45 pm
All my method does is generate new random numbers everytime the query is run. But if you run this query as a subquery then it is run 1 time...
December 15, 2004 at 1:03 pm
Wouldn't this be simpler (assuming each combinaison is unique)?
Select UserID from MyTable where RoleID in (1, 2, 3) Group by UserID having count(*) = 3
December 15, 2004 at 8:07 am
Just a variation on mkeast's answer (so you get all tables) :
SELECT O.Name, Sum(C.length) as MaxDataBytes
FROM dbo.sysobjects O JOIN dbo.syscolumns C ON O.id = C.id
where O.XType = 'U' and...
December 15, 2004 at 6:36 am
I don't have a script that does that. But one thing you could do if this is a one time shot is to script out the table in QA....
December 14, 2004 at 2:56 pm
Here's an idea...
CREATE TABLE [Numbers] (
[PkNumber] [int] IDENTITY (1, 1) NOT NULL ,
CONSTRAINT [Pk_Number] PRIMARY KEY CLUSTERED
(
[PkNumber]
) ON [PRIMARY]
) ON [PRIMARY]
GO
Declare @i as int
set @i = 0
while @i < 8000...
December 14, 2004 at 1:52 pm
David, this is extactly why I am wondering about the strings. I have a search sp that can be ordered by pretty much any field and always asc or...
December 14, 2004 at 8:04 am
Nice shortcut. Is there a similar trick to sort dates and strings dynamically?
December 14, 2004 at 7:11 am
Then you can tweek the first query I posted, it should give you what you need.
December 13, 2004 at 1:53 pm
That's not possible. A column name must be unique to a table.
The code I gave you scans ALL the columns from all the tables for duplicate field name (excluding...
December 13, 2004 at 12:12 pm
Hmm. Why exactly do you need to do this?? I'm currently rebuilding an application and every single little structure modification takes hours/weeks to implement. Something like this that...
December 13, 2004 at 11:20 am
Holds true for all objects Frank... But even more for RecordSets.
December 13, 2004 at 7:14 am
Viewing 15 posts - 18,751 through 18,765 (of 18,926 total)