Viewing 15 posts - 1,456 through 1,470 (of 3,221 total)
I am asked to extract 3 months worth of data from sql server into a pipe-delimited .txt file with text qualifiers (quotes around the text fields) and with column headers.
Pardon...
February 9, 2011 at 6:22 am
Look up the DATEADD function in Books On Line (BOL).. Now this is a vastly over simplified example"
SELECT DATEADD(mm,-3,GETDATE()) AS '3 months ago', GETDATE() AS 'Current date'
Returns:
3 months ago ...
February 8, 2011 at 4:48 pm
barb0822
To receive tested answers please, please post Table definition(s), some sample data, (you have already posted your T-SQL statement, but not in an easy to use format), and the...
February 8, 2011 at 12:27 pm
A slightly different way, and in most respects equivalent to GSquared's answer
CREATE TABLE #T(ID INT,aNAME VARCHAR(20),PHONE VARCHAR(15))
INSERT INTO #T
SELECT 1,'user1','5555551234' UNION ALL
SELECT 2,'user1','5555552222' UNION ALL
SELECT 3,'user1','1235554444' UNION ALL
SELECT 4,'user2','1234567890' UNION...
February 7, 2011 at 9:10 am
Lowell
take a look at this ms article on using datagrids and paging...maybe that is really what you were looking for?
saeed hg -Think of what your select statement Select *...
February 7, 2011 at 7:17 am
Jeff Moden (2/5/2011)
Steve Jones - SSC Editor (2/4/2011)
February 6, 2011 at 10:26 am
Nasreenm (2/4/2011)
February 4, 2011 at 10:51 am
Here is some code (Originall posted by Jeff Moden and some what modified by myself)
Note that the code uses a temp table, but you can change that by inputting a...
February 4, 2011 at 10:35 am
pankushmehta (2/3/2011)
it is working for me. I have tested it both on SQL 2005 SP3 and SQL 2008 R2. What version are you running it on?
SQL 2005 SP3 and SQL...
February 3, 2011 at 8:07 pm
Try it this way
SP_MSForEachDb 'SELECT table_name from [?].information_schema.tables
where table_name = "table1"'
February 3, 2011 at 7:43 pm
what if I use #temp table, is this will happen the same thing),
No it will not happen - Read this from BOL (Books On Line - the help file for...
February 3, 2011 at 4:17 pm
Is there a way to tell SQL to do this very simply in the ORDER BY clause? I treid DATENAME
Look at this very short article(Author: Jeff Moden), with lots...
February 3, 2011 at 2:51 pm
saeed hg (2/3/2011)
Following are my questions
1-what's the best and fastest way for fill datagridview with 5 million record ...
February 3, 2011 at 2:16 pm
I would try something like this:
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_PADDING ON
GO
CREATE TABLE [dbo].[QScores](
[Id] [int] NOT NULL, --to identify who took the test
...
February 3, 2011 at 1:38 pm
Look at this item as determine if it will the work you require.
It is for SQL 2000 and may have to be modified slightly:
A more efficient ForEach routine
http://www.sqlservercentral.com/scripts/Miscellaneous/30900/
February 3, 2011 at 11:30 am
Viewing 15 posts - 1,456 through 1,470 (of 3,221 total)