Viewing 15 posts - 10,936 through 10,950 (of 13,459 total)
i think Carolyn's right; for reference, this is the exact syntax i use to connect to an access database; if the last command, sp_tables_ex works, you are set up correctly,...
Lowell
June 23, 2009 at 10:27 am
kiranjanga2 (6/23/2009)
error is below.(EXECUTE cannot be used as a source when inserting into a table variable.)
there's your error. change your table variable to a temp table instead.
looks like the lines...
Lowell
June 23, 2009 at 9:24 am
the REPLACE command is what you want:
SELECt Replace(columnname,' ','') As Columname from YourTable
it might be hard to see, but the command is singlequote-space-singlequote for WHAT to replace, and is two...
Lowell
June 23, 2009 at 6:25 am
Tom i don't think noncode is a valid descriptor; i think you need to use plain or text.
i saved this from a post previously so i had the valid tags...
Lowell
June 23, 2009 at 6:06 am
pradeep's suggestion for a trigger to uppercase the input would work, and you could force only the upper case values to be inserted with a slightly different constraint:
Create table Patient...
Lowell
June 20, 2009 at 11:28 am
lakshminarasimhanv (6/20/2009)
Can you please tell me how to modify the script to delete records from master and check if any dependent child will be afftected....
Lowell
June 20, 2009 at 9:04 am
that would be the easy part; since the temp table #Hierarchy has the tables in the right order, change the last SELECT statement to this:
SELECT
CASE WHEN FKLevel=0...
Lowell
June 20, 2009 at 6:28 am
you must explicitly identify the column names, especial when identity_insert is on:
SET IDENTITY_INSERT MyTable ON
insert into MyTable(ColumnId,ColumnDate) values(3508,'06/07/2009')
zubamark (6/19/2009)
I tried to execute in SQL Server 2005 Query Analyzer the following...
Lowell
June 19, 2009 at 10:34 am
something like this should get you started:
SELECT
@Category As TheSelectedCategory,
CASE
WHEN ILCategory IN (3,4) AND SCCategory =1
THEN...
Lowell
June 19, 2009 at 10:06 am
here's a script that creates the delete/truncate commands for all tables in the correct foreign key hierarchy order....
the issue I've always found is that often you have lookup tables, like...
Lowell
June 19, 2009 at 8:50 am
Ok - but the problem is, sometimes the parent_id could change from another system. That's where I'm getting lost here. I'm trying to avoid using the parent_id as an identity....
Lowell
June 19, 2009 at 8:45 am
you wouldn't open a trace file directly with notepad.
here's what i do:
i create a view for any trace i create, so I can easily access it.
here's a code example:
--review all...
Lowell
June 19, 2009 at 8:34 am
Dugi's got you on the right track. use ISNULL to put in a default value, or raise an error before it gets to the trigger in the first place.
as...
Lowell
June 19, 2009 at 8:22 am
ps (6/19/2009)
Also wouldn't it be good to drop the database if you do not want tables to be there?
Question...
Lowell
June 19, 2009 at 8:17 am
your'e trying to use an identity() column in the wrong way; an identity should simply identify one row as unique, and should never repeat...what you want is basically a ranking...
Lowell
June 19, 2009 at 8:13 am
Viewing 15 posts - 10,936 through 10,950 (of 13,459 total)