Viewing 15 posts - 1,606 through 1,620 (of 3,543 total)
![]() | don't think you can insert rows into a linked server using openquery statement. |
Yes you can
From LnkSrv1
INSERT INTO OPENQUERY(LnkSrv2,'SELECT...
April 12, 2007 at 6:32 am
As the error states, SQL can only restore from tape backups made using SQL BACKUP, your backup was done using NTBACKUP and hence the error.
Use NTBACKUP to restore the backup...
April 12, 2007 at 6:04 am
Yes, the left join is intentional.
I used to find if there was a corresponding entry for the previous/following day with the oposite values. So for the data you posted each...
April 12, 2007 at 2:05 am
This will work on the data given but any other alternative may not
SELECT a.pid,a.dos,a.post,DATEDIFF(day,a.dos,a.post) AS [lag],a.part,SUM(a.volume),SUM(a.charges)
FROM a
LEFT JOIN b
ON b.pid=a.pid
AND b.dos=a.dos
AND...
April 11, 2007 at 10:35 am
btw I agree with Hugo, none of the answers is correct.
I did not answer when I realised this
April 5, 2007 at 6:47 am
Also used by FTS on incremental catalog population.
April 5, 2007 at 6:43 am
One way
SELECT c.[id],c.[name],c.[type],v.[value]
FROM (SELECT [id], 'make' AS [name], [make] AS [value] FROM @veh UNION
SELECT [id], 'model', [model] FROM @veh UNION
SELECT [id], 'color', FROM @veh) v
LEFT...
April 4, 2007 at 8:31 am
Why are you using functions to do simple calculations? Or is there more complex query that you have not given?
You have a logic error in GetItemSoldCount. Whenever you use AND...
April 4, 2007 at 5:11 am
SELECT a.costcodeid,a.costcodedesc,b.combistatus
FROM [coscodetable] a
LEFT JOIN [tallycombi] b
ON b.itemid = a.costcodeid
and b.projectid = '999'
April 3, 2007 at 7:00 am
The last line
ON e.EMPID = x.EMPID and AND l.Verify = 'N'
has too many AND's and Verify should be referencing alies e not l, ie
ON e.EMPID = x.EMPID AND
March 30, 2007 at 8:03 am
Use a CASE statement
SELECT x.EMPID,COALESCE(a.[NAME],'') AS [NAME],
CASE WHEN l.Verify = 'Y' THEN COALESCE(l.LICENSE,'') ELSE '' END AS [LICENSE],COALESCE(l.EMPLSTS,'') AS [EMPLSTS]
FROM (SELECT @EMPID AS [EMPID]) x
LEFT JOIN @HREMP_adp...
March 30, 2007 at 7:41 am
Not sure what your question is but based on your last query
a parameter of '11111' will return
EMPID NAME LICENSE EMPLSTS
11111 ABC NULL NULL
a parameter of '11112' will return
EMPID NAME LICENSE ...
March 29, 2007 at 2:07 am
Replace N'111111' with the parameter, eg @EMPID
Add any further checks to the ON clause of the License JOIN, eg if the test for not expired is EXPIRED = 0
then your...
March 28, 2007 at 9:08 am
Sorry forgot to remove @ I used table variables to test query
Should have been
SELECT x.EMPID,COALESCE(a.[NAME],'') AS [NAME],COALESCE(l.LICENSE,'') AS [LICENSE]
FROM (SELECT N'111111' AS [EMPID]) x
LEFT JOIN HREMP_adp a...
March 28, 2007 at 8:23 am
Didn't you mean
IF NOT EXISTS(select * from information_schema.columns where tablename='programversion' and columnname=@col )
March 28, 2007 at 7:40 am
Viewing 15 posts - 1,606 through 1,620 (of 3,543 total)