Viewing 15 posts - 1,171 through 1,185 (of 5,504 total)
Did you consider using one column per language with the proper collation at the column level?
Or a concept similar to sys.messages, where a language_id is stored to identify the related...
July 30, 2011 at 6:40 am
R. Scott Mobley (7/29/2011)
That said, I still am not clear on how it actually works (don't you just love magic code), but was able to easily modify it to use...
July 30, 2011 at 6:31 am
The FOR XML PATH solution is one way to do it:
SELECT
id,
name,
STUFF(
(SELECT ',' + CAST(t2.marks AS VARCHAR(10))
FROM #temp t2
WHERE t2.id=t1.id
FOR XML PATH('')
),1,1,'') marks
FROM #temp...
July 30, 2011 at 6:20 am
You need to reference both tables:
update table1
set table1.Email = table2.Email
FROM table1 INNER JOIN table2 ON table1.ID = table2.EmpID
July 30, 2011 at 6:09 am
duplicate post. no replies, please.
Already answered here.
July 29, 2011 at 1:34 am
Please have a look at the CrossTab article referenced in my signature. It will show you an easier way than the PIVOT operator...
July 29, 2011 at 1:29 am
The setting of DATEFORMAT might be different than the format sent by the app.
Example: if the dateformat in the database is day/month/year and it's send in month/day/year, you'll get an...
July 29, 2011 at 1:27 am
At a second glance it looks like you're using ACCESS (IIF is not really a SQL Server command...)
With "presentation layer" I referred to Reporting Services, a .NET program or any...
July 28, 2011 at 10:20 am
You could use the UNION ALL approach adding a blank column for the columns without values in each separate query.
But I have to ask: Why do you need to use...
July 27, 2011 at 4:41 pm
Search this site for "DelimitedSplit8k" (Rev 06 is the current version AFAIK).
The following query will return the expected result
SELECT c.name, ID = LTRIM(split.Item)
FROM MULT_VALS c
CROSS APPLY dbo.DelimitedSplit8k(c.IDS,',') split
July 27, 2011 at 4:24 pm
SQLRNNR (7/27/2011)
Or in the worst case, restore a backup of the VM itself (maybe a prior snapshot). You may need to chat with your server administrators for that though.
But...
July 27, 2011 at 3:26 pm
What might help is a list of 3 or 4 INSERT statements for the #CmdShell table that will show the file names you're trying to import.
We could then create files...
July 27, 2011 at 3:03 am
I'm glad you like the two articles.
But here's a disclaimer: I'm not the author. 😉
Those articles are written by Jeff Moden, so the credit belongs to him. 😎
July 25, 2011 at 4:37 pm
Here's the "middle part" that actually needs to be dynamic:
SELECT
'MAX(CASE WHEN pos='
+ CAST(ROW_NUMBER() OVER(partition by periodid, routedirid ORDER BY sequence) AS VARCHAR(10))
+ ' THEN CONVERT(CHAR(5),tt.[time],114) ELSE...
July 25, 2011 at 1:33 pm
Glad I could help 😀
If you have any further questions regarding the dynamic solution, let me know. But give it a try first. If the code goes into production, you'll...
July 25, 2011 at 11:40 am
Viewing 15 posts - 1,171 through 1,185 (of 5,504 total)