Viewing 15 posts - 1,891 through 1,905 (of 3,233 total)
I assume that the @FieldName variable contains a column name that you want use in your where clause? You need to use dynamic SQL if that is the case....
February 22, 2008 at 3:04 pm
Yep, you're correct Matt. My bad....cut and paste error:Whistling: .
February 22, 2008 at 1:15 pm
I mean, does wrapping every possible query an application may use into a stored procedure create a serious overhead on the server?
It is actually the opposite. As Adam...
February 22, 2008 at 1:13 pm
It looks like you may have some issues with your table design as well. First off, any time you run a LIKE comparison using the wildcard for the first...
February 22, 2008 at 12:59 pm
This should work for you.....
drop MyNewTable
SELECT IDENTITY(int,1,1) as RowID, t.*
INTO MyNewTable t
FROM top (10)........
If this is in a stored proceudre, I would suggest that you explicitly define the table and...
February 22, 2008 at 12:44 pm
OK, I think I've almost got it. There's still some missing pieces though. You shown us the result set that you are after, but we need to know...
February 22, 2008 at 12:32 pm
Nick,
Just so we're all clear and on the same page, can you post some sample data and give an example of the result set that you would like to...
February 22, 2008 at 9:42 am
Is there a unique index on tbl_Clients_ClientBasicInformation.ClientNumber ? If not, you are leaving yourself with the possibility that your initial SELECT returning multiple rows and your UPDATE not working...
February 21, 2008 at 4:23 pm
David,
It sounds like you want all of the rows, but you only want to display the location for the first location value in each group. Is this correct?...
February 21, 2008 at 3:49 pm
You could create a foreign key constraint between the two tables and enable the delete cascade. As a best practice, I would not recommned going down this route. ...
February 20, 2008 at 4:13 pm
You cannot use the CREATE INDEX syntax with a table variable. For this reason, it is recommended that you use temporary tables (created with the CREATE TABLE # syntax)...
February 20, 2008 at 3:45 pm
Self blocking usually means that the process is waiting is waiting on hardward resources that are currently in use by that process. This usually happens when the process is...
February 19, 2008 at 3:56 pm
Loner,
I would suggest that you should spend some time creating database coding standards that contain best practices and hard-fast rules on how to write effective and efficient database code....
February 19, 2008 at 11:50 am
If you are adding a column with a default value, SQL Server has to update the physical data pages with that value. In order to do that, it will...
February 18, 2008 at 4:10 pm
Yes. All you'll need to do is attach the DB to the instance. You do not need to restart the service. You can do this through the...
February 18, 2008 at 4:06 pm
Viewing 15 posts - 1,891 through 1,905 (of 3,233 total)