Viewing 15 posts - 4,906 through 4,920 (of 7,191 total)
You have more than one value of Cost in Market_Prices_Haulage_Rate for each value of HaulageRate in @tmpOutput - that's what it's saying. Which one do you want to use...
November 28, 2011 at 8:42 am
You just need to qualify your Drawing Number column in the GROUP BY clause by putting the table name in front of it, in the same way as you did...
November 28, 2011 at 4:33 am
Does select * from [sheet name$A6:A6] not work? If not, could you select * from [sheet name$A6:B6] and only use the value in the first column?
John
November 28, 2011 at 3:34 am
Still need DDL, sample data in the form of INSERT statements and expected output. Here's a hint: use GROUP BY in the way that I suggested. If it...
November 28, 2011 at 1:17 am
Having ORDER BY in your view definition does not guarantee that the results will be ordered when you SELECT from the view. The only way you can ensure that...
November 25, 2011 at 8:39 am
Unfortunately I don't have the structure of your tables, nor any of the data in them, so there's not much I can do. As I suggested above, your query...
November 25, 2011 at 8:07 am
Import both files into staging tables in SQL Server, perform a join with MIN and GROUP BY, then export to your new file. Alternatively, if you use SSIS, you...
November 25, 2011 at 6:26 am
You can't have a default expression containing the name of a column, so if a computed column isn't what you're after, I think you can only achieve what you want...
November 25, 2011 at 4:28 am
Is this something you do regularly, or is it just a one-off? Have you considered using COLLATE clauses in your code instead of changing the structure of your database?
John
November 25, 2011 at 1:33 am
I think I saw Paul Randal blog about this a while ago. He may have been writing about the undocumented (I think) DBCC PAGE. Anyway, a well targeted...
November 24, 2011 at 8:14 am
Ted
In the event of a crash, what is the largest amount of data (in days, hours and minutes) that you can afford to lose? Do you need to be...
November 24, 2011 at 6:36 am
Please show us what you've tried so far and we'll see whether we can help with any specific problems you have. We're not here to do your job for...
November 24, 2011 at 4:03 am
Read about DATEPART. Or you can use the MONTH and YEAR functions. Try it out, and post again if there's anything in particular that you don't understand.
John
November 24, 2011 at 3:36 am
Or this, which uses INFORMATION_SCHEMA.COLUMNS, so that no joins or subqueries are necessary. Also adds supports for text and varchar(max) data types, nullability, and table schemas. The syntax...
November 24, 2011 at 2:03 am
You just need to declare @sql as nvarchar(max).
John
November 23, 2011 at 8:28 am
Viewing 15 posts - 4,906 through 4,920 (of 7,191 total)