Viewing 15 posts - 3,211 through 3,225 (of 13,461 total)
drew how about using patindex to find the first [0-9] match?
this gets us kinda close, i think, except for that "10 SERIES BP MIS MONITOR"
select
patindex('%[0-9]%',drugname )...
June 26, 2013 at 1:46 pm
we can probably help, but not without providing some DDL and sample data that represents the structure and data we need to look at;
if you can convert "customerID, transactionid, transactiontime,...
June 26, 2013 at 11:10 am
do you mean how do you get teh newly created PK values for data you inserted? especially so you can then do a subsequent insert into a child table?
the answer...
June 26, 2013 at 9:40 am
yep that's exactly correct. you end up doing a GRANT INSERT ON dbo.ServerLogonHistory TO public in the AuditDb; that way your trigger does not run into permissions issues when...
June 26, 2013 at 8:50 am
the absolute best way is via a programming language.
you'd need to first establish some sort of relationship to the data...that is, you know that C:\AutoCad\drawing_424.tif
is related to a specific record...
June 26, 2013 at 8:47 am
you'll run into permissions problems accessing, say 10 databases in a single query;
the calling user would need at least read permissions in every single database for the specific table(s) involved..
i...
June 26, 2013 at 8:29 am
kapil_kk (6/26/2013)
But Lowell when we do a backup and restore on another server then I faced problems related to collations. what to do in this scenario?
collation differences can be a...
June 26, 2013 at 8:03 am
can you change this:
EXEC(@finalquery)
to this, and paste the results after running the procedure?
PRINT @finalquery
EXEC(@finalquery)
also, is there any reason you are rrunning it twice in the same proc?
EXEC(@finalquery)
EXEC sp_executesql @finalquery
June 26, 2013 at 7:53 am
wak_no1 (6/26/2013)
If I run the SP unaltered, it outputs a neat looking script, is there no way I can simply backup the output, without having to amend the SP and...
June 26, 2013 at 7:46 am
also, this looks incorrect to me, there's commas, double commas but no values:
'AND (@Part_Type_MP = ,, OR (CHARINDEX(, + CAST(P.Part_Type as VARCHAR(50)) + ,, @Part_Type_MP) >0))'
is it the single quotes...
June 26, 2013 at 7:38 am
well, syntax wise, it's fine for SQL2008; i was able to create it without a problem.
on a SQL2005 or compatibility 90 database, i get an error because SQL2005 did not...
June 26, 2013 at 7:33 am
i would do a backup and restore as -a-new-database name so both sources are on a single instance, and then review the differences for either specific insert/update/delete, or a MERGE...
June 26, 2013 at 7:10 am
mister magoo i have a kinda-sorta solution i use for that issue; instead of a drag and drop, i have a keyboard shortcut in SSMS that i call on any...
June 26, 2013 at 6:19 am
psingla (6/26/2013)
if (select TOp 1 UNITE_COUT_MATERIEL from DIM_INTER_MATERIEL)= 'Unité'
or
if exists (select 1 from DIM_INTER_MATERIEL where UNITE_COUT_MATERIEL = 'Unité')
both the above query will work in your case.
sub query...
June 26, 2013 at 5:56 am
if you know the shape of the data being output from the procedure, you can insert it directly into a table;
for example, if your proc returns a single column table...
June 26, 2013 at 5:52 am
Viewing 15 posts - 3,211 through 3,225 (of 13,461 total)