I investigated the date field and found an unexpected value. It might be the cause, because when I created a new table with correct dates, the Year function worked. This incorrect value is the result of incorrect input for many rows, such as:
Empty values
Only hours and minutes
Thank you all...
First Query
SELECT Year([MyDate]) AS YearfromDate
FROM TransactionTable;
Second Query
SELECT Query1.YearfromDate
FROM Query1
GROUP BY Query1.YearfromDate;
Why does this error appear
Invalid procedure call
When run query 2
and what is the solution
Thank you so much
SELECT
[city],
[HR],
[IT]
FROM (
SELECT
[city],
[department],
sum([salary]) as Salary
FROM dbo.emp
GROUP BY [city],[department]
) AS myData
PIVOT (
sum(myData.[Salary])
FOR myData.department IN ([HR], [IT])
) AS mypivot
the result (y)
Hello
SQL SERVER not access
Table Structure
/
employee name
Department
Salary
City
the table will be full of data
------------------------------
Pivot Table Result will be like this:
department Alabama Arkansas Georgia
IT 100000...
Here is the last edit
after editing
Sub Macro3465656565665465()
' Add Power Query to the MyTable table in the MyDatabase sheet
Dim powerQuery As Object
Set powerQuery = Application.Workbooks(ActiveWorkbook.Name).Sheets("MyDatabase").ListObjects("MyTable").QueryTable...
Here is the macro convert Power Query To Table
Here is the Problem
Need to append to existing Table
Sub Macro3465656565665465()
'
' Macro3465656565665465 Macro
'
'
With ActiveSheet.ListObjects.Add(SourceType:=0, Source:= _
"OLEDB;Provider=Microsoft.Mashup.OleDb.1;Data...
based on this table
this is not dynamic storage (variable)
1-9 storage 5 bytes not affected by increasing or decreasing the number
is this correct?
@Minty
second question:
Here is the SQL Code
I know I can create sequences by using SQL Code
but I love using GUI Table Design
my question is
How can I build sequence in design time
(not the IDENTITY )
CREATE TABLE [MyTable]
(
[ID] [bigint] PRIMARY KEY NOT NULL DEFAULT (NEXT VALUE FOR...