Viewing 15 posts - 8,356 through 8,370 (of 26,490 total)
The following works, but in GRID mode you won't see it and in TEXT mode they won't line up under the Cities column.
Create TABLE #tempCityState (State Varchar(5), City Varchar(50))
Insert Into...
March 22, 2013 at 10:18 am
Do you report to this new director or do you report to someone else? If someone else, you should be talking to that person not us. If you...
March 22, 2013 at 9:38 am
Quick question, A, B, C are in the parent table; app passes in A, B, D do you still want to insert A, B and ignore D since A and...
March 22, 2013 at 9:00 am
Mark-101232 (3/22/2013)
Maybe this?
Select Distinct State, (Select Stuff((Select '' + City
From #tempCityState
Where State = t.State
FOR Xml Path(''),TYPE).value('.','VARCHAR(1000)'),1,1,'')) AS Cities
From #tempCityState t
Yes, this is what I was going to suggest as well.
March 22, 2013 at 8:44 am
Are these native backups? What edition of SQL Server are you running? Are you using, if available, compressed backups? Where are you backing up your databases, local,...
March 22, 2013 at 8:41 am
Megha P (3/22/2013)
you can also try below
;WITH CTE AS
(
SELECT docid,pages FROM #x
UNION ALL
SELECT C.docid,C.pages-1
FROM #x X INNER JOIN CTE C
ON X.docid = C.docid
AND C.pages-1...
March 22, 2013 at 7:47 am
This should help you get started. Please note how I created a table and populated that table with sample data. This is what you need to provide in...
March 21, 2013 at 10:49 pm
This works also:
DECLARE @test1 TABLE (Field1 varchar(1), Field2 int);
INSERT INTO @test1
SELECT 'A',1 UNION
SELECT 'B',2 UNION
SELECT 'C',3 ;
DECLARE @Test2 TABLE (Field1 varchar(1), Field2 int);
INSERT INTO @Test2
SELECT 'B',2 UNION
SELECT 'C',3 ;
select...
March 21, 2013 at 9:41 pm
You could build a tally table in your database an use it directly, or you could use the following as a start for building a dynamic tally table when needed...
March 21, 2013 at 3:42 pm
Check out sys.index_columns.
March 21, 2013 at 3:26 pm
Try this bcp command. I moved the name of the database to the -d switch:
bcp "exec dbo.Rpt_JobTransactionsSp 'SRMQDIC','ROD','B','HNS','0','B',
null,null,null,null,'000','9999','1/1/2013','3/17/2013',null,null,null,null,null
,null,null,null,'T',null,null,'1','0','1033'" Queryout "c:\temp\query.txt" -T -d PHIL_App
-c -t^| -Sphlsqlsl01
March 21, 2013 at 3:24 pm
Look at the EXCEPT operator. You need to be able to generate both results sets in order to compare them.
March 21, 2013 at 3:18 pm
John Hanrahan (3/21/2013)
March 21, 2013 at 3:02 pm
Viewing 15 posts - 8,356 through 8,370 (of 26,490 total)