Viewing 15 posts - 16 through 30 (of 136 total)
Thanks for the compliments. I like it when people find my posts helpful.
Rob
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
January 15, 2010 at 9:24 pm
It's "Arun" and "Rob". You're reading the forum status (like yours is "Forum Newbie")
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
December 23, 2009 at 10:16 pm
I assume you have columns called Date and Amount in each of your tables dbo.hardware and dbo.accessories...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
December 23, 2009 at 9:55 pm
Get rid of your apostrophes. It thinks you're talking about the string 'MonthYear', not the column within your query.
SELECT MonthYear....
FROM
(
SELECT ... AS MonthYear, ...
)...
GROUP BY MonthYear
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
December 23, 2009 at 9:33 pm
Tim,
Exactly!
Suppose the case of my friend, who is born on May 11th, 1993. On their 18th birthday, the system using 365.25 will declare them still 17 - which can get...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
March 15, 2009 at 7:36 pm
GSquared, you're welcome. Hope that method works for you (YYYYMMDD).
Rob
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
March 13, 2009 at 11:39 pm
Mine is just looking at the principle of:
Suppose your birthday is 19490713. Suppose today is 20090313.
Subtract one from the other, and you get:
20090313-19490713 = 599600
Divide by 1000 to see that...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
March 13, 2009 at 12:25 am
Can I suggest an alternative?
Convert the strings into a number in the format YYYYMMDD (as you would for a data warehouse), and then just subtract one from the other. Strip...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
March 12, 2009 at 9:56 pm
Yes, it's faster. It doesn't need to loop through the data multiple times to find out which rows exist and therefore need updating, and which ones don't and therefore need...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
March 19, 2008 at 7:34 pm
It's really simple - check out Books Online
http://msdn2.microsoft.com/en-us/library/bb933952(SQL.100).aspx
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
January 7, 2008 at 6:21 am
Can I do a quick plug for the new Spatial types in SQL2008 here? You can use them to find the distance between two points quite easily.
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
January 7, 2008 at 3:41 am
If you actually want to have a query which returns the number of days between days, then I suggest you use something like:
with l as
(select *, row_number() over (partition by...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
October 24, 2007 at 6:36 am
Greg,
Can you connect to that same server from your client using Enterprise Manager? That error may suggest that the installation of SQL Server may not be letting anyone connect to...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
September 24, 2007 at 5:09 pm
Yes Leo, that's correct.
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
September 10, 2007 at 9:38 pm
But why use XML to pass data in, when SQL2008 gives you Table-Value Parameters?
(I do love Merge - I spoke on it last month at the UG I run, and...
Rob Farley
LobsterPot Solutions & Adelaide SQL Server User Group
Company: http://www.lobsterpot.com.au
Blog: http://blogs.lobsterpot.com.au
September 10, 2007 at 9:19 pm
Viewing 15 posts - 16 through 30 (of 136 total)