The set of rules that define the combinations of symbols that are considered to be correctly structured for that language.

learn more… | top users | synonyms

0
votes
3answers
42 views

helping hand for sql server resources

I'm just getting into SQL-SERVER, so forgive me if this is a basic question. I need help, recently work on database programming, For my query development, to understand complex query, to can ...
21
votes
3answers
4k views

Performance difference for COALESCE versus ISNULL?

I've seen a lot of people use the COALESCE function in place of ISNULL. From internet searches, I've found that COALESCE is ANSI standard, so there is an advantage that we know what to expect when ...
5
votes
1answer
25k views

How do I declare and use variables in Oracle?

My main skills are with SQL Server, but I have been asked to do some tuning of an Oracle query. I have written the following SQL: declare @startDate int select @startDate = 20110501 And I get this ...
4
votes
3answers
320 views

How can I fix the Oracle syntax of this update by the result of a select in Oracle 10g?

I have a problem with an update statement, that I developed under 11g, when running under 10g. I reduced the problem to: Create table test ( col1 number(10) ); insert into test values (1); ...
5
votes
1answer
353 views

Why can't I call my UDF directly? Why do I need to qualify it 3 levels deep?

I just created a UDF and testing it I found only works when I use this syntax SELECT [PMIS].[dbo].[fnIsReportingTo] (50,1132) I was expecting it to work like this: select * from fnIsReportingTo ...
4
votes
2answers
969 views

SQL Server 2005 : How to use pivot instead of a bunch of case statements?

Please show me how I can modify this SQL select to use pivot instead of all the case statements. SELECT t.ProjectId, COALESCE(MAX(ExecutiveChampion), 'n/a'), ...
13
votes
2answers
976 views

Peculiar Oracle outer join syntax case

I have seen the following in a query that was supposed to be ported from Oracle outer join syntax to SQL standard outer join syntax: SELECT ... FROM A, B, C, D, E WHERE A.A_ID = B.A_ID AND B.B_ID = ...
4
votes
1answer
237 views

Are there tools for SQL-Server helping to add the semicolons?

Earlier versions of SQL-Server didn't recommend the use of semicolons to terminate sql-statements. Beginning with sql-server-2008 examples show, that now Microsoft recommends terminating with ...