I am new to postgres and I am working on an assignment of mine. I had to create a table with only 1 column and, then I was given this statement to run in on pgadmin III: when I run this I get this error: syntax error at or near “IF” I have already take a look at this 38.6.2.
How to Display student attendance in gridview using SQL and Gridview
I am using SQL Server 2012 and VS 2012 C# I have designed database table Roll_No, Attend_Date, Attend_Status while storing data i store like this But I have to show in grid-view like this Can you Help me please… How can I achieve this result.. Answer You can do this by listing each date as column name w…
Import data from Excel Wizard automatically detects data types
Hello I’m trying to import data from excel file (xls) to new SQL table so I use Import and Export data 32/bit to achieve that. When I load the excel file it automatically detects data types of columns. e.g. column with phone numbers is as data type to new table float and in excel is as Double(15) when I…
MySQL not showing databases created in phpMyAdmin
I’m trying to build a database for my server in phpmyadmin but when I finish building it I can’t access it using PHP and it won’t show when I list the databases in MySQL. But when I create a database in mySql it shows up in phpmyadmin. Also I’m running phpmyadmin version 4.0.3, and the…
How to execute SELECT * LIKE statement with a placeholder in sqlite?
I’ve got an argument tag and I perfomed this way: cursor.execute(“SELECT * FROM posts WHERE tags LIKE ‘%?%’”, (tag,)) but it doesn’t seem to work. I’m new to sqlite, please tell me how to fix it. …
Stored Procedure Return Type Can Not Be Detected
I am trying to drag this procedure over to the dbml in VS 2012 and I am getting the return type cannot be detected message. I have tried these: LINQ to SQL – Stored Procedure Return Type Error The …
SQL Server: how to find closest location?
I have two tables, Houses and Stores. Both have Latitude and Longitude fields. I need to make a view that would return for each record in Houses HouseId and StoreId, where StoreId is the ID of the …
How to calculate running total (month to date) in SQL Server 2008
I’m trying to calculate a month-to-date total using SQL Server 2008. I’m trying to generate a month-to-date count at the level of activities and representatives. Here are the results I want to generate: From the following tables: ACTIVITIES_FACT table LU_TIME table I’m not sure how to do thi…
set decimal places of sum in sql
I have a database I use for a debating competition I am trying to sort the standings out to see which schools will play off in the finals at the end of the semester. I have this working as shown below however I am not able to round the ptc field, it currently returns up to 4 decimal places eg
Query to fetch specific part from a filepath
I have filename field in table which contains value as follows, Its image files preceding with employee code H:KYC_PDF_Cloud_NEmployeePANCard-CroppedSignaturese45432_Sign.jpg H:KYC_PDF_Cloud_N…