Viewing 15 posts - 1,396 through 1,410 (of 2,007 total)
adonetok (11/7/2011)
I need to format datetime as below:01/12/2011 09:28:22 AM
How to code it?
You do not need to format a datetime in SQL, it's a presentation layer task.
If you insist, it...
November 7, 2011 at 8:42 am
rka (11/7/2011)
TransactionID LedgerID Period Amount Paid
1 ...
November 7, 2011 at 8:24 am
Another method: -
--Standard TestEnvironment of 1,000,000 rows of random-ish data
IF object_id('tempdb..#testEnvironment') IS NOT NULL
BEGIN
DROP TABLE #testEnvironment
END
--1,000,000 Random rows of data
SELECT TOP 1000000 IDENTITY(INT,1,1) AS ID,
RAND(CHECKSUM(NEWID())) * 30000 + CAST('1945'...
November 4, 2011 at 11:12 am
whole (11/4/2011)
which gets values like 325,785,5698 as inputs..
now i need to query it against STORES...
November 4, 2011 at 11:02 am
SQLRNNR (11/4/2011)
crookj (11/4/2011)
Daniel Bowlin (11/4/2011)
Revenant (11/3/2011)
SQLRNNR (11/3/2011)
L' Eomot Inversé (11/3/2011)
SQLRNNR (11/3/2011)
Daniel Bowlin (11/3/2011)
Smörgåsbord
Boardwalk
Walkout
Sit-in
Teach-in
1960s ( Does anyone else have the feeling that this decade is going to be a mirror...
November 4, 2011 at 9:46 am
Amy.G (11/2/2011)
November 4, 2011 at 9:37 am
TheSQLGuru (11/4/2011)
November 4, 2011 at 9:10 am
Steve Kinnaman (11/4/2011)
Could you help me with the next issue: I would like the full path in one column AS Path and the document name...
November 4, 2011 at 8:53 am
SQL Kiwi (11/4/2011)
Yes - though it's the explanation of why it depends, what it depends on, and what it means in practice that matters.
GilaMonster (11/4/2011)
November 4, 2011 at 8:49 am
Brandie Tarvin (11/4/2011)
SQL Kiwi (11/4/2011)
So, it dependsSomeone so needs to come up with an interview question where this is the exact answer that's needed.
@=)
Isn't that pretty much every interview question...
November 4, 2011 at 8:43 am
Another way: -
SELECT SUBSTRING([Document_and_path],length-(fromEnd-2),length)
FROM (SELECT CHARINDEX('\',REVERSE([Document_and_path])) AS fromEnd,
LEN([Document_and_path]) AS length, [Document_and_path]
FROM #testEnvironment) a
November 4, 2011 at 8:37 am
Steve Kinnaman (11/4/2011)
November 4, 2011 at 8:19 am
Lowell (11/4/2011)
I may start adding that to some of my posts as well in the future.
Thanks...
November 4, 2011 at 8:12 am
Lowell (11/4/2011)
mikes84 (11/4/2011)[hrLowell,
So are you saying that this type of comparison, row over row (as in the EXCEPT clause and my second example):
Table 1 fields
-------------
Table 2 fields
is usually better than...
November 4, 2011 at 7:58 am
Viewing 15 posts - 1,396 through 1,410 (of 2,007 total)