Viewing 15 posts - 91 through 105 (of 241 total)
From SQL you can try to use ACE driver. Something like this:
INSERT INTO OPENROWSET('Microsoft.ACE.OLEDB.12.0',
'Text;Database=C:\Temp\;HDR=YES;FMT=CSVDelimited',
'SELECT * FROM [FileName.csv]')
SELECT Field1, Field2, Field3
FROM MyTablePlease note that target file must already...
--Vadim R.
Are we talking about nesting in CASE expression? If so, you can start another CASE after THEN. Something like this:
CASE lineid1
WHEN 'APPROVED'
THEN...
--Vadim R.
Not sure if I got it correctly.... If you know sequence of characters you replacing use REPLACE() function. If you need to replace at certain positions, use STUFF() function.
--Vadim R.
Which aggregate you use is up to you. You need count - use COUNT. You can also use SUM to count things in CASE. Other than that follow the technique...
--Vadim R.
As Ben had shown, you can use Insert...EXEC in the procedure to capture xp_cmdshell output into table. Then parse it in the function.
You can do file manipulation in the external...
--Vadim R.
Sure, if number of columns is unpredictable you'll need dynamic SQL. But inside that dynamic SQL you may implement one of the crosstab techniques. The only other way I can...
--Vadim R.
Here is one way doing this:
SELECT
[COLUMNS] = 'TID',
[2019-01-01] = MIN(CASE WHEN LDate = '20190101' THEN TID END),
[2019-01-03] = MIN(CASE WHEN...
--Vadim R.
Your desired output doesn't seem right. There is no 'user2' in FName column, there is no 'user1' in LName. How come they appear in respecting output rows. It's a crosstab...
--Vadim R.
Also, if I'm not mistaken, default schema is ignored for sysadmins. They always get dbo.
--Vadim R.
I don't think schema will be created in CREATE TABLE even if you grant CREATE SCHEMA permission to the user. You'll need separate statement for that.
--Vadim R.
I attempted to answer today, May 27. Naturally selected #4....
This queston has timing issue. 🙂
--Vadim R.
Viewing 15 posts - 91 through 105 (of 241 total)