Viewing 15 posts - 31 through 45 (of 84 total)
Adding to the post by christine.lawrie you can construct the UNION to only add the row if necessary:
SELECT [name], [address], '12345' AS zip
FROM mytable
WHERE [NAME] = 'my_name'
UNION ALL
SELECT TOP...
September 22, 2009 at 2:23 pm
Assuming a one time execution, I would populate a table (tblPicturesToImport_b) with the list of names with paths to import then execute something like the following:
[P]
[font="Courier New"]
DECLARE @sql...
April 16, 2009 at 9:06 am
Gwen,
For next time:
The Access Query Designer will handle your senario. You have to "Add" the tbl_Employees twice and relate one to Attorneys and one to Secretaries. When you...
December 18, 2008 at 6:48 am
You have not given enough information for an exact solution, but here is one approach you might consider:
WITH TeleData (TelecomOpertor, MocCounter, MocTotminutes, MocTotCharge
...
December 12, 2008 at 8:44 am
The problem is in not handling the possibility that there may not be a semi-colon in the part of the clause within the SUBSTRING() function.
WHERE
( CHARINDEX(';', T.DTI_SHORT_LEGAL_DISPLY_TEXT) = 0
OR
LEN(T.DTI_SHORT_LEGAL_DISPLY_TEXT)...
December 10, 2008 at 2:47 pm
I think it was right based on the information you had given up to that point. Nowhere do you mention that you want to update records where there is...
December 10, 2008 at 2:06 pm
You don't need a CASE.
Change your WHERE Clause from:
WHERE
T.DTI_SHORT_LEGAL_DISPLY_TEXT LIKE '%;%'
AND T.DTI_SHORT_LEGAL_DISPLY_TEXT NOT LIKE '%;%;%'
...
December 10, 2008 at 12:32 pm
You would have to give me more information, including sample data from the related tables. You did not give the value of DTI_SHORT_LEGAL_DISPLY_TEXT.
December 10, 2008 at 8:30 am
--You haven't given much information to work with, but based on your question, the following gives you an idea of what your trigger may look like:
CREATE TRIGGER tr_Title_LastDocumentChangeDate ON Title_LastDocumentChangeDate
...
December 10, 2008 at 8:14 am
I put two records in table tblTest, column aText:
46905730295547
4690573010
For a set-based solution, assuming the value you want to transform is [aText], you could use something like:
SELECT [aText] AS Original
, CASE...
October 21, 2008 at 7:55 am
Basically the same solution that GSquared offered but without using CTE.
SELECT r.[Number]
,f.[text1]
,r.[Name]
,r.[Date]
FROM...
June 4, 2008 at 8:05 am
Another possibility:
UPDATE kipp
SET descr = ISNULL(b.[descr],'') AS [descr]
FROM kipp a
LEFT JOIN(SELECT proj_id, descr
FROM kipp
...
April 21, 2008 at 7:42 am
Here is a revised version of my example that eliminates the need for the stored procedure (SP) to know what SelectedCategories are valid ahead of time. Using this approach,...
February 7, 2008 at 8:26 am
This solution allows you to eliminate the IF's. If the first if condition is not met then the WHERE Clause simply evaluates LastName = LastName. And, likewise for...
February 7, 2008 at 7:45 am
Viewing 15 posts - 31 through 45 (of 84 total)