Viewing 15 posts - 76 through 90 (of 314 total)
I think the reason is #temp table. Temp tables are created in tempdb not in the user db(with a long Name ..eg :#temp_______________6788) and when ur query tried to look for...
October 11, 2006 at 6:24 pm
1. Your parameters that u are using does not match what's being passed (Eg:@unit and @xUnit).
2. There is No Select in yout SQL.
SELECT @sql ='o.[Full Name] ,o.Unit,o.[Unit Desc]...
October 11, 2006 at 6:07 pm
If all the Columns are Dupe, then u can do this.
SELECT Surname, Forename, NameOrderIndicator, MiddleNames,DateOfBirth,
Gender,FormerSurname, PreferredForname,
Ethnicity, DateSent, COUNT (*) as Cts
into #tmp
FROM dbo.Import_Changes_FULL
WHERE DateSent = '2006-09-29 00:00:00.000'
GROUP BY Surname,...
October 4, 2006 at 8:55 am
why are u trying to do a truncate on a table that has references? How about delete (that is after deleting the data in the Child table) and then reload...
October 2, 2006 at 2:54 pm
Create a view using this code and u can do select on the view.
Select Table1.Session_ID,Table1.Session_Name,Table1.LogUserType_ID,Table1.SystemUserID,Table2.[User_Name],
Table1.Buyer_ID,Table3.BuyerName,
Table1.Supplier_ID,Table4.Supplier_Name,
Table1.IPAddress
from Table1 LEFT OUTER JOIN Table2 ON Table1.SystemUserID = Table2.SystemUser_ID
LEFT OUTER JOIN Table3 ON Table1.Buyer_ID =...
October 2, 2006 at 2:50 pm
Looks like ur login doesnot have access to the default database associated with your account.
Try this
sp_grantdbaccess @loginame ='DomainName\UserName',@name_in_db ='UserName'
October 2, 2006 at 10:35 am
I didn't realise that ) was repalced with smily face. These should be plain text box without emiticons.
September 28, 2006 at 2:24 pm
Why would u update a column thats used in the JOIN?
UPDATE DB1.dbo.t1 SET col1=temp.col1, ....
INNER JOIN
DB1.dbo.T1 perm
ON temp.col1 = perm.col1
Like Sergiy said "Understand some basic educational things about relational databases".Please...
September 28, 2006 at 2:22 pm
In future the way to avoid this would be use "Distribution List" so that all the DL's can be maintained on the mail server and you don't have to modify...
September 28, 2006 at 2:13 pm
Are you trying to update option table or Provinces table. Cos ur statement is trying to update a column in "Provision" table while ur update statement says "Update Option" table.
September 28, 2006 at 10:32 am
Mita,
I hope this is what u wanted. Please let me know if this is not right.
Select Providerdate,Region,DHB,DHBName,PHO,PHOName,Practice,Practicename,
PracticeAddress,Practice_Startdate,Practice_Enddate,Practice_Test.Practitioner,
PractitionerName,Practice_Test.Practitioner_Startdate,Practitioner_Enddate
,YCount,NCount
from Practice_Test INNER JOIN
(
Select Practitioner, sum(Case when Upper(Locum) ='YES' Then 1 Else 0 End)...
September 27, 2006 at 4:01 pm
Try This:
Select tableName.Col1,tableName.Col2,tableName.Col3,... from (
SELECT convert(varchar, datepart(dd, s.dtDate)) 'vDay' ....,datepart(dd, s.dtDate) as Dy FROM Schedule as S
UNION
SELECT convert(varchar, datepart(dd, h.dtDate)) 'vDay' ....,datepart(dd, H.dtDate) as Dy FROM Holidays as H) tableName
Order...
September 27, 2006 at 1:05 pm
Can u give us specific examples cos that would convey what u want done.
Thanks
Sreejith
September 27, 2006 at 11:45 am
why can't u use the post by NPeeters. Thats how u should be doing."Holidays" vary by divsion by company by location. So...
September 27, 2006 at 11:39 am
The reason is when u copied the Databases over the logins that have rights on the databases got copied over. But the "sid" for the logins that were created on...
September 27, 2006 at 11:35 am
Viewing 15 posts - 76 through 90 (of 314 total)