Viewing 15 posts - 9,001 through 9,015 (of 9,641 total)
Steve Jones - Editor (3/15/2008)
I've added this to the list. turns out to be a switch 🙂
Sounds like good data-driven design to me:P
March 15, 2008 at 10:31 am
Adam Haines (3/15/2008)
Addtionally, this site has a...
March 15, 2008 at 10:29 am
Are you storing the sequence number, or is this for returning the data?
For querying the data you could use the row_number() function.
Select
ROW_NUMBER() Over (Partition By...
March 15, 2008 at 10:21 am
Here are a couple of options I think will work, but I can't guarantee anything without seeing the table schemas and some sample data.
/*this uses a CTE and is SQL2005...
March 15, 2008 at 10:06 am
One way you could do it something like this:
With DayOfWeek As
(
Select
DateName(DW, date) as DayOfWeek,
date
From
...
March 15, 2008 at 9:45 am
Adam,
I considered suggesting a default value as well, but, especially with numeric data, I prefer to leave null than to put in 0 as they really do mean different things...
March 15, 2008 at 5:33 am
Just for informational purposes what is the response of the query if you return rows where column4 is not null?
I am going to guess that the query optimizer is not...
March 14, 2008 at 9:20 pm
I think you are misunderstanding how a linked server works. A linked server is designed to allow you to query another data source from within the context of an...
March 14, 2008 at 1:17 pm
Option 3 is okay for what you want to do. The only issue, and this is true of any dynamic SQL, is that you need to beware of and...
March 14, 2008 at 12:43 pm
I think the problem is that the application is trying to connect to a db named testserver.testdb on the local server and that db does not exist on that server....
March 14, 2008 at 12:26 pm
IN does not play well with variables. When you use variable for your list Sql sees it as 1 value not the list you expect.
March 14, 2008 at 12:12 pm
Hugo Kornelis (3/14/2008)
March 14, 2008 at 7:31 am
Now you need to create a login on your server for your domain account and on the linked server with rights to whatever you are trying to access. Then...
March 13, 2008 at 7:06 pm
In your example you are assuming that the PK field is incrementing by 1 and when you have data like in the example that cannot be guaranteed. The CTE...
March 13, 2008 at 10:27 am
Viewing 15 posts - 9,001 through 9,015 (of 9,641 total)