Viewing 15 posts - 31 through 45 (of 359 total)
if your using SQL Svr 2016 or greater there is a built in spit string function
STRING_SPLIT ( string , separator )
declare @str varchar(500)
set @str ='0107602_000002008823_20150206_1_449589981255609050_20150206__20.26'
select row_number() over...
June 10, 2019 at 12:57 pm
Collation is stored at DB level so when you restore your DB into the new server the collation will remain the same. You could look at altering the collation after...
June 10, 2019 at 12:38 pm
what are you using the why loop for, what conditions? could you not re-write your query using merge instead of having separate insert and update statements?
June 10, 2019 at 12:26 pm
you could look at incorporating isnumeric
declare @a varchar(100) = 'GUDR150305R02'
IF isnumeric(substring('GUDR150305R02',1,1))=0
Print 'T'
Else
Print 'F'
declare @a varchar(100) = 'GUDR150305R02'
select substring('GUDR150305R02',5,6)
IF isnumeric(substring('GUDR150305R02',5,6))=1
Print 'T'
Else
Print 'F'
June 10, 2019 at 9:49 am
oracle has equivalent information_schema
Select * from all_tables
select * from all_views
Select * from all_tab_columns
June 8, 2019 at 12:25 pm
so you cant create a temp table but whoever created this SP can? politics
why not just convert the SP into a select and run your query before you drop the...
June 7, 2019 at 9:32 pm
can you share you SP with us?
i guess your using bulk insert to read from the txt file and insert into a temp table?
what do you want use the data...
June 7, 2019 at 9:04 pm
Have you created or are you creating the stored proc?
Why are you not allowed to use a temp table?
what do you want to do with the results of the query?
If...
June 7, 2019 at 8:57 pm
I find Merge statements are very efficient for upserts (insert,update,delete) operations. could you share with us your execution plan? actual not estimated.
May 24, 2019 at 2:47 pm
nice subject, I use coalesce more than often and its always been very useful
May 16, 2019 at 11:11 am
Try using information_schema.columns instead of sys objects
select * from INFORMATION_SCHEMA.COLUMNS
where COLUMN_NAME in ('COLA','COLB','COLC')
May 8, 2019 at 8:59 pm
why do you want to delete the data but keep the schema? a database without data is just a useless empty box
May 8, 2019 at 8:24 pm
When you say you want to return all the 100's are you sating only return a row if the first 3 values are 100?
so if the data looked like this
100123
100124
101111
199111
200111
would...
May 8, 2019 at 8:21 pm
if this SQL server is part of a vendor application, i would speak with the vendor before applying any patch. Just to ensure you are covered with your support contract...
May 8, 2019 at 8:00 pm
October 12, 2018 at 9:20 am
Viewing 15 posts - 31 through 45 (of 359 total)