Viewing 15 posts - 16 through 30 (of 81 total)
declare @cargo int
set @cargo = 5
Select distributorid, distributorname, distributorstatus,distributorcargo
from Dist_Main M inner join Dist_Details D on
M.DistPK = D.DistFK
where distribuborcargo = @cargo
and distributorstatus in ('9', '7','5','1')
You should consider the use of...
May 18, 2009 at 10:26 am
It seems that you performed the backup to 3 devices in place of 1.... U have to specify all them
RESTORE DATABASE AdventureWorks FROM DISK = 'c:\..\backupset1.bak', DISK = 'c:\..\backupset2.bak', DISK=...
May 18, 2009 at 8:52 am
Evidently the columns included in the where clause have different collations, so you must explicitly specify the collation e.g. WHERE column1= column2 COLLATE SQL_LATIN.....
May 18, 2009 at 8:27 am
If all you wanna do is to have a 300 char field containing all the 10 description fields from the legacy table... you just have to do this:
Insert last_table set...
May 15, 2009 at 2:37 pm
Yo can use a stored proc in place of the UDF....
May 15, 2009 at 2:14 pm
cvrupesh (5/13/2009)
I am having a table named item_data where in item and active_date are two columns.
Another table is Error_log where the columns are item,store,tran_date.
I want to update active_date for...
May 15, 2009 at 1:59 pm
Vrachar type removes trailing spaces... you must use the CHAR type
May 15, 2009 at 1:19 pm
A better example using a table-valued function would be
CREATE FUNCTION fn_table_test
(
@filenameString varchar(50)
)
RETURNS
@xmlDataTable TABLE
(myXMLdata XML)
AS
BEGIN
-- code here
INSERT INTO @xmlDataTable
SELECT *
FROM...
May 15, 2009 at 12:05 pm
Your error is not related to the DECLARE statement... the following code is a copy of your's and works fine...
CREATE FUNCTION fn_test
(
@filenameString varchar(50)
)
RETURNS int
AS
BEGIN
DECLARE @xmlDataTable TABLE (myXMLdata XML)
declare...
May 15, 2009 at 11:58 am
You can use a COMPUTE BY to generate subtotals for each subgroup
May 15, 2009 at 9:50 am
Paul S. Huebner (5/15/2009)
1.) I understand (maybe incorrectly) that in a filegroup with multiple...
May 15, 2009 at 9:18 am
I've never heard or read about this.... The ideal case for MSSQLServer is when you have enough memory to fit the whole database... I my modest opinion the windows page...
May 15, 2009 at 9:12 am
Move your server's network cable to another port in the network switch ... if the switch is not failing then You should consider to replace the server's network card...
May 15, 2009 at 9:04 am
I actually don't understand your query well, but without taking a deep look I advice to use INNER JOINS to substitute the IN clauses in your query .... the use...
May 15, 2009 at 8:39 am
RBarryYoung (5/15/2009)
Logical search conditions that get "switched" on and off are not handled well by the query optimizer because it has to come up with one plan that covers...
May 15, 2009 at 8:25 am
Viewing 15 posts - 16 through 30 (of 81 total)