Viewing 15 posts - 1,906 through 1,920 (of 3,543 total)
Still not sure what the exact problem is but if you only want unique masters then
SELECT DISTINCT
FILM_PROD_GUIDE.RECNO,
FILM_PROD_GUIDE.ORGANIZATION,
FILM_PROD_GUIDE.CON_FIRST,
FILM_PROD_GUIDE.CON_PFX,
FILM_PROD_GUIDE.CON_LAST,
FILM_PROD_GUIDE.STREET_ONE,
FILM_PROD_GUIDE.CITY,
FILM_PROD_GUIDE.STATE,
FILM_PROD_GUIDE.ZIP,
FILM_PROD_GUIDE.PHONE_DAY
if you include
FILM_SUBCAT_REF.SUBNO...
May 6, 2006 at 2:02 am
I would think a trigger is your best bet regardless of the locks. I do this in one of my databases. You have a logic problem in your trigger, try...
May 5, 2006 at 10:46 am
Do you mean out of sequence as in Type is not ascending for a question?
If so this will list the entries that are out of sequence
SELECT a.*
FROM @table a...
May 5, 2006 at 8:59 am
If you want a single row per FILM_PROD_GUDE then you will have to reduce FILM_CATEGORY and FILM_PROD_GUIDE to single rows as well (using some form of aggregation MIN, MAX etc)
Can you...
May 5, 2006 at 8:34 am
If you can guarantee the format for all records then use a format file containing :-
8.0
5
1 SQLCHAR 0 1 "\"" 0 Unwanted ""
2 SQLCHAR 0 255 "\", \"" 1 Firstname ...
May 4, 2006 at 10:04 am
OK as a function
CREATE FUNCTION dbo.udf_test ()
RETURNS @mytable TABLE (CategoryID int, CategoryName varchar(50), CategoryFather int, HierarchicalLevel int)
BEGIN
DECLARE @temp table (CategoryID int, CategoryFather int, HierarchicalLevel int)
INSERT INTO @temp...
May 3, 2006 at 6:05 am
oooops !!!
just reread first post, wanted a function
May 3, 2006 at 5:04 am
A different approach
CREATE TABLE #temp (CategoryID int, CategoryFather int, HierarchicalLevel int)
INSERT INTO #temp SELECT CategoryID, CategoryFather, 0
FROM
DECLARE @rowcount int
SET @rowcount = 1
WHILE @rowcount > 0
BEGIN
UPDATE...
May 3, 2006 at 5:03 am
SELECT * FROM table1 WHERE Field1 LIKE 'Test '
or
SELECT * FROM table1 WHERE Field1 = 'Test %'
if unknown number of trailing spaces
May 3, 2006 at 4:27 am
DECLARE @sql nvarchar(100)
SET @sql = 'DECLARE c_PromoTransJoin CURSOR FOR SELECT '+@StageTable+'.LEGACY_PATRON_ID FROM '+@StageTable
EXEC(@sql)
OPEN c_PromoTransJoin
...
CLOSE c_PromoTransJoin
DEALLOCATE c_PromoTransJoin
May 3, 2006 at 4:09 am
DECLARE @Today datetime, @TodayLastYear datetime,
@StartThisYear datetime, @StartLastYear datetime,
@StartThisMonth datetime
SET @Today = DATEADD(day,0,DATEDIFF(day,0,GETDATE()))
SET @TodayLastYear = DATEADD(year,-1,@Today)
SET @StartThisYear = DATEADD(year,DATEDIFF(year,0,GETDATE()),0)
SET @StartLastYear = DATEADD(year,-1,@StartThisYear)
SET...
April 28, 2006 at 9:11 am
It is not a matter of duplicates, a sub query in a select can only return one result. Your subquery will always return multiple rows (otherwise why the GROUP BY)...
April 28, 2006 at 7:20 am
bcp cannot optionally detect quotes, it can only process the data if the quotes are always present for the specific columns, so it will not work for your data
as already...
April 28, 2006 at 7:06 am
My first program I wrote was in 1970 ish written in CECIL using simple commands like IN and OUT and did basic...
April 28, 2006 at 6:58 am
LTRIM(STR(ColumnB,20,ColumnA))
April 28, 2006 at 6:43 am
Viewing 15 posts - 1,906 through 1,920 (of 3,543 total)